Closed happilymarrieddad closed 5 years ago
Oh, when I try to pull that image locally it pulls and builds just fine.
Nick, is it working fine for you?
@maheshwarishikha no, I can't get it to instantiate the chaincode for some reason.. very frustrating.
Here is the dump from the peer
2019-05-08 22:48:09.263 UTC [gossip.discovery] handleMsgFromComm -> DEBU 5839 Exiting
2019-05-08 22:48:09.263 UTC [gossip.gossip] handleMessage -> DEBU 583a Exiting
2019-05-08 22:48:09.696 UTC [peer.chaincode.dev-org1-peer0-assets-0] func2 -> INFO 583b Error starting chaincode sample: error trying to connect to local peer: context deadline exceeded2019-05-08 22:48:09.695 UTC [shim] userChaincodeStreamGetter -> ERRO 001 context deadline exceeded
2019-05-08 22:48:09.696 UTC [peer.chaincode.dev-org1-peer0-assets-0] func2 -> INFO 583c error trying to connect to local peer
2019-05-08 22:48:09.696 UTC [peer.chaincode.dev-org1-peer0-assets-0] func2 -> INFO 583d github.com/hyperledger/fabric/core/chaincode/shim.userChaincodeStreamGetter
2019-05-08 22:48:09.696 UTC [peer.chaincode.dev-org1-peer0-assets-0] func2 -> INFO 583e /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:112
2019-05-08 22:48:09.696 UTC [peer.chaincode.dev-org1-peer0-assets-0] func2 -> INFO 583f github.com/hyperledger/fabric/core/chaincode/shim.Start
2019-05-08 22:48:09.696 UTC [peer.chaincode.dev-org1-peer0-assets-0] func2 -> INFO 5840 /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:151
2019-05-08 22:48:09.696 UTC [peer.chaincode.dev-org1-peer0-assets-0] func2 -> INFO 5841 main.main
2019-05-08 22:48:09.696 UTC [peer.chaincode.dev-org1-peer0-assets-0] func2 -> INFO 5842 /chaincode/input/src/assets/assets.go:180
2019-05-08 22:48:09.696 UTC [peer.chaincode.dev-org1-peer0-assets-0] func2 -> INFO 5843 runtime.main
2019-05-08 22:48:09.696 UTC [peer.chaincode.dev-org1-peer0-assets-0] func2 -> INFO 5844 /opt/go/src/runtime/proc.go:201
2019-05-08 22:48:09.696 UTC [peer.chaincode.dev-org1-peer0-assets-0] func2 -> INFO 5845 runtime.goexit
2019-05-08 22:48:09.696 UTC [peer.chaincode.dev-org1-peer0-assets-0] func2 -> INFO 5846 /opt/go/src/runtime/asm_amd64.s:1333
2019-05-08 22:48:09.748 UTC [dockercontroller] func2 -> INFO 5847 Container dev-org1-peer0-assets-0 has closed its IO channel
2019-05-08 22:48:09.921 UTC [chaincode] Launch -> DEBU 5848 stopping due to error while launching: container exited with 0
github.com/hyperledger/fabric/core/chaincode.(*RuntimeLauncher).Launch.func1
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/runtime_launcher.go:63
runtime.goexit
/opt/go/src/runtime/asm_amd64.s:1333
chaincode registration failed
2019-05-08 22:48:09.921 UTC [container] lockContainer -> DEBU 5849 waiting for container(assets-0) lock
2019-05-08 22:48:09.921 UTC [container] lockContainer -> DEBU 584a got container (assets-0) lock
2019-05-08 22:48:09.921 UTC [dockercontroller] stopInternal -> DEBU 584b stopping container id=dev-org1-peer0-assets-0
2019-05-08 22:48:09.925 UTC [dockercontroller] stopInternal -> DEBU 584c stop container result error="Container not running: dev-org1-peer0-assets-0"
2019-05-08 22:48:09.925 UTC [dockercontroller] stopInternal -> DEBU 584d killing container id=dev-org1-peer0-assets-0
2019-05-08 22:48:09.926 UTC [dockercontroller] stopInternal -> DEBU 584e kill container result id=dev-org1-peer0-assets-0 error="API error (500): Cannot kill container dev-org1-peer0-assets-0: Container 16544a7a7727a712a50fa3e02576bc34caf1b50b787334057cccb33280a0e528 is not running"
2019-05-08 22:48:09.926 UTC [dockercontroller] stopInternal -> DEBU 584f removing container id=dev-org1-peer0-assets-0
2019-05-08 22:48:09.933 UTC [dockercontroller] stopInternal -> DEBU 5850 remove container result id=dev-org1-peer0-assets-0 error=null
2019-05-08 22:48:09.933 UTC [container] unlockContainer -> DEBU 5851 container lock deleted(assets-0)
2019-05-08 22:48:09.933 UTC [chaincode] Launch -> DEBU 5852 launch complete
2019-05-08 22:48:09.933 UTC [chaincode] Deregister -> DEBU 5853 deregister handler: assets:0
2019-05-08 22:48:09.933 UTC [endorser] callChaincode -> INFO 5854 [mainchannel][4a2f1493] Exit chaincode: name:"lscc" (31330ms)
2019-05-08 22:48:09.933 UTC [endorser] SimulateProposal -> ERRO 5855 [mainchannel][4a2f1493] failed to invoke chaincode name:"lscc" , error: container exited with 0
github.com/hyperledger/fabric/core/chaincode.(*RuntimeLauncher).Launch.func1
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/runtime_launcher.go:63
runtime.goexit
/opt/go/src/runtime/asm_amd64.s:1333
chaincode registration failed
2019-05-08 22:48:09.934 UTC [endorser] SimulateProposal -> DEBU 5856 [mainchannel][4a2f1493] Exit
2019-05-08 22:48:09.934 UTC [lockbasedtxmgr] Done -> DEBU 5857 Done with transaction simulation / query execution [4a2f14931ee90b34584f8e723f0851111c2c08e460e7459eb2141b76d104f217]
2019-05-08 22:48:09.934 UTC [endorser] func1 -> DEBU 5858 Exit: request from 100.96.35.73:54162
2019-05-08 22:48:09.934 UTC [comm.grpc.server] 1 -> INFO 5859 unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=100.96.35.73:54162 grpc.code=OK grpc.call_duration=31.331518586s
2019-05-08 22:48:09.936 UTC [grpc] infof -> DEBU 585a transport: loopyWriter.run returning. connection error: desc = "transport is closing"
2019-05-08 22:48:09.936 UTC [grpc] warningf -> DEBU 585b transport: http2Server.HandleStreams
I'm assuming that it can't connect to docker or something... very weird
OK, I feel really dumb....
- name: CORE_PEER_CHAINCODELISTENADDRESS
value: "localhost:7052"
Notice anything.... wow... Everything is working as it should.
Oh I forgot to put the "solution" if you can even say that...
- name: CORE_PEER_CHAINCODELISTENADDRESS
value: "0.0.0.0:7052"
Glad to hear, it worked for you. Did you try using minikube and added in your environment? As for Kubernetes on Cloud it is not required.
@maheshwarishikha yea I was doing it on AWS... I feel really dumb... it works perfectly now...
I meet the same problem today. But I can't understand your solution, what does
@seuviceversa hey man, yea it's in the config for the peer. I was using "localhost" instead of "0.0.0.0" for the address in that ENV variable
Thanks a lot! I have fixed it. I changed the name of directory without updating that in the docker compose file.
what do it ?hi help me
@sunlidong , Not sure what issue you are facing...please provide details. Please open a new issue for your error....if you update an already closed issue, then most likely it gets ignored. Thanks.
when I instantiated chaincode ...I got this error Error: could not assemble transaction, err proposal response was not successful, error code 500, msg chaincode registration failed: container exited with 0
pls help me to resolve it...thanks in advance
@Chinna2204 can you please provide your setup? It's most likely either your docker.sock file isn't mounted or you don't have the chaincode listen address. Thanks!
Oh I forgot to put the "solution" if you can even say that...
- name: CORE_PEER_CHAINCODELISTENADDRESS value: "0.0.0.0:7052"
can u eleborate your solution plssss
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 errorsDocker Container
Peer Container
Command line where I'm running the command
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!