无法在 Mac OS 上启动 Fabric,startFabric.sh 给出守护程序错误

问题描述 投票:0回答:2

我按照https://hyperledger.github.io/composer/latest/installing/development-tools.html进行设置。但是当我运行

./startFabric.sh
时,我遇到了错误,如下所示日志

docker ps -a

CONTAINER ID        IMAGE                               COMMAND                  CREATED             STATUS                      PORTS                                        NAMES
53263f6dc18e        hyperledger/fabric-peer:1.2.1       "peer node start"        20 minutes ago      Exited (1) 13 minutes ago                                                peer0.org1.example.com
8e558708b7f6        hyperledger/fabric-orderer:1.2.1    "orderer"                20 minutes ago      Exited (1) 13 minutes ago                                                orderer.example.com
0c373a640583        hyperledger/fabric-couchdb:0.4.10   "tini -- /docker-ent…"   20 minutes ago      Up 13 minutes               4369/tcp, 9100/tcp, 0.0.0.0:5984->5984/tcp   couchdb
e86a4960ab44        hyperledger/fabric-ca:1.2.1         "sh -c 'fabric-ca-se…"   20 minutes ago      Up 13 minutes               0.0.0.0:7054->7054/tcp                       ca.org1.example.com
e30099dbd318        hello-world                         "/hello"                 23 minutes ago      Exited (0) 15 minutes ago                                                hungry_zhukovsky

cd fabric-dev-servers/ && ./startfabric.sh

Development only script for Hyperledger Fabric control
Running 'startfabric.sh'
FABRIC_VERSION is set to 'hlfv12'
FABRIC_START_TIMEOUT is unset, assuming 15 (seconds)
Stopping couchdb             ... done
Stopping ca.org1.example.com ... done
Removing peer0.org1.example.com ... done
Removing orderer.example.com    ... done
Removing couchdb                ... done
Removing ca.org1.example.com    ... done
Removing network composer_default
Creating network "composer_default" with the default driver
Creating couchdb             ... done
Creating orderer.example.com ... done
Creating ca.org1.example.com    ... done
Creating peer0.org1.example.com ... done
sleeping for 15 seconds to wait for fabric to complete start up
Error response from daemon: Container 
3e81f3aa41969a7ae3f7a09c5c42c16aa55e2527958aef319ad93988ca942f7f is not running

在检查此容器的日志时,我看到此错误:

2019-09-06 09:27:49.868 UTC [msp] getPemMaterialFromDir -> DEBU 020 Reading directory /etc/hyperledger/peer/msp/signcerts
2019-09-06 09:27:49.868 UTC [main] main -> **ERRO 021 Cannot run peer because error when setting up MSP of type bccsp from directory /etc/hyperledger/peer/msp: could not load a valid signer certificate from directory /etc/hyperledger/peer/msp/signcerts: stat /etc/hyperledger/peer/msp/signcerts: no such file or directory**

当我尝试从 Kitematic 启动对等容器时,出现相同的错误

我的设置如下:

  • docker --version
    Docker 版本 19.03.1,内部版本 74b1e89
  • composer --version
    v0.20.9

我在 Windows 10 上发现了同样的问题 https://github.com/hyperledger/composer/issues/4202 但我在 Mac OS X 10.11.6 上遇到了这个问题。

hyperledger-fabric hyperledger-composer
2个回答
1
投票

2019-09-06 09:27:49.868 UTC [main] main -> ERRO 021 无法运行对等点 因为从目录设置 bccsp 类型的 MSP 时出错 /etc/hyperledger/peer/msp:无法加载有效的签名者证书 从目录 /etc/hyperledger/peer/msp/signcerts:stat /etc/hyperledger/peer/msp/signcerts:没有这样的文件或目录

这意味着正在运行的容器无法访问已安装的证书文件夹

请检查卷安装!在 docker-compose 文件中


0
投票

我在 macOS Sonoma 14.5 和 Docker Desktop v4.33.0 中遇到了类似的问题。问题是 crypto-config 文件夹存在于 /opt/fabric-network 文件夹中,由于某种原因 docker 无法访问非用户主目录中存在的证书文件。我找不到它无法访问它的原因。但我将所有脚本和撰写文件移至我的用户主目录,即 ~/fabric-network,现在 crypto-config 文件夹位于 ~/fabric-network 中。然后一切都很顺利。

© www.soinside.com 2019 - 2024. All rights reserved.