Ashish yadav
Ashish yadav

Reputation: 117

Why Chaincode instantiate giving error trying to connect to local peer?

Hi Everyone I have successfully installed the chaincode on my all peers. So when I am trying to instantiate chaincode it is giving me following error which are mentioned below. Please help me with this , I am new to this thing so may be i missed somewhere something. I have referred some of the question related to this but i did not get anything.

First Command -

root@7485ef4909d6:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode instantiate -o orderer.indirasoft.com:7050 -C $CHANNEL_NAME -n fabcar -v 1.0 -c '{"Args":[""]}' -P "OR ('Org1MSP.member','Org2MSP.member','Org3MSP.member','Org4MSP.member','Org5MSP.member')" 

Error -

2018-10-29 18:01:51.158 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc 2018-10-29 18:01:51.158 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc Error: could not assemble transaction, err proposal response was not successful, error code 500, msg timeout expired while starting chaincode fabcar:1.0 for transaction

Second Command -

root@7485ef4909d6:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode instantiate -o orderer.indirasoft.com:7050 --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/indirasoft.com/orderers/orderer.indirasoft.com/msp/tlscacerts/tlsca.indirasoft.com-cert.pem -C $CHANNEL_NAME -n fabcar -v 1.0 -c '{"Args":[""]}' -P "OR ('Org1MSP.member','Org2MSP.member','Org3MSP.member','Org4MSP.member','Org5MSP.member')"

Error -

2018-10-29 17:50:49.094 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc 2018-10-29 17:50:49.094 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc Error: could not assemble transaction, err proposal response was not successful, error code 500, msg timeout expired while starting chaincode fabcar:1.0 for transaction

It use to create on container but it goes to excited mode. Below is the log for that container.

> 2018-10-29 18:02:10.883 UTC [shim] userChaincodeStreamGetter -> ERRO 001 context deadline exceeded
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:112
github.com/hyperledger/fabric/core/chaincode/shim.Start
    /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:151
main.main
    /chaincode/input/src/github.com/chaincode/fabcar/go/fabcar.go:200
runtime.main
    /opt/go/src/runtime/proc.go:198
runtime.goexit
    /opt/go/src/runtime/asm_amd64.s:2361
Error creating new Smart Contract: error trying to connect to local peer: context deadline exceeded

All docker containers -

See Here All docker containers running

Use below link to seer Peer0.org1 complete log - Peer Log Check here

Use below link to see docker_compose file - Docker-compose.yaml

Use below link to see support file i.e base -

Base.yaml

How can i solve this issue? Thanks in advance.

Upvotes: 0

Views: 981

Answers (1)

user8209696
user8209696

Reputation: 44

Both peer4 and peer5 are exposing the same port 10056. Not sure if that's the root cause but is certainly first thing to fix.

Upvotes: 1

Related Questions