antoniovassell
antoniovassell

Reputation: 1032

Timeout expired while starting chaincode error when instantiating chaincode

When I run the example here: fabric e2e examples it fails at instantiating chaincode. You can see a screenshot here of the error:

enter image description here

I can see that the chaincode instance/container was started but exited shortly after.

enter image description here

Any ideas on why this is happening and how to resolve?

Upvotes: 0

Views: 1904

Answers (1)

Harshita N
Harshita N

Reputation: 11

I had the same issue while testing fabric-samples balance-transfer and fabcar samples, and fabric PTE testing.

Solved it by setting CORE_PEER_CHAINCODELISTENADDRESS to peer's containername:port in the docker compose file.

eg., CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7052

Issue: Chaincode container (which gets created and killed after certain time) log shows below error, when inspected with docker logs CONTAINER-ID.

UTC [shim] userChaincodeStreamGetter -> ERRO 001 x509: cannot validate certificate for 172.18.0.5 because it doesn't contain any IP SANs
error trying to connect to local peer
github.com/hyperledger/fabric/core/chaincode/shim.userChaincodeStreamGetter
    /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:109
github.com/hyperledger/fabric/core/chaincode/shim.Start
    /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:148
main.main
    /chaincode/input/src/github.com/example_cc/go/example_cc.go:199
runtime.main
    /opt/go/src/runtime/proc.go:185
runtime.goexit
    /opt/go/src/runtime/asm_amd64.s:2337
2017-12-26 09:59:52.823 UTC [example_cc0] Errorf -> ERRO 002 Error starting Simple chaincode: error trying to connect to local peer: x509: cannot validate certificate for 172.18.0.5 because it doesn't contain any IP SANs

Upvotes: 1

Related Questions