Hyperledger Fabric Failed to enroll admin Error Failed to enroll admin

+1 vote

When running the registerAdmin.js i get this error:

  Store path:/home/chaindev/.hfc-key-store
Error: Calling enrollment endpoint failed with error [Error: connect ECONNREFUSED 127.0.0.1:7054]
    at ClientRequest.<anonymous> (/home/chaindev/fabricProjects/src/github.com/education/LFS171x/fabric-material/tuna-app/node_modules/fabric-ca-client/lib/FabricCAClientImpl.js:711:12)
    at emitOne (events.js:116:13)
    at ClientRequest.emit (events.js:211:7)
    at Socket.socketErrorListener (_http_client.js:387:9)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at emitErrorNT (internal/streams/destroy.js:64:8)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
Failed to enroll admin: Error: Failed to enroll admin
Nov 5, 2018 in Blockchain by digger
• 26,740 points
5,943 views

4 answers to this question.

+2 votes
Best answer

As your .hfc-key-store directory is in chaindev,

Try running the following commands:

$ cd ~/chaindev/
$ rm -rf .hfc-key-store/

Then, run the command:

$ node registerAdmin.js
answered Nov 5, 2018 by Omkar
• 69,220 points

selected May 6, 2019 by digger
+1 vote

Set the following in your yaml file, it will work:

environment:
    - FABRIC_CA_SERVER_TLS_ENABLED=true
    - FABRIC_CA_SERVER_TLS_CERTFILE=<location to certificate file>
    - FABRIC_CA_SERVER_TLS_KEYFILE=<location to key file>
answered May 6, 2019 by Yash
Should I set these properties in yaml file of all the systems?

No @Kiran, set these properties in the yaml file that contains the CA services. It should work

0 votes
I faced this problem due to version incompatibility. It worked fine when I used v 1.0.6
answered May 6, 2019 by Quindal
I am using v 1.1. Will it work?
No @Piyu, it didn't work for me when I used v1.1 or above. That's why I had to switch to 1.0.6
0 votes

Check the name of the Private key in docker-compose.yaml file. I was facing this error because I had mentioned the wrong private key name.

answered May 6, 2019 by Ritu
The Private key name is correct, still facing this issue.

Related Questions In Blockchain

+1 vote
2 answers
+2 votes
3 answers

Hyperledger Fabric: Peer Connection error: Failed obtaining connection: Could not connect to any of the endpoints.

 You can extend your /etc/hosts file and make orderer.example.com domain name ...READ MORE

answered Nov 13, 2018 in Blockchain by Omkar
• 69,220 points
3,889 views
0 votes
1 answer

Hyperledger Fabric:Promise is rejected:Error:Failed to deserialize creator identity,The supplied identity is not valid.

 This error happens because basic-network/docker-compose.yaml has CA ...READ MORE

answered Nov 14, 2018 in Blockchain by Omkar
• 69,220 points
2,296 views
+2 votes
4 answers

"failed to create new connection context deadline exceeded." error in Hyperledger Fabric

Try remove previous docker containers(have mentioned the ...READ MORE

answered Apr 24, 2019 in Blockchain by Kiran
12,877 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,451 views
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
• 26,740 points
1,004 views
+1 vote
1 answer
+2 votes
3 answers
0 votes
2 answers
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP