1.报错:docker network is required to be running to create a channel
解决:
1).首先检查是否使用管理员权限:
sudo ./network.sh createChannel
2).检查是否打开Docker网络
docker network ls
如果出现下图代表启动,否则检查一下搭链过程是否成功
2.报错:After 5 attempts, peer0.org1 has failed to join channel ‘mychannel’
解决:执行
sudo ./network.sh down
sudo ./network.sh up
sudo ./network.sh createChannel
3.报错:Failed to parse channel configuration, make sure you have jq installed
下载安装jq依赖文件(不要使用snap install,后续搭链会报错!)
sudo apt install jq
如果提示未找到此软件源,则可能源文件里没有,此时需要更新一下源文件。
https://blog.csdn.net/sunuokuikui/article/details/134300803?fromshare=blogdetail&sharetype=blogdetail&sharerId=134300803&sharerefer=PC&sharesource=Speech_&sharefrom=from_link
然后启动即可。
4.建立通道报错:
Error: failed to read chaincode package at 'basic.tar.gz': open basic.tar.gz: no such file or directory
Chaincode packaging has failed
解决:https://www.cnblogs.com/lihy110/articles/17932044.html
5.启动搭链报错:failed to retrieve endorser client for install: endorser client failed to connect to localhost:7051: failed to create new connection: context deadline exceeded
sudo vim /etc/resolv.conf
注释掉