我在对等日志中收到警告。不知道为什么我得到这个。
Deep probe of peer0.org1.example.com:7051 failed: context deadline exceeded 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
runtime.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 =真--env CORE_CHAINCODE_STARTUPTIMEOUT = 2500S --env CORE_CHAINCODE_EXECUTETIMEOUT = 1600 --env CORE_PEER_NETWORKID =天网--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 =主机名: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 =主机名:5964 -v / var / run /:/ host / var / run / -v / export / workspace / hyperledger /docker/channel-artifacts:/opt/gopath/src/github.com/hyperledger/fabric/pee r / 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启动
答案 0 :(得分:2)
我遇到了类似的问题,下面是我的观察。如果我错了,请纠正我:
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.
注意:就我而言,这是因为我没有在重新启动网络之前删除previous data(docker named volume)
。
答案 1 :(得分:0)
看来您的对等容器环境变量配置错误。
尝试改变
CORE_PEER_ADDRESS = peer0.org1.example.com:7051
代替
CORE_PEER_ADDRESS =主机名:7051
答案 2 :(得分:0)
在我的情况下,我在 configtx.yaml 中为多个锚点设置了相同的端口,我更改了端口,现在错误已解决