Hyperledger fabric peer connection with HSM fails randomly after running for a while

76 views Asked by At

Good day,

We have an integration between an HSM Luna 6.3 and Hyperledger Fabric, we use Luna to store the private keys of peers and orderers. The integration works fine but after a while running we are getting this error in the peers:

[34m2021-04-26 19:33:04.544 UTC [endorser] callChaincode -> INFO f80a [0m [mychannel][a3eb7ef5] Exit chaincode: name:"mycontract"  (21ms)
[34m2021-04-26 19:33:04.614 UTC [comm.grpc.server] 1 -> INFO f80b [0m unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=X.X.X.X:48698 grpc.peer_subject="[email protected],OU=client" grpc.code=OK grpc.call_duration=92.644ms
[33m2021-04-26 20:30:18.831 UTC [gossip.gossip] Gossip -> WARN f80c [0m Failed signing message: Failed generating signature [P11: sign failed [pkcs11: 0x30: CKR_DEVICE_ERROR]]
github.com/hyperledger/fabric/gossip/gossip.(*gossipServiceImpl).Gossip
/opt/gopath/src/github.com/hyperledger/fabric/gossip/gossip/gossip_impl.go:683
github.com/hyperledger/fabric/gossip/election.(*adapterImpl).Gossip
/opt/gopath/src/github.com/hyperledger/fabric/gossip/election/adapter.go:99
github.com/hyperledger/fabric/gossip/election.(*leaderElectionSvcImpl).leader
/opt/gopath/src/github.com/hyperledger/fabric/gossip/election/election.go:350
github.com/hyperledger/fabric/gossip/election.(*leaderElectionSvcImpl).run
/opt/gopath/src/github.com/hyperledger/fabric/gossip/election/election.go:282
runtime.goexit

Although the error ends with runtime.goexit the program doesn't kill the pod where its running and it isn't able to stablish a new connection with the HSM, it just keeps repeating the same error.

After restarting the pod the connection works well again, the peer runs normally peeking the private keys from the HSM.

Any idea why this is happening? is there a way to force the end of the program so the pod can restablish the connection? or any way to prevent this in the future?

Any help would be appreciated.

Thanks,

0

There are 0 answers