2017-09-13 178 views
0

通過使用fabric-sdk-java客戶端我試圖調用安裝和實例化在同行chaincode我Hyperledger fabric V1.0 network安裝在本地的Windows 使用泊塢窗圖像。我能夠調用和查詢鏈碼到對等peer0.org1.example.com,但是當我試圖同向同行peer0.org2.example.com收到以下錯誤使用織物客戶端SDK,無法使GRPC調用多個對

2017-09-13 13:22:45,382 main ERROR Channel:2241 - Sending proposal to peer0.org2.example.com failed because of: gRPC failure=Status{code=UNAVAILABLE, description=Channel closed while performing protocol negotiation, cause=null} 
java.lang.Exception: io.grpc.StatusRuntimeException: UNAVAILABLE: Channel closed while performing protocol negotiation 
    at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:2241) 
    at org.hyperledger.fabric.sdk.Channel.sendProposal(Channel.java:2155) 
    at org.hyperledger.fabric.sdk.Channel.sendTransactionProposal(Channel.java:2089) 
    at com.ibs.blockchain.client.utility.BlockChainUtility.sendProposal(BlockChainUtility.java:232) 
    at com.ibs.blockchain.client.utility.BlockChainUtility.createFlight(BlockChainUtility.java:80) 
    at com.ibs.blockchain.client.test.BCAPITest.main(BCAPITest.java:9) 
Caused by: io.grpc.StatusRuntimeException: UNAVAILABLE: Channel closed while performing protocol negotiation 
    at io.grpc.Status.asRuntimeException(Status.java:526) 
    at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:427) 
    at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:419) 
    at io.grpc.internal.ClientCallImpl.access$100(ClientCallImpl.java:60) 
    at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:493) 
    at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$500(ClientCallImpl.java:422) 
    at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:525) 
    at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) 
    at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:102) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
    at java.lang.Thread.run(Thread.java:745) 

展望搬運工-compose.yaml端口映射是像

peer0.org1.example.com 
    ports: 
     - 7051:7051 
     - 7053:7053 

peer0.org2.example.com  
     ports: 
     - 8051:7051 
     - 8053:7053 

它與對等體僅具有工作的端口相同的TCP端口()但得到上述錯誤無線對方有不同的端口。爲什麼?

+3

請澄清問題。在8051:7051表示法中,8051是「外部」可到達端口,而7051是泊塢窗圖像中的匹配端口。此外,「UNAVAILABLE:Channel」錯誤似乎表明您在結構頻道名稱中存在對方加入某處的拼寫錯誤,請仔細檢查?。 –

+1

哦,你是對的。我正在使用左側的端口(7051),而不是您提到的「外部」可到達端口。問題與我的理解。:)現在它的工作後,用「外部」可達端口替換7051。感謝您的評論:) – Girish007

+0

@Bertrand_Szoghy請將此添加爲答案 –

回答

0

請澄清問題。在8051:7051表示法中,8051是「外部」可到達端口,而7051是泊塢窗圖像中的匹配端口。此外,「UNAVAILABLE:Channel」錯誤似乎表明您在結構頻道名稱中存在對方加入某處的拼寫錯誤,請仔細檢查?。

+0

它正在使用端口左側(7051),而不是「外部」可達端口提到。現在它工作正常。 – Girish007

相關問題