今天搭建 HyperLedger Fabric 2.4 時啟動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
問題解決,
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/399609.html
標籤:區塊鏈
