【问题标题】:Unable to start Fabric on Mac OS, startFabric.sh gives daemon error无法在 Mac OS 上启动 Fabric,startFabric.sh 给出守护程序错误
【发布时间】:2019-09-06 12:31:26
【问题描述】:

我正在按照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 --versionDocker 版本 19.03.1,构建 74b1e89
  • composer --versionv0.20.9

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

【问题讨论】:

  • 您是否在运行 OSX 10.11 时运行 Docker Toolbox for Mac(而不是 Docker Desktop for Mac)?可能是那个版本的 Docker 有限制,所以它不能工作。建议您运行虚拟机管理程序(例如 virtualbox)并安装完整的 linux 桌面发行版并改用它。
  • 感谢您的回复。对,那是正确的。我正在为 Mac 运行 Docker 工具箱。哦,这是唯一的解决方法。
  • 我猜问题出在 Docker Toolbox 上。如果您无法运行 Docker Desktop for Mac(这是较新的版本),那么恐怕您将不得不在 VM 中运行 linux。

标签: hyperledger-fabric hyperledger-composer


【解决方案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 文件中

【讨论】:

  • 你的意思是卷: - /var/run/:/host/var/run/ - ./:/etc/hyperledger/configtx - ./crypto-config/peerOrganizations/org1.example。 com/peers/peer0.org1.example.com/msp:/etc/hyperledger/peer/msp - ./crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/msp/users
猜你喜欢
  • 2015-10-07
  • 2014-11-01
  • 1970-01-01
  • 2016-06-28
  • 2020-07-15
  • 1970-01-01
  • 2011-07-12
  • 1970-01-01
  • 2017-02-16
相关资源
最近更新 更多