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

Failed to launch chaincode spec(Error starting container: API error (500) #15

Closed
kamraanki opened this issue May 16, 2016 · 21 comments
Closed

Comments

@kamraanki
Copy link

hi i am getting following error while deploying chaincode

[ibc-js] query - failure: 400 {"Error": "Error:Failed to launch chaincode spec(Error starting container: API error (500): Error: image library/dev-b44bffa8-4752-4a99-93d9-cae3f4350947_vp1-da54a9650fe87e2fa433c70d1082328a6b9984bbe9d22dfc10513c254ee757aa36e97528613669df0204321d068b0ac0f8d57b8a2a99cde74d79b92fc6d15484 not found
)"}
papers error { name: 'query() error',
code: 400,
details: '{"Error": "Error:Failed to launch chaincode spec(Error starting container: API error (500): Error: image library/dev-b44bffa8-4752-4a99-93d9-cae3f4350947_vp1-da54a9650fe87e2fa433c70d1082328a6b9984bbe9d22dfc10513c254ee757aa36e97528613669df0204321d068b0ac0f8d57b8a2a99cde74d79b92fc6d15484 not found\n)"}' }
[ibc-js] query - failure: 400 {"Error": "Error:Failed to launch chaincode spec(Error starting container: API error (500): Error: image library/dev-b44bffa8-4752-4a99-93d9-cae3f4350947_vp1-da54a9650fe87e2fa433c70d1082328a6b9984bbe9d22dfc10513c254ee757aa36e97528613669df0204321d068b0ac0f8d57b8a2a99cde74d79b92fc6d15484 not found
)"}
papers error { name: 'query() error',
code: 400,
details: '{"Error": "Error:Failed to launch chaincode spec(Error starting container: API error (500): Error: image library/dev-b44bffa8-4752-4a99-93d9-cae3f4350947_vp1-da54a9650fe87e2fa433c70d1082328a6b9984bbe9d22dfc10513c254ee757aa36e97528613669df0204321d068b0ac0f8d57b8a2a99cde74d79b92fc6d15484 not found\n)"}' }
[ibc-js] Chain Stats - success
[ibc-js] query - failure: 400 {"Error": "Error:Failed to launch chaincode spec(Error starting container: API error (500): Error: image library/dev-b44bffa8-4752-4a99-93d9-cae3f4350947_vp1-da54a9650fe87e2fa433c70d1082328a6b9984bbe9d22dfc10513c254ee757aa36e97528613669df0204321d068b0ac0f8d57b8a2a99cde74d79b92fc6d15484 not found
)"}
company error { name: 'query() error',
code: 400,
details: '{"Error": "Error:Failed to launch chaincode spec(Error starting container: API error (500): Error: image library/dev-b44bffa8-4752-4a99-93d9-cae3f4350947_vp1-da54a9650fe87e2fa433c70d1082328a6b9984bbe9d22dfc10513c254ee757aa36e97528613669df0204321d068b0ac0f8d57b8a2a99cde74d79b92fc6d15484 not found\n)"}' }

@mastersingh24
Copy link
Contributor

@kamraanki - how are you deploying the app / chaincode?

@kamraanki
Copy link
Author

i deployed app on my local environment. just clone the cp-web git repository and copy mycreds.json from IBM bluemix. previously it was working fine but its giving above error now.

@masterDev1985
Copy link
Contributor

When I deployed the cp chaincode this morning, the ID that was returned started with 2450c95bc, but I can see that your demo is trying to use chaincode with a different ID (da54a965...). What chaincode are you attempting to deploy/invoke?

@masterDev1985
Copy link
Contributor

Any updates on this issue, @kamraanki

@kamraanki
Copy link
Author

Hey @masterDev1985 I am not getting this error now. but did not found root cause for the same. I am trying to find out that.

@sirishonline
Copy link

Getting the following error
When I call this function on new deployment,

chaincode.query.read(['_marbleindex']

error: { name: 'query() error',
code: 400,
details: '{"Error": "Error:Failed to launch chaincode spec(Error starting container: API error (500): Error: image library/dev-3939016b-d70c-4a46-b754-dcc10d9ceb87_vp1-c29ff1807036492ec8602bb935cee8cc7cb6a45eba307aa642bed12ceceb9dc997e54edd6584936e3976b54125f94a931527494284360aa88bd9ea051aab2da1 not found\n)"}' }

@masterDev1985
Copy link
Contributor

I know this says that it's a query error, but the message indicates that something went wrong with the deployment of your chaincode. Could you try redeploying the demo and seeing what happens?

@himanshutyagi36
Copy link

hey, I'm getting the same error. I'm editing the asset_management example, the deployment and invoke are working, but when I run queryspec from swagger API, the get this error. Did you find out the cause for this ?

@masterDev1985
Copy link
Contributor

@tortuga90 The "success" that comes back on a deploy or an invoke are really just indicators that the transaction was submitted to the peer and don't actually indicate that the deploy or invoke was finished. You'll notice that in the CP and marbles demos, our SDK waits about 90 seconds after deploying chaincode before querying or invoking. This delay gives the peers time to start up a container for the chaincode that we deploy. If you try to interact with chaincode before the container has started, it can put your chaincode in a weird state. My suggestion would be to increase the delay between when you deploy the chaincode and when you invoke or query on it.

@anmolhanda
Copy link

After running the peer and setting up the network , when i deploy the chaincode its working fine, invoke is also happening. But whenever i try to query it, i get this message, can you tell me what i am doing wrong
{
"jsonrpc": "2.0"
"error": {
"code": -32003
"message": "Query failure"
"data": "Error when querying chaincode: Error:Failed to launch chaincode spec(Could not get deployment transaction for anmol2 - LedgerError - ResourceNotFound: ledger: resource not found)"
}-
"id": 2
}

@mrshah-at-ibm
Copy link
Contributor

@anmolhanda What the error means is the deploy was not successful to start chaincode container.

There can be a few reasons why this might happen:

  1. The chaincode doesn't compile
  2. Some problem with the docker endpoint mentioned in vm.endpoint

Can you post some details on if you are using a local infrastructure or bluemix? Also, if you are making any changes to the CP-Web demo chaincode.

Hope I can be helpful.

@git123456
Copy link

git123456 commented Aug 18, 2016

Hi,

I do have the same problem today. Again no changes made on the original codes downloaded from github, also it is compiled successfully. I would assume the deployment was completed successfully because the 'invoke' works but not the 'query', again this is on bluemix.

BTW, the program is BlueMix sample/tutorial program named learn-chaincode

@ethanpreneur
Copy link

It seems the same problem for me with bluemix.

"data": "Error when querying chaincode: Error:Failed to launch chaincode spec(Error starting container: API error (500): Error: image library/19afa1f7-393b-4799-a7bd-c22367a68393-vp0-d827db009bcbfd840b2197345d878a6fad03f375e7d6191f7ed12e169f23ee3c9baaa02d06d3c6bf30b29a621c0345bbad90cb048fbcacc0949bcf29168065de not found\n)"

@masterDev1985
Copy link
Contributor

We were experiencing some issues with chaincode deployment, but they should be resolved. You mind trying again, @ethanpreneur ?

@nemes1s
Copy link

nemes1s commented Aug 30, 2016

@masterDev1985 tried deploying car-lease-demo today on bluemix.

Logs say: "App/0INFO Startup Vehicle chaincode deployed on all peers"

In blockchain instance info: "no chaincode found"

Running any query results into:
data: 'Error when querying chaincode: Error:Failed to launch chaincode spec(Error starting container: API error (500): Error: image library/d94a05d8-660c-493f-8fa0-0ccc251dab06-vp0-95453edf29babb55ee5583fa47052b2f976069fed4be4ba43d26f0d241501d12cb5c6283d7bfea9fbcac766c64183d604b0ce46928a036cbe52127017f454d0a not found\n)' },

@masterDev1985
Copy link
Contributor

Try to deploy the chaincode again, but watch the peer logs for messages with the 'container' or 'docker' tags. Something probably failed in your deployment. BTW you can create new issues, you know ;)

