Failed to deploy peer node on Kubernetes using StatefulSet


Yueming Xu
 

Has anybody successfully deployed peer nodes on K8s using StatefulSet? I can run peer nodes on K8s using Deployment, but thought that StatefulSet is a better choice because it can automatically name multiple peer nodes as peer-0, peer-1, etc, and it can keep the persistent storage files upon restart.

However, when I start peer nodes using StatefulSet, I always get error "segmentation violation”, with the following log, but no detailed stack trace.

2018-11-28 02:38:17.504 UTC [grpc] DialContext -> DEBU 0b9 parsed scheme: ""
2018-11-28 02:38:17.504 UTC [grpc] DialContext -> DEBU 0ba scheme "" not registered, fallback to default scheme
2018-11-28 02:38:17.504 UTC [grpc] watcher -> DEBU 0bb ccResolverWrapper: sending new addresses to cc: [{peer-1.peer-svc.default.svc.cluster.local:7051 0 <nil>}]
2018-11-28 02:38:17.504 UTC [grpc] switchBalancer -> DEBU 0bc ClientConn switching balancer to "pick_first"
2018-11-28 02:38:17.504 UTC [grpc] HandleSubConnStateChange -> DEBU 0bd pickfirstBalancer: HandleSubConnStateChange: 0xc421e8eae0, CONNECTING
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x47 pc=0x7fc2903aa259]

runtime stack:
runtime.throw(0x111434c, 0x2a)
/opt/go/src/runtime/panic.go:616 +0x81
runtime.sigpanic()
/opt/go/src/runtime/signal_unix.go:372 +0x28e

If you have successfully deployed peers using StatefulSet, could you please share your peer.yml file? Thanks.

From the log file, it appears that system chain code are deployed before it panic, because I saw the following logs in one of the tries:

2018-11-28 00:18:31.123 UTC [inproccontroller] Register -> DEBU 079 Registering chaincode instance: lscc-1.3.0
2018-11-28 00:18:31.123 UTC [sccapi] registerSysCC -> INFO 07a system chaincode lscc(github.com/hyperledger/fabric/core/scc/lscc) registered
2018-11-28 00:18:31.124 UTC [inproccontroller] Register -> DEBU 07b Registering chaincode instance: cscc-1.3.0
2018-11-28 00:18:31.124 UTC [sccapi] registerSysCC -> INFO 07c system chaincode cscc(github.com/hyperledger/fabric/core/scc/cscc) registered
2018-11-28 00:18:31.124 UTC [inproccontroller] Register -> DEBU 07d Registering chaincode instance: qscc-1.3.0
2018-11-28 00:18:31.124 UTC [sccapi] registerSysCC -> INFO 07e system chaincode qscc(github.com/hyperledger/fabric/core/scc/qscc) registered
2018-11-28 00:18:31.124 UTC [inproccontroller] Register -> DEBU 07f Registering chaincode instance: +lifecycle-1.3.0
2018-11-28 00:18:31.124 UTC [sccapi] registerSysCC -> INFO 080 system chaincode +lifecycle(github.com/hyperledger/fabric/core/chaincode/lifecycle) registered
...
2018-11-28 00:18:31.134 UTC [sccapi] deploySysCC -> INFO 0be system chaincode lscc/(github.com/hyperledger/fabric/core/scc/lscc) deployed
2018-11-28 00:18:31.136 UTC [sccapi] deploySysCC -> INFO 0d6 system chaincode cscc/(github.com/hyperledger/fabric/core/scc/cscc) deployed

Join fabric@lists.hyperledger.org to automatically receive all group messages.