Hyperledger Fabric 1.4.2-第一个网络-获取代言人客户端时出错-链丢失

问题描述 投票:0回答:1

我正在尝试首次运行Hyperledger Fabric。

根据此安装二进制文件:https://hyperledger-fabric.readthedocs.io/en/release-1.4/install.html

然后尝试启动示例第一个网络:https://hyperledger-fabric.readthedocs.io/en/release-1.4/build_network.html

我正在运行:./byfn.sh generate然后:./byfn.sh up

不幸的是,up命令给了我这个:

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 3 seconds
+ peer channel join -b mychannel.block

[似乎:peer0.org1.example.com已退出,所以我已经显示了它的日志。

docker logs -f peer0.org1.example.com

2019-08-05 07:44:57.356 UTC [fsblkstorage] preRestHtFiles -> INFO 021 Dir [/var/hyperledger/production/ledgersData/chains/chains] missing... exiting
2019-08-05 07:44:57.356 UTC [fsblkstorage] LoadPreResetHeight -> INFO 022 Pre-reset heights loaded
2019-08-05 07:44:57.356 UTC [nodeCmd] func7 -> INFO 023 Starting profiling server with listenAddress = 0.0.0.0:6060
2019-08-05 07:44:57.364 UTC [comm.grpc.server] 1 -> INFO 024 unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2019-08-05T07:44:59.363Z grpc.peer_address=172.20.0.4:32800 grpc.peer_subject="CN=peer1.org1.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=131.772µs
2019-08-05 07:44:57.368 UTC [comm.grpc.server] 1 -> INFO 025 streaming call completed grpc.service=gossip.Gossip grpc.method=GossipStream grpc.request_deadline=2019-08-05T07:45:07.365Z grpc.peer_address=172.20.0.4:32800 grpc.peer_subject="CN=peer1.org1.example.com,L=San Francisco,ST=California,C=US" error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=2.991758ms
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x63 pc=0x7f6064357259]

由于以下原因,它似乎已收到退出信号:Dir [/var/hyperledger/production/ledgersData/chains/chains] missing

我该如何进行?

编辑:由于最后一行提到这是peer1.org1.example.com的RPC错误,因此以下是peer1.org1.example.com的日志。似乎peer0无法连接到peer1,而peer1无法连接到peer0

2019-08-05 07:44:56.292 UTC [nodeCmd] serve -> INFO 001 Starting peer:
 Version: 1.4.2
 Commit SHA: c6cc550
 Go version: go1.11.5
 OS/Arch: linux/amd64
 Chaincode:
  Base Image Version: 0.4.15
  Base Docker Namespace: hyperledger
  Base Docker Label: org.hyperledger.fabric
  Docker Namespace: hyperledger
