简体   繁体   中英

error on IBM Blockchain

When I import and run my smart contract on the IBM Blockchain, it looks normal and runs successfully. However, I see the following error again and again:

[31m07:51:14.774 [dockercontroller] deployImage -> ERRO 2d8f [0m Error building images: The command '/bin/sh -c go install github.com/hyperledger/fabric/examples/chaincode/go/f607ca3e-4259-4c1b-bba9-a4361f08acd7 && cp src/github.com/hyperledger/fabric/peer/core.yaml $GOPATH/bin && mv $GOPATH/bin/f607ca3e-4259-4c1b-bba9-a4361f08acd7 $GOPATH/bin/d9694398ca6ada1e74ef40cbea15348c60626156b89f3c4b2e621f8c6625c65b4d9fda8fc63bdc208a4db1595d7ca2d4b8b4601ac5eeb1f0db35a8551a94403a' returned a non-zero code: 2

[31m07:50:40.956 [dockercontroller] deployImage -> ERRO 2d86 [0m Error building images: The command '/bin/sh -c go install github.com/hyperledger/fabric/examples/chaincode/go/f607ca3e-4259-4c1b-bba9-a4361f08acd7 && cp src/github.com/hyperledger/fabric/peer/core.yaml $GOPATH/bin && mv $GOPATH/bin/f607ca3e-4259-4c1b-bba9-a4361f08acd7 $GOPATH/bin/d9694398ca6ada1e74ef40cbea15348c60626156b89f3c4b2e621f8c6625c65b4d9fda8fc63bdc208a4db1595d7ca2d4b8b4601ac5eeb1f0db35a8551a94403a' returned a non-zero code: 2

[31m07:50:34.481 [dockercontroller] deployImage -> ERRO 2d84 [0m Error building images: The command '/bin/sh -c go install github.com/hyperledger/fabric/examples/chaincode/go/f607ca3e-4259-4c1b-bba9-a4361f08acd7 && cp src/github.com/hyperledger/fabric/peer/core.yaml $GOPATH/bin && mv $GOPATH/bin/f607ca3e-4259-4c1b-bba9-a4361f08acd7 $GOPATH/bin/d9694398ca6ada1e74ef40cbea15348c60626156b89f3c4b2e621f8c6625c65b4d9fda8fc63bdc208a4db1595d7ca2d4b8b4601ac5eeb1f0db35a8551a94403a' returned a non-zero code: 2

[31m07:45:46.971 [rest] processChaincodeInvokeOrQuery -> ERRO 2d4d [0m Error when querying chaincode: Error:Failed to launch chaincode spec(Error starting container: The command '/bin/sh -c go install github.com/hyperledger/fabric/examples/chaincode/go/6cd0d810-a766-43c0-b183-aa9c3e063d03 && cp src/github.com/hyperledger/fabric/peer/core.yaml $GOPATH/bin && mv $GOPATH/bin/6cd0d810-a766-43c0-b183-aa9c3e063d03 $GOPATH/bin/62730368d5c320db93a8bf3bc07f0b3a861d86e0983bbb37d081ada2fc5118b51bc19c16e08bac6b7d4a6438cc9d022c7b8c0763f4166546c697f470ffda7952' returned a non-zero code: 2)

[31m07:45:46.971 [dockercontroller] deployImage -> ERRO 2d4c [0m Error building images: The command '/bin/sh -c go install github.com/hyperledger/fabric/examples/chaincode/go/6cd0d810-a766-43c0-b183-aa9c3e063d03 && cp src/github.com/hyperledger/fabric/peer/core.yaml $GOPATH/bin && mv $GOPATH/bin/6cd0d810-a766-43c0-b183-aa9c3e063d03 $GOPATH/bin/62730368d5c320db93a8bf3bc07f0b3a861d86e0983bbb37d081ada2fc5118b51bc19c16e08bac6b7d4a6438cc9d022c7b8c0763f4166546c697f470ffda7952' returned a non-zero code: 2

Anyone know what happens? Thank you.

This basically says the chaincode did not build for some reason. Wish we had a way to get the actual failure but there's no easy way to get such errors from docker build (AFAIK anyway).

Couple of things to check. (1) does it build in your local env (say when running peer in --peer-chaincodedev mode) and (2) A typical failure would be due to an import that's not in the fabric. It might build in your local env where the import might be available somehow but would fail in the docker env.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM