今天搭建 HyperLedger Fabric 2.x 时启动test-network进行测试网络时遇到许多问题,首先是:
【问题一】Starting nodes with CLI timeout of '5' tries and CLI delay of '3' seconds and using database 'leveldb' with crypto from 'cryptogen'
Peer binary and configuration files not found..
Follow the instructions in the Fabric docs to install the Fabric Binaries
下载https://github.com/hyperledger/fabric/releases/download/v2.4.0/hyperledger-fabric-linux-amd64-2.4.0.tar.gz
tar -zxvf hyperledger-fabric-linux-amd64-2.4.0.tar.gz
将这个文件在fabric-samples文件夹中解压后,会有bin与config文件夹。
进入test-network执行:
./network.sh up
【问题二】
再次报错:
[92065] Failed to execute script docker-compose
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Unable to start network
以为是docker没有启动的原因,于是执行
service docker start
【问题三】
再次报新错误:
解决方法:
1、进入Docker Hub,查看Tags
找到最新版本,这里是2.4
2、运行
docker pull hyperledger/fabric-orderer:2.4
等待拉取完成
3、运行
docker tag hyperledger/fabric-orderer:2.4 hyperledger/fabric-orderer:latest
更改fabric-orderer:2.4 名称为 fabric-orderer:latest
4、重新运行
./network.sh up
如果fabric-peer、fabric-tools也报同样错误,就重复以上步骤。
在Docker Hub左上角搜索:
fabric-peer,运行:
docker pull hyperledger/fabric-peer:2.4
docker tag hyperledger/fabric-peer:2.4 hyperledger/fabric-peer:latest
fabric-tools:
docker pull hyperledger/fabric-tools:2.4
docker tag hyperledger/fabric-tools:2.4 hyperledger/fabric-tools:latest
问题解决。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)