2019-08-05 07:44:56.293 UTC [ledgermgmt] initialize -> INFO 002 Initializing ledger mgmt
2019-08-05 07:44:56.293 UTC [kvledger] NewProvider -> INFO 003 Initializing ledger provider
2019-08-05 07:44:56.330 UTC [kvledger] NewProvider -> INFO 004 ledger provider Initialized
2019-08-05 07:44:56.373 UTC [ledgermgmt] initialize -> INFO 005 ledger mgmt initialized
2019-08-05 07:44:56.373 UTC [peer] func1 -> INFO 006 Auto-detected peer address: 172.20.0.4:8051
2019-08-05 07:44:56.373 UTC [peer] func1 -> INFO 007 Returning peer1.org1.example.com:8051
2019-08-05 07:44:56.373 UTC [peer] func1 -> INFO 008 Auto-detected peer address: 172.20.0.4:8051
2019-08-05 07:44:56.373 UTC [peer] func1 -> INFO 009 Returning peer1.org1.example.com:8051
2019-08-05 07:44:56.374 UTC [nodeCmd] serve -> INFO 00a Starting peer with TLS enabled
2019-08-05 07:44:56.376 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 00b Entering computeChaincodeEndpoint with peerHostname: peer1.org1.example.com
2019-08-05 07:44:56.376 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 00c Exit with ccEndpoint: peer1.org1.example.com:8052
2019-08-05 07:44:56.377 UTC [sccapi] registerSysCC -> INFO 00d system chaincode lscc(github.com/hyperledger/fabric/core/scc/lscc) registered
2019-08-05 07:44:56.378 UTC [sccapi] registerSysCC -> INFO 00e system chaincode cscc(github.com/hyperledger/fabric/core/scc/cscc) registered
2019-08-05 07:44:56.378 UTC [sccapi] registerSysCC -> INFO 00f system chaincode qscc(github.com/hyperledger/fabric/core/scc/qscc) registered
2019-08-05 07:44:56.378 UTC [sccapi] registerSysCC -> INFO 010 system chaincode (+lifecycle,github.com/hyperledger/fabric/core/chaincode/lifecycle,true) disabled
2019-08-05 07:44:56.380 UTC [gossip.service] func1 -> INFO 011 Initialize gossip with endpoint peer1.org1.example.com:8051 and bootstrap set [peer0.org1.example.com:7051]
2019-08-05 07:44:56.384 UTC [gossip.gossip] NewGossipService -> INFO 012 Creating gossip service with self membership of Endpoint: peer1.org1.example.com:8051, InternalEndpoint: peer1.org1.example.com:8051, PKI-ID: 54f785fe4477fcb3e57f7f5b817d6b542ff311ec1dd66dfb0ac2ac6abf50e08f, Metadata: 
2019-08-05 07:44:56.384 UTC [gossip.gossip] start -> INFO 013 Gossip instance peer1.org1.example.com:8051 started
2019-08-05 07:44:56.385 UTC [sccapi] deploySysCC -> INFO 014 system chaincode lscc/(github.com/hyperledger/fabric/core/scc/lscc) deployed
2019-08-05 07:44:56.386 UTC [cscc] Init -> INFO 015 Init CSCC
2019-08-05 07:44:56.386 UTC [sccapi] deploySysCC -> INFO 016 system chaincode cscc/(github.com/hyperledger/fabric/core/scc/cscc) deployed
2019-08-05 07:44:56.387 UTC [qscc] Init -> INFO 017 Init QSCC
2019-08-05 07:44:56.387 UTC [sccapi] deploySysCC -> INFO 018 system chaincode qscc/(github.com/hyperledger/fabric/core/scc/qscc) deployed
2019-08-05 07:44:56.387 UTC [sccapi] deploySysCC -> INFO 019 system chaincode (+lifecycle,github.com/hyperledger/fabric/core/chaincode/lifecycle) disabled
2019-08-05 07:44:56.387 UTC [nodeCmd] serve -> INFO 01a Deployed system chaincodes
2019-08-05 07:44:56.388 UTC [discovery] NewService -> INFO 01b Created with config TLS: true, authCacheMaxSize: 1000, authCachePurgeRatio: 0.750000
2019-08-05 07:44:56.388 UTC [nodeCmd] registerDiscoveryService -> INFO 01c Discovery service activated
2019-08-05 07:44:56.388 UTC [nodeCmd] serve -> INFO 01d Starting peer with ID=[name:"peer1.org1.example.com" ], network ID=[dev], address=[peer1.org1.example.com:8051]
2019-08-05 07:44:56.388 UTC [nodeCmd] serve -> INFO 01e Started peer with ID=[name:"peer1.org1.example.com" ], network ID=[dev], address=[peer1.org1.example.com:8051]
2019-08-05 07:44:56.388 UTC [nodeCmd] func7 -> INFO 01f Starting profiling server with listenAddress = 0.0.0.0:6060
2019-08-05 07:44:56.388 UTC [kvledger] LoadPreResetHeight -> INFO 020 Loading prereset height from path [/var/hyperledger/production/ledgersData/chains]
2019-08-05 07:44:56.388 UTC [fsblkstorage] LoadPreResetHeight -> INFO 021 Loading Pre-reset heights
2019-08-05 07:44:56.388 UTC [fsblkstorage] preRestHtFiles -> INFO 022 Dir [/var/hyperledger/production/ledgersData/chains/chains] missing... exiting
2019-08-05 07:44:56.388 UTC [fsblkstorage] LoadPreResetHeight -> INFO 023 Pre-reset heights loaded
2019-08-05 07:44:57.365 UTC [comm.grpc.server] 1 -> INFO 024 unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2019-08-05T07:44:59.365Z grpc.peer_address=172.20.0.6:42872 grpc.peer_subject="CN=peer0.org1.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=160.286µs
2019-08-05 07:44:57.369 UTC [comm.grpc.server] 1 -> INFO 025 streaming call completed grpc.service=gossip.Gossip grpc.method=GossipStream grpc.request_deadline=2019-08-05T07:45:07.367Z grpc.peer_address=172.20.0.6:42872 grpc.peer_subject="CN=peer0.org1.example.com,L=San Francisco,ST=California,C=US" error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=1.830335ms
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x63 pc=0x7f39285ea259]
hyperledger-fabric hyperledger
1个回答
0
投票

此答案解决了问题:https://stackoverflow.com/a/49649678/2263395

基本上,您需要设置ENV变量:GODEBUG=netdns=go到docker-compose文件。

© www.soinside.com 2019 - 2024. All rights reserved.