0

I'm trying to build a web front end of a fabric-network, and after I completed the registerAdmin and registerUser, I got err when I was tring to run my js code.

root@oyu-virtual-machine:~/hyperledger-fabric/test/webapp# node get.js
Load privateKey and signedCert
Get History
Assigning transaction_id:  35e9ed932366df66448d789fbf5989e6ba31be555f96eaca3197475a1602749c
E0429 15:09:28.130483373    4413 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed.
returned from gethistory
Gethistory result count =  1
error from gethistory =  Error: 14 UNAVAILABLE: failed to connect to all addresses
    at Object.exports.createStatusError (/root/hyperledger-fabric/test/webapp/node_modules/fabric-client/node_modules/grpc/src/common.js:91:15)
    at Object.onReceiveStatus (/root/hyperledger-fabric/test/webapp/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:1209:28)
    at InterceptingListener._callNext (/root/hyperledger-fabric/test/webapp/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:568:42)
    at InterceptingListener.onReceiveStatus (/root/hyperledger-fabric/test/webapp/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:618:8)
    at callback (/root/hyperledger-fabric/test/webapp/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:847:24) {
  code: 14,
  metadata: Metadata { _internal_repr: {}, flags: 0 },
  details: 'failed to connect to all addresses'
}
Response is  Error: 14 UNAVAILABLE: failed to connect to all addresses

In my opinion, the most important message is

E0429 15:09:28.130483373 4413 ssl_transport_security.cc:1245] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed.

It's not generated by my code, but system generated it. I do hope someone could help me. Thanks in advance.

OYU
  • 13
  • 5
  • Can you post a code snippet of your client? The error is due to the fact the client cannot verify the TLS certificate from the peer(s). You'll need to configure your backend to load the root certificate which issued the TLS certs for the peer(s). – Gari Singh May 03 '21 at 09:21
  • Sorry, but what client? I only have a cli defined in yaml, which runs in docker. – OYU May 03 '21 at 10:55
  • sorry - was looking to see the source for `get.js` – Gari Singh May 05 '21 at 08:57
  • @GariSingh never mind, I have changed my get.js to a new version, and I am facing another error – OYU May 05 '21 at 10:28

0 Answers0