我正在运行服务发现以调用事务。我收到此错误。我正在使用fabric-sdk-java v1.4.0。
我设置了CORE_PEER_GOSSIP_EXTERNALENDPOINT as peer_name:port
Chaincode.org.hyperledger.fabric.sdk.exception.ServiceDiscoveryException: Failed to find and endorsers for chaincode fabcar.
同样在grpc日志中,我反复收到以下警告。
WARNING: [io.grpc.internal.ManagedChannelImpl-965] Failed to resolve name. status=Status{code=UNAVAILABLE, description=NameResolver returned an empty list, cause=null}
Mar 01, 2019 11:37:51 AM io.grpc.internal.ManagedChannelImpl$NameResolverListenerImpl onError
fabric-sdk-java日志
[pool-5-thread-1] INFO org.hyperledger.fabric.sdk.ServiceDiscovery - Channel mychannel doing discovery with peer: Peer{ id: 3, name: pr1, channelName: mychannel, url: grpc://10.80.102.129:8051}
[pool-5-thread-1] ERROR org.hyperledger.fabric.sdk.ServiceDiscovery - Error failed constructing descriptor for chaincodes:<name:"fabcar" >
[pool-5-thread-1] WARN org.hyperledger.fabric.sdk.ServiceDiscovery - Channel mychannel failed to find all layouts for chaincodes. Expected: 1 and found: 0
[grpc-default-executor-21] WARN org.hyperledger.fabric.sdk.PeerEventServiceClient - Received error on PeerEventServiceClient{id: 8360, channel: mychannel, peerName: pr1:7051, url: grpc://pr1:7051}, attempts 8351. UNAVAILABLE: Unable to resolve host pr1
[grpc-default-executor-21] WARN org.hyperledger.fabric.sdk.PeerEventServiceClient - Received error on PeerEventServiceClient{id: 8410, channel: mychannel, peerName: pr1:7051, url: grpc://pr1:7051}, attempts 8401. UNAVAILABLE: Unable to resolve host pr1
可能有什么问题吗?
答案 0 :(得分:0)
您需要将对等方添加到/etc/hosts/
文件中。
对于您而言,我认为您应该添加以下行:
10.80.102.129 pr1