为什么Chaincode实例化给出尝试连接到本地对等方的错误? [英] Why Chaincode instantiate giving error trying to connect to local peer?
问题描述
大家好,我已经在所有同龄人上成功安装了链码.因此,当我尝试实例化chaincode时,它给了我以下提到的错误.请帮助我,这是我的新手,所以我可能在某处错过了.我已经提到了与此有关的一些问题,但是我什么也没得到.
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.
第一个命令-
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')"
错误-
2018-10-29 18:01:51.158 UTC [chaincodeCmd] checkChaincodeCmdParams-> INFO 001使用默认escc 2018-10-29 18:01:51.158 UTC [chaincodeCmd] checkChaincodeCmdParams->信息002使用默认vscc错误:可以 未合并交易,错误的提案响应未成功, 错误代码500,启动Chaincode时味精超时已过期 fabcar:1.0进行交易
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
第二个命令-
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')"
错误-
2018-10-29 17:50:49.094 UTC [chaincodeCmd] checkChaincodeCmdParams-> INFO 001使用默认escc 2018-10-29 17:50:49.094 UTC [chaincodeCmd] checkChaincodeCmdParams->信息002使用默认vscc错误:可以 未合并交易,错误的提案响应未成功, 错误代码500,启动Chaincode时味精超时已过期 fabcar:1.0进行交易
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
所有docker容器-
All docker containers -
使用下面的链接查看Peer0.org1完整日志- 对等日志此处
Use below link to seer Peer0.org1 complete log - Peer Log Check here
使用下面的链接查看docker_compose文件- Docker-compose.yaml
Use below link to see docker_compose file - Docker-compose.yaml
使用下面的链接查看支持文件,即基础资料-
Use below link to see support file i.e base -
我该如何解决这个问题?预先感谢.
How can i solve this issue? Thanks in advance.
推荐答案
peer4和peer5都公开了相同的端口10056.不确定这是否是根本原因,但肯定是第一要解决的问题.
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.
这篇关于为什么Chaincode实例化给出尝试连接到本地对等方的错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!