@nemes1s
Copy link

nemes1s commented Aug 30, 2016

@masterDev1985 wen't throught the logs (i will create an issue in corresponding repo then):

ERR - �[36m13:34:46.420 [chaincode] Launch -> DEBU 1b2a9�[0m launchAndWaitForRegister failed Error starting container: API error (500): Error: image library/da0f7000-1275-400e-932d-df081589d8cd-vp0-4d62ca88762ba66113aeddb273192ec54533817aee4b575defbb32dbe5facde00dd9a90df8edf4eab3314a9c7ea49bae36e6f7322d3ef49f3360f4350bed9754 not found

@ethanpreneur
Copy link

Thanks for help. I retried.

After checking out the "revert go protobuf beta3 to 3" #7c3a27d, the
"vagrant up" now works fine. However, I still get this following error in
peer node when testing the chaincode example 2.

sendProducerBlockEvent -> ERRO 01e Error unmarshalling deployment
transaction for block event: proto: protos.ChaincodeDeploymentSpec:
wiretype end group for non-group

This happens when I deploy the chain code:

peer chaincode deploy -n mycc -c '{"Function":"init", "Args": ["a","100",
"b", "200"]}' -u jim

attached Peer Log:


peer node start --peer-chaincodedev

16:13:50.044 [nodeCmd] serve -> INFO 001 Running in chaincode development
mode

