How could I handle the Err of TLS certificate with fabric-sdk-node

174 views Asked by At

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.

0

There are 0 answers