我想根据本教程将org3添加到一个不完整的Fabric网络中: https://hyperledger-fabric.readthedocs.io/en/release-1.2/channel_update_tutorial.html
但是当我最终执行此命令时
peer channel join -b mychannel.block
出现此错误:
Error: error getting endorser client for channel: endorser client failed to connect to peer0.org3.example.com:7051: failed to create new connection: context deadline exceeded
当我查看日志时:
docker logs -f peer0.org1.example.com
似乎正确:
2018-10-12 02:18:29.902 UTC [lscc] executeInstall -> INFO 032 Installed Chaincode [mycc] Version [1.0] to peer
2018-10-12 02:18:52.555 UTC [cceventmgmt] HandleStateUpdates -> INFO 033 Channel [mychannel]: Handling LSCC state update for chaincode [mycc]
2018-10-12 02:18:52.571 UTC [kvledger] CommitWithPvtData -> INFO 034 Channel [mychannel]: Committed block [3] with 1 transaction(s)
2018-10-12 02:18:53.785 UTC [golang-platform] GenerateDockerBuild -> INFO 035 building chaincode with ldflagsOpt: '-ldflags "-linkmode external -extldflags '-static'"'
2018-10-12 02:18:53.785 UTC [golang-platform] GenerateDockerBuild -> INFO 036 building chaincode with tags:
2018-10-12 02:19:17.969 UTC [kvledger] CommitWithPvtData -> INFO 037 Channel [mychannel]: Committed block [4] with 1 transaction(s)
2018-10-12 02:21:56.351 UTC [gossip/gossip] learnAnchorPeers -> INFO 038 Anchor peer with same endpoint, skipping connecting to myself
2018-10-12 02:21:56.404 UTC [kvledger] CommitWithPvtData -> INFO 039 Channel [mychannel]: Committed block [5] with 1 transaction(s)
所以我想问为什么会出现这个问题,如何解决这个问题?非常感谢。
答案 0 :(得分:0)
我在Hyperledger Fabric V1.4中遇到了相同的问题。我好像问题出在高朗。将此“ GODEBUG = netdns = go”添加到您的环境变量中。我希望这有帮助。
peer0.org1.example.com:
container_name: peer0.org1.example.com
image: hyperledger/fabric-peer:latest
environment:
- GODEBUG=netdns=go
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_PEER_ID=peer0.org1.example.com