2017-07-31 279 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