Hyperledger Fabric: Failed to enroll admin: Error: Failed to enroll admin.

+2 votes

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
• 27,640 points
930 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
• 67,380 points

selected May 6 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 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 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 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
• 67,380 points
818 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
• 67,380 points
242 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 23 in Blockchain by Kiran
2,814 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,640 points
67 views
+1 vote
1 answer
+2 votes
2 answers