Not able to POST chaincode to hyperledger-fabric using API

0 votes

I've deployed the hyperledger-fabric service on Bluemix and obtained the credentials from there, one line looks like this:


I post the following to the "registrar" REST endpoint:

Secret: { "enrollId": "user_type1_0", "enrollSecret": "xxxxx" }

I get this response:

{ "OK": "Login successful for user 'user_type1_0'." }

Then I try to register some chaincode using POSTing the following to the chaincode REST endpoint:

QuerySpec { "jsonrpc": "2.0", "method": "deploy", "params": { "type": 1, "chaincodeID": { "path": "" }, "ctorMsg": { "function": "init", "args": [ "hi there" ] }, "secureContext": "user_type1_0_xxxxx" }, "id": 1 }

I get this reponse:

{ "jsonrpc": "2.0", "error": { "code": -32000, "message": "Registration missing", "data": "User not logged in. Use the '/registrar' endpoint to obtain a security token." }, "id": 1 }

Any idea how to solve this?

Oct 30, 2018 in Blockchain by slayer
• 29,040 points

retagged Nov 22, 2018 by Priyaj 48 views

2 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
Try to run your deploy command with another SecurityContext value

QuerySpec { "jsonrpc": "2.0", "method": "deploy", "params": { "type": 1, "chaincodeID": { "path": "" }, "ctorMsg": { "function": "init", "args": [ "hi there" ] }, "secureContext": "user_type1_0" }, "id": 1 }
answered Oct 30, 2018 by Omkar
• 66,880 points
0 votes
TypeError: Cannot read property 'curve' of undefined
    at Object.KEYUTIL.getKey (/home/quolam-002/Documents/Hyperledger_Fabric proejct/fabric-samples/vytalconnect2/node_modules/fabric-client/node_modules/jsrsasign/lib/jsrsasign.js:247:10379)
    at CryptoSuite_ECDSA_AES.getKey (/home/quolam-002/Documents/Hyperledger_Fabric proejct/fabric-samples/vytalconnect2/node_modules/fabric-client/lib/impl/CryptoSuite_ECDSA_AES.js:206:27)
answered Jan 30 by SHRADDHA

Related Questions In Blockchain

0 votes
1 answer

Not Able to register a user with Hyperledger-Fabric v1.1 preview

The error: "Certificate not found with AKI 'e729224e8b3f31784c8a93c5b8ef6f4c1c91d9e6e577c45c33163609fe40011' ...READ MORE

answered Jun 16, 2018 in Blockchain by charlie_brown
• 7,710 points
0 votes
1 answer

Not able to send payments using Blockchain API.

Try the following code. It should help ...READ MORE

answered Jul 31, 2018 in Blockchain by slayer
• 29,040 points
0 votes
1 answer

Not able to run chaincode locally using docker

Looks like the Fabric team introduced "nopkcs11" ...READ MORE

answered Sep 18, 2018 in Blockchain by slayer
• 29,040 points
0 votes
1 answer

Hyperledger fabric: curl not working to invoke chaincode

Hyperledger Fabric does not offer a REST ...READ MORE

answered Oct 23, 2018 in Blockchain by Perry
• 16,450 points
0 votes
1 answer
0 votes
1 answer

Invalid Batch or signature in Savtooth

This will solve your problem import org.apache.commons.codec.binary.Hex; Transaction txn ...READ MORE

answered Aug 1, 2018 in Blockchain by digger
• 27,620 points
+1 vote
1 answer

How do i change the names of validating peers in IBM Bluemix blockchain?

IBM Bluemix Blockchain service Hyperledger Fabric v0.6 will ...READ MORE

answered Apr 10, 2018 in Blockchain by Perry

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.