2017-07-31 118 views
4

您好,我是Hyperledger Fabric的新手。Hyperledger Fabric示例中的連接失敗

我剛開始用它來工作,我是從 http://hyperledger-fabric.readthedocs.io/en/latest/write_first_app.html

做第一個樣品我跟着先決條件安裝從 http://hyperledger-fabric.readthedocs.io/en/latest/prereqs.html

我的操作系統是的Ubuntu 16.04,我背後代理

當我運行node query.js我得到以下錯誤

Create a client and set the wallet location 
Set wallet path, and associate user PeerAdmin with application 
Check user is enrolled, and set a query URL in the network 
Make query 
Assigning transaction_id: a85d2111f5d6e5eef064f87de42be677e69849724b1242dca0503be84d397f5d 
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Connect Failed 
at /home/nokia/hyperledger/firstApp/fabric-samples/fabcar/node_modules/grpc/src/node/src/client.js:434:17 
returned from query 
Query result count = 1 
error from query = { Error: Connect Failed 
at /home/nokia/hyperledger/firstApp/fabric-samples/fabcar/node_modules/grpc/src/node/src/client.js:434:17 code: 14, metadata: Metadata { _internal_repr: {} } } 
Response is Error: Connect Failed 
+0

可以粘貼 「泊塢窗PS」 和 「泊塢窗PS -a」 的輸出 –

+0

'搬運工PS -a' https://開頭引擎收錄.com/euCLkj8e – Katiyman

+0

'docker ps' https://pastebin.com/c3Wmi124 – Katiyman

回答

1

當同伴關閉或沒有響應時,我們看到這個錯誤。我可以通過停止同行重新創建相同的問題。一旦它重新開始。

$ docker stop peer0.org1.example.com 
peer0.org1.example.com 

$ node query.js 
Create a client and set the wallet location 
Set wallet path, and associate user PeerAdmin with application 
Check user is enrolled, and set a query URL in the network 
Make query 
Assigning transaction_id: c450608388799e3ca76e20b96010283202832c31ba9ae62c1ae4648c6353334b 
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Connect Failed 
    at /home/ibmadmin/fabric-samples/fabcar/node_modules/grpc/src/node/src/client.js:434:17 
returned from query 
Query result count = 1 
error from query = { Error: Connect Failed 
    at /home/ibmadmin/fabric-samples/fabcar/node_modules/grpc/src/node/src/client.js:434:17 code: 14, metadata: Metadata { _internal_repr: {} } } 
Response is Error: Connect Failed 

可以看一下請求的響應,一旦對方開始

$docker start peer0.org1.example.com 
peer0.org1.example.com 

    $node query.js 
    Create a client and set the wallet location 
    Set wallet path, and associate user PeerAdmin with application 
    Check user is enrolled, and set a query URL in the network 
    Make query 
    Assigning transaction_id: 21a6cc3cd27e098da355da00ba3aa8819e84bc4c2e81768dba2a88a8125b380c 
    returned from query 
    Query result count = 1 
    Response is [{"Key":"CAR0", "Record":{"colour":"blue","make":"Toyota","model":"Prius","owner":"Tomoko"}},{"Key":"CAR1", "Record":{"colour":"red","make":"Ford","model":"Mustang","owner":"Brad"}},{"Key":"CAR2", "Record":{"colour":"green","make":"Hyundai","model":"Tucson","owner":"Jin Soo"}},{"Key":"CAR3", "Record":{"colour":"yellow","make":"Volkswagen","model":"Passat","owner":"Max"}},{"Key":"CAR4", "Record":{"colour":"black","make":"Tesla","model":"S","owner":"Adriana"}},{"Key":"CAR5", "Record":{"colour":"purple","make":"Peugeot","model":"205","owner":"Michel"}},{"Key":"CAR6", "Record":{"colour":"white","make":"Chery","model":"S22L","owner":"Aarav"}},{"Key":"CAR7", "Record":{"colour":"violet","make":"Fiat","model":"Punto","owner":"Pari"}}, 
{"Key":"CAR8", "Record":{"colour":"indigo","make":"Tata","model":"Nano","owner":"Valeria"}},{"Key":"CAR9", "Record":{"colour":"brown","make":"Holden","model":"Barina","owner":"Shotaro"}}] 

然而,你的情況同行似乎運行。 要了解更多信息,請分享同行記錄。

搬運工日誌-f peer0.org1.example.com

+0

請找到下面的鏈接 https://pastebin.com/vpDZyvbT日誌 – Katiyman

+0

上面記錄有CouchDB的連接錯誤 我解決它,通過修改我的/ etc/hosts文件 127.0.0.1本地主機 127.0.1。1 Openwhisk-Node2-172 172.18.0.3的CouchDB 172.18.0.5 peer0.org1.example.com 172.18.0.2 orderer.example.com 172.18.0.4 ca.example.com 但仍**同樣的問題** 。新的日誌附在 https://pastebin.com/1CH6ikqe – Katiyman

+0

這可以是任何證書或代理問題嗎?...需要指針如何調試。謝謝 – Katiyman

相關問題