IBM-Blockchain-Archive / ibm-blockchain-issues

Having issues with the IBM Blockchain Bluemix service? Let us know!
13 stars 12 forks source link

Failure to launch chain code spec #52

Closed steveatkin closed 7 years ago

steveatkin commented 7 years ago

After new chain code has been deployed I get a message that it cannot get the deployment transaction. See message below:

info:

 deploy success [waiting another 50 seconds]

info: c16e2091a54d74a9129712c1c07f7b2277a0a8645fffb2d7c939e508d00f59037f2d407872ca7d78c0eb0a9aea344ec0e2308999fb7cfa1a13accd87650e8389

info: [ibc-js] Deploy Chaincode - Complete [preflight check] 1 : testing if chaincode is ready info: [ibc-js] read - success: jsonrpc=2.0, code=-32003, message=Query failure, data=Error when querying chaincode: Error:Failed to launch chaincode spec(Could not get deployment transaction for c16e2091a54d74a9129712c1c07f7b2277a0a8645fffb2d7c939e508d00f59037f2d407872ca7d78c0eb0a9aea344ec0e2308999fb7cfa1a13accd87650e8389 - LedgerError - ResourceNotFound: ledger: resource not found), id=1475688681790 [preflight check] 1 : failed, trying again [preflight check] 2 : testing if chaincode is ready info: [ibc-js] read - success: jsonrpc=2.0, code=-32003, message=Query failure, data=Error when querying chaincode: Error:Failed to launch chaincode spec(Could not get deployment transaction for c16e2091a54d74a9129712c1c07f7b2277a0a8645fffb2d7c939e508d00f59037f2d407872ca7d78c0eb0a9aea344ec0e2308999fb7cfa1a13accd87650e8389 - LedgerError - ResourceNotFound: ledger: resource not found), id=1475688701261 [preflight check] 2 : failed, trying again [preflight check] 3 : testing if chaincode is ready info: [ibc-js] read - success: jsonrpc=2.0, code=-32003, message=Query failure, data=Error when querying chaincode: Error:Failed to launch chaincode spec(Could not get deployment transaction for c16e2091a54d74a9129712c1c07f7b2277a0a8645fffb2d7c939e508d00f59037f2d407872ca7d78c0eb0a9aea344ec0e2308999fb7cfa1a13accd87650e8389 - LedgerError - ResourceNotFound: ledger: resource not found), id=1475688710340

masterDev1985 commented 7 years ago

The logs you'll want to look at on this one will be the deployment logs. After deploying your chaincode, wait a few minutes and search for the tags 'docker', 'controller', and 'chaincode'. There should be an error somewhere indicating why the deployment failed.

steveatkin commented 7 years ago

The odd thing is that the chain code id does not show up in my dashboard I have the ids for other ones just not this one

screen shot 2016-10-05 at 3 27 46 pm
steveatkin commented 7 years ago

I tried deploying the Marbles chain code example and it does not work either. This problem started today. Yesterday the same code worked. So I suspect there is something else going on.

Here is the log output from trying to deploy the Marble example chain code

