blockchain-network-on-kubernetes: Not able to instantiate chaincode

Hello everybody,

NOTE: The network works perfectly all the way through my API interacting with a working network in docker-compose. The network seems to work perfectly with no errors up until attempting to instantiate the chaincode.

I’ve been trying to build a kubernetes cluster with hyperledger and everything works great except I can’t seem to instantiate my chaincode. At first it was saying there wasn’t a /var/run/docker.sock available so I added a docker container via your example and now I’m getting the following errors

Docker Container

time="2019-05-06T06:12:47.167226478Z" level=warning msg="Your kernel does not support swap limit capabilities,or the cgroup is not mounted. Memory limited without swap."
time="2019-05-06T06:13:01.521766588Z" level=info msg="Attempting next endpoint for pull after error: failed to register layer: ApplyLayer exit status 1 stdout:  stderr: errno 524"
time="2019-05-06T06:13:02.803021651Z" level=info msg="Pull session cancelled"
time="2019-05-06T06:13:03.233898331Z" level=error msg="Not continuing with pull after error: context canceled"
time="2019-05-06T06:13:03.273022662Z" level=warning msg="could not write error response: write tcp 100.96.29.99:2375->100.96.24.40:52048: write: broken pipe"

Peer Container

2019-05-06 06:08:34.181 UTC [comm.grpc.server] 1 -> INFO 06c unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=100.96.29.104:39364 grpc.code=OK grpc.call_duration=14.250358185s
2019-05-06 06:12:47.083 UTC [endorser] callChaincode -> INFO 06d [mainchannel][ad343f9a] Entry chaincode: name:"lscc" 
2019-05-06 06:12:47.176 UTC [chaincode.platform.golang] GenerateDockerBuild -> INFO 06e building chaincode with ldflagsOpt: '-ldflags "-linkmode external -extldflags '-static'"'
2019-05-06 06:13:01.524 UTC [chaincode.platform] func1 -> ERRO 06f Failed to generate platform-specific docker build: Failed to pull hyperledger/fabric-ccenv:latest: failed to register layer: ApplyLayer exit status 1 stdout:  stderr: errno 524
2019-05-06 06:13:01.524 UTC [dockercontroller] deployImage -> ERRO 070 Error building image: Post http://dev-docker:2375/build?t=dev-org1-peer0-assets-0-8c640fcda93c23e81c240e2f05a89be99b81bfc3bdcdb03dd0a0f40319242665: Failed to generate platform-specific docker build: Failed to pull hyperledger/fabric-ccenv:latest: failed to register layer: ApplyLayer exit status 1 stdout:  stderr: errno 524
2019-05-06 06:13:01.524 UTC [dockercontroller] deployImage -> ERRO 071 Build Output:
********************

********************
2019-05-06 06:13:01.538 UTC [endorser] callChaincode -> INFO 072 [mainchannel][ad343f9a] Exit chaincode: name:"lscc"  (14455ms)
2019-05-06 06:13:01.538 UTC [endorser] SimulateProposal -> ERRO 073 [mainchannel][ad343f9a] failed to invoke chaincode name:"lscc" , error: Post http://dev-docker:2375/build?t=dev-org1-peer0-assets-0-8c640fcda93c23e81c240e2f05a89be99b81bfc3bdcdb03dd0a0f40319242665: Failed to generate platform-specific docker build: Failed to pull hyperledger/fabric-ccenv:latest: failed to register layer: ApplyLayer exit status 1 stdout:  stderr: errno 524

Command line where I’m running the command

root@dev-cli-org1-peer0-deployment-fcb494b55-5wwrm:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode instantiate -C mainchannel -n assets -v 0 -c '{"Args":[]}' -o dev-orderer0:7050 --tls --cafile=/etc/hyperledger/orderers/msp/tlscacerts/localhost-7300.pem
2019-05-06 06:12:47.080 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2019-05-06 06:12:47.080 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
Error: could not assemble transaction, err proposal response was not successful, error code 500, msg error starting container: error starting container: Post http://dev-docker:2375/build?t=dev-org1-peer0-assets-0-8c640fcda93c23e81c240e2f05a89be99b81bfc3bdcdb03dd0a0f40319242665: Failed to generate platform-specific docker build: Failed to pull hyperledger/fabric-ccenv:latest: failed to register layer: ApplyLayer exit status 1 stdout:  stderr: errno 524

I’m assuming that it has something to do with either the cli container not being able to start a chaincode container and/or the docker container not being able to do it. Is there something I’m doing wrong? I can provide all the files but there are a ton and I didn’t want to post all that here. I could really use some help here. Thanks!

  • Nick

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 16 (3 by maintainers)

Most upvoted comments

Oh I forgot to put the “solution” if you can even say that…

 - name: CORE_PEER_CHAINCODELISTENADDRESS
   value: "0.0.0.0:7052"