Hyperledger Fabric错误-试图联系2个对等方。最后一个错误是错误:在截止日期之前无法连接

问题描述 投票:0回答:1
  1. 我使用byfn.sh提出了4个同行。
  2. 一切都很好,我可以看到ordererpeersCA nodes等在docker容器中运行
  3. 然后我使用一个定制服务层应用程序,该应用程序使用Fabric Node SDK与该网络连接。
  4. 我使用byfn.sh生成的TLS CA证书(/usr/local/src/test_env/hlf_scripts/first-network/crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem)建立连接没有问题
  5. 这里是呼叫Gateway.getNetwork(“mychannel”)的docker日志消息:
2020-01-14 22:12:20.981 UTC [comm.grpc.server] 1 -> INFO 083 unary call completed grpc.service=discovery.Discovery grpc.method=Discover grpc.peer_address=192.168.80.1:38858 grpc.code=OK grpc.call_duration=515.21µs

2020-01-14 22:12:21.012 UTC [comm.grpc.server] 1 -> INFO 084 unary call completed grpc.service=discovery.Discovery grpc.method=Discover grpc.peer_address=192.168.80.1:38858 grpc.code=OK grpc.call_duration=552.801µs
  1. 然后,我打开另一个使用几乎相同代码的客户端应用程序来操纵网络。此处的第一步是确保存在用户(在本例中为admin)身份,并且可以将其导入钱包。使用相同的代码段来生成此标识,并使用相同的连接配置文件(connection_org1.json)。可以创建身份并将其导入文件系统钱包。
  2. 我可以使用Gateway.connect(…)方法并使用连接配置文件connection_org1.json连接到网络。但是,当我调用Gateway.getNetwork(“mychannel”)时,我的问题开始了。这是Fabric SDK返回的错误:
    [nodemon] starting `node ./dist/server.js`

    Express server listening on port 3050

    Wallet path: /usr/local/src/fabric-network-code/wallet

    E0114 17:16:47.872273165    1998 ssl_transport_security.cc:1238] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.

    E0114 17:16:48.873788447    1998 ssl_transport_security.cc:1238] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.

    E0114 17:16:50.368082218    1998 ssl_transport_security.cc:1238] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.

    2020-01-14T22:16:50.869Z - error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://localhost:7051

    2020-01-14T22:16:50.870Z - error: [Channel.js]: Error: Failed to connect before the deadline URL:grpcs://localhost:7051

    E0114 17:16:50.877630619    1998 ssl_transport_security.cc:1238] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.

    E0114 17:16:51.876732084    1998 ssl_transport_security.cc:1238] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.

    E0114 17:16:53.263732590    1998 ssl_transport_security.cc:1238] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.

    E0114 17:16:53.303070959    1998 ssl_transport_security.cc:1238] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.

    2020-01-14T22:16:53.875Z - error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://localhost:8051

    2020-01-14T22:16:53.875Z - error: [Channel.js]: Error: Failed to connect before the deadline URL:grpcs://localhost:8051

    2020-01-14T22:16:53.875Z - error: [Network]: _initializeInternalChannel: Unable to initialize channel. Attempted to contact 2 Peers. Last error was Error: Failed to connect before the deadline URL:grpcs://localhost:8051

    Unable to initialize channel. Attempted to contact 2 Peers. Last error was Error: Failed to connect before the deadline URL:grpcs://localhost:8051

    [nodemon] app crashed - waiting for file changes before starting...
  1. 这是来自peer0.org1.example.com的docker容器日志中的日志
    2020-01-14 22:16:47.872 UTC [core.comm] ServerHandshake -> ERRO 085 TLS handshake failed with error EOF server=PeerServer remoteaddress=192.168.80.1:38886

    2020-01-14 22:16:48.874 UTC [core.comm] ServerHandshake -> ERRO 086 TLS handshake failed with error EOF server=PeerServer remoteaddress=192.168.80.1:38890

    2020-01-14 22:16:50.368 UTC [core.comm] ServerHandshake -> ERRO 087 TLS handshake failed with error EOF server=PeerServer remoteaddress=192.168.80.1:38894

    2020-01-14 22:16:53.303 UTC [core.comm] ServerHandshake -> ERRO 088 TLS handshake failed with error EOF server=PeerServer remoteaddress=192.168.80.1:38910

我已经尝试了使用不同证书的各种排列和组合,但是却一无所获。在线论坛表明这是订购者与对等方之间的交流问题。但是,订购者中没有错误消息。

我在chat.hyperledger.org中已经问过这个问题,但尚未答复。

docker hyperledger-fabric hyperledger
1个回答
0
投票
我已经删除了有问题的目录,现在它正在.../first-network/crypto-config/.../<tlsca file>.pem下读取正确的目录>

有时候(而且经常是:-))答案就在那里,但一个人太愚蠢而看不到!!

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