ERR - 01:57:15.530 [shim] DEBU : Peer address: a97a6282-3074-4ef7-a1ec-8254d3f9e11f_vp0.us.blockchain.ibm.com:30303 ERR - 01:57:15.595 [shim] DEBU : os.Args returns: [/opt/gopath/bin/d68202400a586b1e7aeaa7202e2d325b423f6ed5adacd21745adae1ca190e36db8f5e46c5726d98a4f4c13e17b8fe0879b4732b24987a3275b1c5b75dc30584a -peer.address=a97a6282-3074-4ef7-a1ec-8254d3f9e11f_vp0.us.blockchain.ibm.com:30303] ERR - 01:57:15.595 [shim] DEBU : Registering.. sending REGISTER ERR - 01:57:15.596 [shim] DEBU : []Received message REGISTERED from shim ERR - 01:57:15.596 [shim] DEBU : []Handling ChaincodeMessage of type: REGISTERED(state:created) ERR - 01:57:15.596 [shim] DEBU : Received REGISTERED, ready for invocations ERR - 01:57:33.040 [shim] DEBU : [d6820240]Received message INIT from shim ERR - 01:57:33.040 [shim] DEBU : [d6820240]Handling ChaincodeMessage of type: INIT(state:established) ERR - 01:57:33.041 [shim] DEBU : Entered state init ERR - 01:57:33.041 [shim] DEBU : [d6820240]Received INIT, initializing chaincode ERR - 01:57:33.042 [shim] DEBU : [d6820240]Inside putstate, isTransaction = true ERR - 01:57:33.042 [shim] DEBU : [d6820240]Sending PUT_STATE ERR - 01:57:33.042 [shim] DEBU : [d6820240]Received message RESPONSE from shim ERR - 01:57:33.042 [shim] DEBU : [d6820240]Handling ChaincodeMessage of type: RESPONSE(state:init) ERR - 01:57:33.042 [shim] DEBU : [d6820240]before send ERR - 01:57:33.042 [shim] DEBU : [d6820240]after send ERR - 01:57:33.042 [shim] DEBU : [d6820240]Received RESPONSE, communicated (state:init) ERR - 01:57:33.042 [shim] DEBU : [d6820240]Received RESPONSE. Successfully updated state ERR - 01:57:33.042 [shim] DEBU : [d6820240]Inside putstate, isTransaction = true ERR - 01:57:33.042 [shim] DEBU : [d6820240]Sending PUT_STATE ERR - 01:57:33.043 [shim] DEBU : [d6820240]Received message RESPONSE from shim ERR - 01:57:33.043 [shim] DEBU : [d6820240]Handling ChaincodeMessage of type: RESPONSE(state:init) ERR - 01:57:33.043 [shim] DEBU : [d6820240]before send ERR - 01:57:33.043 [shim] DEBU : [d6820240]after send ERR - 01:57:33.043 [shim] DEBU : [d6820240]Received RESPONSE, communicated (state:init) ERR - 01:57:33.043 [shim] DEBU : [d6820240]Received RESPONSE. Successfully updated state ERR - 01:57:33.043 [shim] DEBU : [d6820240]Inside putstate, isTransaction = true ERR - 01:57:33.043 [shim] DEBU : [d6820240]Sending PUT_STATE ERR - 01:57:33.044 [shim] DEBU : [d6820240]Received message RESPONSE from shim ERR - 01:57:33.044 [shim] DEBU : [d6820240]Handling ChaincodeMessage of type: RESPONSE(state:init) ERR - 01:57:33.044 [shim] DEBU : [d6820240]before send ERR - 01:57:33.044 [shim] DEBU : [d6820240]after send ERR - 01:57:33.044 [shim] DEBU : [d6820240]Received RESPONSE, communicated (state:init) ERR - 01:57:33.044 [shim] DEBU : [d6820240]Received RESPONSE. Successfully updated state ERR - 01:57:33.044 [shim] DEBU : [d6820240]Init succeeded. Sending COMPLETED ERR - 01:57:33.044 [shim] DEBU : [d6820240]Move state message COMPLETED ERR - 01:57:33.044 [shim] DEBU : [d6820240]Handling ChaincodeMessage of type: COMPLETED(state:init) ERR - 01:57:33.044 [shim] DEBU : [d6820240]send state message COMPLETED

masterDev1985 commented 7 years ago

Sorry if it wasn't clear, but the logs I was referring to were your peer logs. The network mentioned in this latest log appears to be functioning properly this morning. I see some premature execution logs like the one below, but these can be resolved by waiting a few minutes after chaincode is deployed.

ERR - 12:23:27.171 [rest] processChaincodeInvokeOrQuery -> ERRO 2163f Error when querying chaincode: Error:Failed to launch chaincode spec(premature execution - chaincode (804f376dfad848a353cb61661661bdd38fc175ce6dc2889e3bbc23c28664924c8312b0919cdc57801727f8d607c7f885faca9b741e0f56e0ba5d4ccdf0b3b804) is being launched)

I did not see that "ResourceNotFound" error in your logs, but this could simply be due to log rotation. Also, the logs you posted must be from a chaincode container that deployed successfully. Could you try deploying the marbles chaincode again? I'd like to see if we can reproduce the error from before.

steveatkin commented 7 years ago

I did some more testing and this is what I am seeing. After I do an initial deploy and I get a chain code ID and then wait approximately one to two hours, and then do another deploy it appears to work. So my guess is that there is some issue related to the deployment of the chain code container. It appears that the container is up, but it cannot be reached. I will do some more testing later today and capture the peer logs.

steveatkin commented 7 years ago

I did some testing today and once again chain code will not deploy and logs are not being generated. Here is the id for the code:

bbafb19bd73a8f9ba24b5864f0c57e68f9d94658a190e3fd7a463bdd5f8a35a08b3b9b497a0e31f94ace6d575789c562e46c60dea5119e2bb342731756c842a5

I deployed this and the code stays in the created state with no logs ever being created. I tried multiple times and I waited several hours and no luck. I do not get any errors during the deployment other than the error querying chain code which I have been seeing for several days now:

success: jsonrpc=2.0, code=-32003, message=Query failure, data=Error when querying chaincode: Error:Failed to launch chaincode spec(premature execution - chaincode (bbafb19bd73a8f9ba24b5864f0c57e68f9d94658a190e3fd7a463bdd5f8a35a08b3b9b497a0e31f94ace6d575789c562e46c60dea5119e2bb342731756c842a5) is being launched), id=1476026705523

screen shot 2016-10-09 at 11 30 44 am
dshuffma-ibm commented 7 years ago

This might be because of the on going congestion/capacity issues we have been experiencing. It also could be unrelated, but its a little hard to distinguish at the moment. Its probably best to hold off on using your networks until we have increased our capacity. Then delete this one and try again.

We will be posting status messages when its resolved.

dhyey20 commented 7 years ago

This issues should be resolved in the new version that was launched on 10-Nov. If you still see any issues please reopen.