Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
730 views
in Technique[技术] by (71.8m points)

docker - endorsement failure during invoke :"error in simulation: error starting container: "chaincode"executable file not found in $PATH: unknown"

I have been facing an error while trying to invoke InitLedger in Hyperledger Fabric. The network downs, ups and the chaincode properly gets deployed.

  • Fabric Version: 2.2
  • Go: 1.15.6
# Command
peer chaincode invoke -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --tls --cafile bc/fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n basic --peerAddresses localhost:7051 --tlsRootCertFiles bc/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt --peerAddresses localhost:9051 --tlsRootCertFiles /root/bc/fabric-samples/test-network/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt -c '{"function":"InitLedger","Args":[]}'
# Error Log
Error: endorsement failure during invoke. response: status:500 message:"error in simulation: failed to execute transaction 1af4...: could not launch chaincode basic_1.0:25..: error starting container: error starting container: API error (400): OCI runtime create failed: container_linux.go:370: starting container process caused: exec: "chaincode": executable file not found in $PATH: unknown"

I would greatly appreciate the solution.

question from:https://stackoverflow.com/questions/65870379/endorsement-failure-during-invoke-error-in-simulation-error-starting-containe

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I found out that the GOPATH was not set properly. After setting GOPATH along with PATH, now it runs smoothly.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...