Sourav
Sourav

Reputation: 157

hyperledger fabric calling enrollment endpoint failed with error

I was trying to deploy hyperledger fabric on multiple hosts using this code and used the balance transfer chaincode using node-SDK. While I tried to enroll the user, I got the following error:

[2019-01-10 18:12:20.635] [ERROR] Helper - 
[FabricCAClientService.js]: Failed to enroll admin, error:Error: 
Calling enrollment endpoint failed with error [Error: write EPROTO 
140678895621952:error:140770FC:SSL 
routines:SSL23_GET_SERVER_HELLO:unknown 
protocol:../deps/openssl/openssl/ssl/s23_clnt.c:827:
]
at ClientRequest.request.on (/home/muzzam/Downloads/hlf-docker-swarm/hlf-app/node_modules/fabric-ca-client/lib/FabricCAClient.js:492:12)
at emitOne (events.js:116:13)
at ClientRequest.emit (events.js:211:7)
at TLSSocket.socketErrorListener (_http_client.js:387:9)
at emitOne (events.js:116:13)
at TLSSocket.emit (events.js:211:7)
at onwriteError (_stream_writable.js:417:12)
at onwrite (_stream_writable.js:439:5)
at _destroy (internal/streams/destroy.js:39:7)
at TLSSocket.Socket._destroy (net.js:568:3)

can anyone give me an idea of what could be going wrong? If you need any of my configuration file, i can provide that

Upvotes: 3

Views: 2319

Answers (1)

Sourav
Sourav

Reputation: 157

I was able to find my error. I was not setting the TLS enabled parameter in docker containing CA service.

You need to set the following properties in yaml file containg the CA services:

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>

Upvotes: 1

Related Questions