Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to invoke chaincode. #36

Open
ashishxooa opened this issue Apr 28, 2019 · 2 comments
Open

Not able to invoke chaincode. #36

ashishxooa opened this issue Apr 28, 2019 · 2 comments

Comments

@ashishxooa
Copy link

ashishxooa commented Apr 28, 2019

Hi team,

First of all, great work with the charts. Setting up a the nw has become so much easy now.

However I am having some difficulties with invoking the chaincode. I have my peers joined the channel and also have a chaincode installed on it, instantiated it. But when I trying to invoke the chaincode

I am getting this error
Error: endorsement failure during invoke. response: status:500 message:"make sure the chaincode mycc has been successfully instantiated and try again: chaincode mycc not found"

but the chaincode container is up and running. but its not resgistering itself somehow back to the peer container.


root@ip-172-20-43-120:/home/admin# docker logs a4598dfba0f9

> [email protected] start /usr/local/src
> node chaincode_example02.js "--peer.address" "100.96.5.25:7052"

2019-04-28T21:28:34.196Z info [lib/chaincode.js]                                  info: Registering with peer 100.96.5.25:7052 as chaincode "mycc:1.0" {"timestamp":"2019-04-28T21:28:34.196Z"}
2019-04-28T21:28:34.209Z info [lib/handler.js]                                    info: Successfully registered with peer node. State transferred to "established" {"timestamp":"2019-04-28T21:28:34.209Z"}
2019-04-28T21:28:34.210Z info [lib/handler.js]                                    info: Successfully established communication with peer node. State transferred to "ready" {"timestamp":"2019-04-28T21:28:34.210Z"}
========= example02 Init =========
{ fcn: 'init', params: [ 'a', '100', 'b', '200' ] }
2019-04-28T21:28:34.218Z info [lib/handler.js]                                    info: [mychannel-96e6e998] Calling chaincode Init() succeeded. Sending COMPLETED message back to peer {"timestamp":"2019-04-28T21:28:34.218Z"}

My guess here is something wrong with any of the env variables of the peer or k8 networking.

I have seen your demos are they always stop at joining the channel, none covered about invoking a chaincode. If you can please help here.

@ashishxooa ashishxooa changed the title Not able to instantiate chaincode. Not able to invoke chaincode. Apr 28, 2019
@rsbhardwaj
Copy link

Please share orderer and peer logs for more clarity.

Ignore if resolved.

@ashishxooa
Copy link
Author

Hi @rsbhardwaj

There aren't other logs apart from the ones I already shared. When I instantiate it CC container starts without any issue.

When I invoke.

I get this.

root@peer4-hlf-peer-7cdf7499dd-xmlzq:/# peer chaincode invoke -o ord2.dev.test.com:443 --tls --cafile /var/hyperledger/tls/server/cert/cacert.pem -C mychannel10 -n mycc -c '{"Args":["invoke","a","b","10"]}'
2019-05-08 12:17:33.110 UTC [main] InitCmd -> WARN 001 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2019-05-08 12:17:33.126 UTC [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
Error: endorsement failure during invoke. response: status:500 message:"make sure the chaincode mycc has been successfully instantiated and try again: chaincode mycc not found"

Orderer logs only this much:

2019-05-08 12:28:24.853 UTC [comm.grpc.server] 1 -> INFO 039 streaming call completed {"grpc.start_time": "2019-05-08T12:28:24.847Z", "grpc.service": "orderer.AtomicBroadcast", "grpc.method": "Broadcast", "grpc.peer_address": "100.96.7.7:33002", "grpc.code": "OK", "grpc.call_duration": "6.327073ms"}

And nothing in the chain code logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants