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

0 votes

Hi I am not able to register a user with fabric v1.1 preview I am using node-sdk balance transfer example This is the error log

2017/12/19 10:15:43 [DEBUG] Received request for /api/v1/register
2017/12/19 10:15:43 [DEBUG] Checking for revocation/expiration of certificate owned by 'admin'
2017/12/19 10:15:43 [DEBUG] DB: Get certificate by serial (2579edfb30a98bc8200916a7898f0de00280865) and aki (e729224e8b3f31784c8a93c5b8ef6f4c1c91d9e6e577c45c33163609fe40011)
2017/12/19 10:15:43 [DEBUG] Received registration request from : { Name:Jim456 Type: Secret:**** MaxEnrollments:1 Affiliation:org1.department1 Attributes:[{Role  false}] CAName:ca-org1  }
2017/12/19 10:15:43 [DEBUG] Sent error for /api/v1/register: scode: 401, local code: 30, local msg: Certificate not found with AKI 'e729224e8b3f31784c8a93c5b8ef6f4c1c91d9e6e577c45c33163609fe40011' and serial '2579edfb30a98bc8200916a7898f0de00280865', remote code: 20, remote msg: Authorization failure

github.com/hyperledger/fabric-ca/lib.newAuthErr
    /opt/gopath/src/github.com/hyperledger/fabric-ca/lib/servererror.go:145
github.com/hyperledger/fabric-ca/lib.(*serverRequestContext).TokenAuthentication
    /opt/gopath/src/github.com/hyperledger/fabric-ca/lib/serverrequestcontext.go:157
github.com/hyperledger/fabric-ca/lib.registerHandler
    /opt/gopath/src/github.com/hyperledger/fabric-ca/lib/serverregister.go:49
github.com/hyperledger/fabric-ca/lib.(*serverEndpoint).ServeHTTP
    /opt/gopath/src/github.com/hyperledger/fabric-ca/lib/serverendpoint.go:44
net/http.(*ServeMux).ServeHTTP
    /opt/go/src/net/http/server.go:2254
net/http.serverHandler.ServeHTTP
    /opt/go/src/net/http/server.go:2619
net/http.(*conn).serve
    /opt/go/src/net/http/server.go:1801
runtime.goexit
    /opt/go/src/runtime/asm_amd64.s:2337
2017/12/19 10:15:43 [INFO] 172.19.0.1:56246 POST /api/v1/register 401 30 "Certificate not found with AKI 'e729224e8b3f31784c8a93c5b8ef6f4c1c91d9e6e577c45c33163609fe40011' and serial '2579edfb30a98bc8200916a7898f0de00280865'"
Jun 16, 2018 in Blockchain by ariaholic
• 7,320 points
292 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

The error:

"Certificate not found with AKI 'e729224e8b3f31784c8a93c5b8ef6f4c1c91d9e6e577c45c33163609fe40011' and serial '2579edfb30a98bc8200916a7898f0de00280865', remote code: 20, remote msg: Authorization failure"

Suggests that the CA didn't find the certificate that you gave it (from the admin).

If you are enrolling the admin with the CA to get fresh certificates this should solve your issue.

It seems that you may be using old certificates stored in your KVS store file that pertains to the prior network. This problem is simply caused by you restarting a fresh network and keeping the prior KVS, thus when you run your code, it checks if the user is stored and uses those credentials instead of getting new ones. Always remember to delete your kvs when restarting your network.

answered Jun 16, 2018 by charlie_brown
• 7,710 points

Related Questions In Blockchain

0 votes
1 answer

How to register a user in Hyperledger Fabric?

Best practice would be to leverage an ...READ MORE

answered Sep 5, 2018 in Blockchain by Christine
• 15,790 points
243 views
0 votes
1 answer
0 votes
1 answer

How to control a malicious user in hyperledger fabric?

Fabric is an implementation of blockchain. Blockchain ...READ MORE

answered Jun 29, 2018 in Blockchain by Omkar
• 65,850 points
125 views
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
39 views
+1 vote
1 answer
0 votes
1 answer
+1 vote
2 answers

© 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.