-
Notifications
You must be signed in to change notification settings - Fork 64
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
Query failed #1
Comments
@maruthi7937 - this is occurring because the program queries for a value before the container has fully started. Go to your console dashboard in bluemix and wait until you see all 4 peers with 3 blocks - genesis, deployment and invocation. The containers can occasionally take quite a while to start on the development networks. Once they all have 3 blocks, this will confirm that the chaincode container for example_02 is running on all four peers. Then try running the program again. You will notice that even though you received a query error, the first invocation actually still works. For example, you leave the standard arguments for a and b (100, 200) and then move 1 unit from a to b. The second time you run the program and the query succeeds, you will see "a" with a value of 98. Once your containers are started, you can alter your DeployWaitTime to a few seconds and then start playing with the arguments. Hope this helps |
I am just running the code i.e provided in the sample https://github.com/IBM-Blockchain/SDK-Demo That code should have a logic to wait until deployment completes then query function has to execute right? On BlockChain Dashboard validating peer 0, 1, 2 shows stopped. Any reason? Where can I see 3 blocks - genesis, deployment and invocation? |
yes, conceptually that would be the ideal scenario. However, this code simply relies on the DeployWaitTime value. We suggest altering this time to something like 120 seconds, but that will likely still lead to a query failure. Like I said in my previous post, it sometimes takes quite a while for the peers to grab all of the necessary files and start the containers. This time has been anywhere from 1-10 minutes . Once they have these files stored locally, everything will work swimmingly. I suggest killing this network and deleting your keyValStore and restarting from scratch. Unfortunately you just need to wait until you see the containers running on Bluemix before you'll see a successful query. |
Hmm. Thanks for the info. I will try to do the same from the scratch. But consider in avg user view..I saw few issues on blockchain services, All suggestions are restart from the scratch...That's not the solution right. |
Got this error when trying to do deploy the chaincode usind node sdk
using the tutorial at https://new-console.ng.bluemix.net/docs/services/blockchain/etn_sdk.html#nodesample
data": "Error when querying chaincode: Error:Failed to launch chaincode spec(Error starting container: API error (500): Error: image library/72eaffaf-7ad5-4d8e-8ab3-4131c6a11d17-vp1-b07fe2bc5f79dbf4f1f38bb8272e98a2dc70340323e93892804f820c6d58a4c8 not found\n)"
},
I tried to redeploy it but getting same error again.
I see lot of people faced the same issue. Any fix??
The text was updated successfully, but these errors were encountered: