无法运行fabric first-网络示例
这是我运行时的日志:./byfn up
/ ___| |_ _| / \ | _ \ |_ _|
\___ \ | | / _ \ | |_) | | |
___) | | | / ___ \ | _ < | |
|____/ |_| /_/ \_\ |_| \_\ |_|
Build your first network (BYFN) end-to-end test
Channel name : mychannel
Creating channel...
+ peer channel create -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/channel.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
+ res=0
+ set +x
2019-06-27 22:22:11.117 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2019-06-27 22:22:12.361 UTC [cli.common] readBlock -> INFO 002 Received block: 0
===================== Channel 'mychannel' created =====================
Having all peers join the channel...
+ peer channel join -b mychannel.block
+ res=1
+ set +x
Error: error getting endorser client for channel: endorser client failed to connect to peer0.org1.example.com:7051: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup peer0.org1.example.com: no such host"
peer0.org1 failed to join the channel, Retry after 9 seconds我的环境:
Ubuntu 18.04
Docker version 18.06.1-ce, build e68fc7a
docker-compose version 1.24.0, build 0aa59064
go version go1.11.11 linux/amd64
echo $GOPATH results in /usr/local/go/bin对等点应该能够加入通道
发布于 2019-06-28 12:11:33
这是一个众所周知的问题,这是由于对文件resolv.conf的更改而导致的,Hyperledger Fabric中的容器间域名解析从纯Go解析器切换到cgo解析器,由已知的静态链接cgo引起的SIGSEGV错误被触发,因此Hyperledger Fabric的部署失败。要了解更多信息,请访问此link。
发布于 2019-06-30 13:12:17
这是常见的问题,停止网络,删除所有以前的容器并修剪docker的卷,然后重新启动docker,最后重新运行网络:
$./byfn.sh down
$docker stop $(docker ps -a -q)
$docker rm $(docker ps -a -q)
$docker volume prune
$sudo systemctl daemon-reload
$sudo systemctl restart docker
$cd .....fabric-samples/first-network
$./byfn.sh -m generate
$./byfn.sh -m up发布于 2019-07-01 21:33:58
通过运行Ubuntu 16.04 LTS中的示例解决了这个问题。之前我在Ubuntu 18.04上尝试过,但Hyperledger Fabric开发的目标操作系统是Ubuntu 16,而不是全新的18,所以它在Ubuntu 16上运行顺畅是有道理的。
https://stackoverflow.com/questions/56799114
复制相似问题