我在对等日志中收到警告。不知道为什么我会得到这个。
对peer0.org1.example.com:7051的深度探测失败:超出了上下文截止时间 github.com/hyperledger/fabric/gossip/gossip.(*gossipServiceImpl).learnAnchorPeers.func1
/opt/gopath/src/github.com/hyperledger/fabric/gossip/gossip/gossip_impl.go:249
github.com/hyperledger/fabric/gossip/discovery.(*gossipDiscoveryImpl).Connect.func1
/opt/gopath/src/github.com/hyperledger/fabric/gossip/discovery/discovery_impl.go:152
运行时.goexit
/opt/go/src/runtime/asm_amd64.s:2337
无法连接到 {peer0.org1.example.com:7051 [] [] peer0.org1.example.com:7051 }:超出了上下文截止时间。
我的peer命令如下。
docker run --name peer0.org1.example.com -itd -p 7051:7051 -p 7063:7063 --dns-search=. -w /opt/gopath/src/github.com/hyperledger/fabric --privileged=true --env CORE_CHAINCODE_STARTUPTIMEOUT=2500s --env CORE_CHAINCODE_EXECUTETIMEOUT=1600s --env CORE_PEER_NETWORKID=skynet --env CORE_CHAINCODE_LOGGING_SHIM=DEBUG --env CORE_VM_DOCKER_ATTACHSTDOUT=true --env CORE_PEER_ADDRESSAUTODETECT=true --env CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock --env CORE_PEER_ID=peer0.org1.example.com --env CORE_LOGGING_LEVEL=DEBUG --env CORE_CHAINCODE_LOGGING_LEVEL=DEBUG --env CORE_PEER_ADDRESS=hostname:7051 --env CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=skynet --env CORE_PEER_LOCALMSPID=Org1MSP --env CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp --env CORE_LEDGER_STATE_STATEDATABASE=CouchDB --env CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=hostname:5964 -v /var/run/:/host/var/run/ -v /export/workspace/hyperledger/docker/channel-artifacts:/opt/gopath/src/github.com/hyperledger/fabric/peer/channel-artifacts -v /export/workspace/hyperledger/docker/crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ fabric-peer:x86_64-1.1.0 peer node start
最佳答案
我遇到了类似的问题,以下是我的观察。如果我错了,请纠正我:
1. I stopped the network(docker swarm network) which consists of 2 Orgs and 4 peers.
2. I didn't remove the previous data(docker named volume).
3. Before stopping the network, Anchor peers of both the Organization
communicating to each other via gossip protocol.
4. Again, I started the network in below manner:
---> first started Org2 peers
---> then started Org1 peers.
So here, since Anchor peer of Org2 knows about Anchor peer of Org1 hence as soon
as Org2 peers are up it started looking for Org1 Anchor peer but all the peers
of Org1 aren't up yet. So as long as Org1 peers are down, It will continue to
show this error.
But once the Org1 peers are up then Org2 Anchor peer able to connect to Org1
Anchor peer and hence network started working fine.
注意:在我的例子中,发生这种情况只是因为我在重新启动网络之前没有删除以前的数据(docker 命名卷)
。
关于docker - 深度探测peer0.org1.example.com :7051 failed: context deadline exceeded,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50839542/