16:13:50.045 [nodeCmd] serve -> INFO 002 Set consensus to NOOPS and user
starts chaincode

16:13:50.045 [nodeCmd] serve -> INFO 003 Disable loading validity system
chaincode

16:13:50.049 [eventhub_producer] start -> INFO 004 event processor started

16:13:50.050 [nodeCmd] serve -> INFO 005 Security enabled status: true

16:13:50.050 [nodeCmd] serve -> INFO 006 Privacy enabled status: true

16:13:50.070 [crypto] RegisterValidator -> INFO 007 Registering validator
[vp] with name [vp]...

16:13:50.074 [crypto] RegisterValidator -> INFO 008 Registering validator
[vp] with name [vp]...done!

16:13:50.075 [crypto] InitValidator -> INFO 009 Initializing validator
[vp]...

16:13:50.119 [crypto] InitValidator -> INFO 00a Initializing validator
[vp]...done!

16:13:50.119 [chaincode] NewChaincodeSupport -> INFO 00b Chaincode support
using peerAddress: 0.0.0.0:7051

16:13:50.120 [sysccapi] RegisterSysCC -> WARN 00c Currently system
chaincode does support security(noop,
github.com/hyperledger/fabric/bddtests/syschaincode/noop)

16:13:50.123 [state] loadConfig -> INFO 00d Loading configurations...

16:13:50.124 [state] loadConfig -> INFO 00e Configurations loaded.
stateImplName=[buckettree],
stateImplConfigs=map[maxGroupingAtEachLevel:%!s(int=5)
bucketCacheSize:%!s(int=100) numBuckets:%!s(int=1000003)],
deltaHistorySize=[500]

16:13:50.124 [state] NewState -> INFO 00f Initializing state implementation
[buckettree]

16:13:50.125 [buckettree] initConfig -> INFO 010 configs passed during
initialization = map[string]interface {}{"maxGroupingAtEachLevel":5,
"bucketCacheSize":100, "numBuckets":1000003}

16:13:50.125 [buckettree] initConfig -> INFO 011 Initializing bucket tree
state implemetation with configurations &{maxGroupingAtEachLevel:5
lowestLevel:9 levelToNumBucketsMap:map[5:1601 9:1000003 4:321 3:65 2:13
6:8001 0:1 8:200001 1:3 7:40001] hashFunc:0xa5d5c0}

16:13:50.126 [buckettree] newBucketCache -> INFO 012 Constructing
bucket-cache with max bucket cache size = [100] MBs

16:13:50.127 [buckettree] loadAllBucketNodesFromDB -> INFO 013 Loaded
buckets data in cache. Total buckets in DB = [17]. Total cache size:=2000

16:13:50.129 [consensus/controller] NewConsenter -> INFO 014 Creating
default consensus plugin (noops)

16:13:50.132 [consensus/statetransfer] blockThread -> INFO 015 Validated
blockchain to the genesis block

16:13:50.134 [consensus/noops] newNoops -> INFO 016 NOOPS consensus type =
*noops.Noops

16:13:50.135 [consensus/noops] newNoops -> INFO 017 NOOPS block size = 500

16:13:50.135 [consensus/noops] newNoops -> INFO 018 NOOPS block wait = 1s

16:13:50.137 [nodeCmd] serve -> INFO 019 Starting peer with ID=name:"jdoe"
, network ID=dev, address=0.0.0.0:7051, rootnodes=, validator=true

16:13:50.138 [rest] StartOpenchainRESTServer -> INFO 01a Initializing the
REST service on 0.0.0.0:7050, TLS is disabled.

16:15:50.849 [crypto] InitClient -> INFO 01b Initializing client [jim]...

16:15:50.950 [crypto] InitClient -> INFO 01c Initializing client
[jim]...done!

16:15:50.956 [crypto] closeClientInternal -> INFO 01d Closing client
[jim]...

16:15:51.986 [ledger] sendProducerBlockEvent -> ERRO 01e Error
unmarshalling deployment transaction for block event: proto:
protos.ChaincodeDeploymentSpec: wiretype end group for non-group


Chain code log:

CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=0.0.0.0:7051
./chaincode_example02

16:04:33.465 [shim] DEBU : Peer address: 0.0.0.0:7051

16:04:33.470 [shim] DEBU : os.Args returns: [./chaincode_example02]

16:04:33.474 [shim] DEBU : Registering.. sending REGISTER

16:04:33.485 [shim] DEBU : []Received message REGISTERED from shim

16:04:33.486 [shim] DEBU : []Handling ChaincodeMessage of type:
REGISTERED(state:created)

16:04:33.486 [shim] DEBU : Received REGISTERED, ready for invocations

16:07:43.731 [shim] DEBU : [mycc]Received message INIT from shim

16:07:43.731 [shim] DEBU : [mycc]Handling ChaincodeMessage of type:
INIT(state:established)

16:07:43.731 [shim] DEBU : Entered state init

16:07:43.732 [shim] DEBU : [mycc]Received INIT, initializing chaincode

Aval = 100, Bval = 200

Regards,

Ethan

On Thu, Aug 25, 2016 at 11:28 AM, Dale Avery notifications@github.com
wrote:

We were experiencing some issues with chaincode deployment, but they
should be resolved. You mind trying again, @ethanpreneur
https://github.com/ethanpreneur ?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#15 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AThZGc90Coo7MpW_nZbSn4Cfsu00dVnyks5qjd7ngaJpZM4IfKjt
.

@maruthi7937
Copy link

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??

@baqar
Copy link

baqar commented Oct 9, 2016

I am also getting the following error while executing the query API. The invoke call works fine. I am using the following tutorial:

https://github.com/IBM-Blockchain/learn-chaincode

The response is as follows, anyone who has resolved the issue please help:

{
"jsonrpc": "2.0",
"error": {
"code": -32003,
"message": "Query failure",
"data": "Error when querying chaincode: Error:Failed to launch chaincode spec(Error starting container: API error (500): Network timed out while trying to connect to https://index.docker.io/v1/repositories/library/60a6cfb4-2287-476e-8cea-8030e6594ef5-vp1-bac5654f9c3cf1a277debb860bb198024ff8a1583e244f2ae3424d17e80464956e9b28bb3af80be3ad06832b50635943210bc639f83ed2c3f0ad2216c98bee84/images. You may want to check your internet connection or if you are behind a proxy.\n)"
},
"id": 2
}

@nerd010
Copy link

nerd010 commented Mar 4, 2017

did anyone resolve this problem?

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