fabcar-blockchain-sample
fabcar-blockchain-sample copied to clipboard
node enrollAdmin.js: error: [FabricCAClientService.js]: Failed to enroll app-admin
Dear Experts,
I am at step 4 run the Application, and while performing node enrollAdmin.js, i am facing the following error: node enrollAdmin.js 2019-08-16T20:45:07.623Z - error: [FabricCAClientService.js]: Failed to enroll app-admin, error:%o message=Calling enrollment endpoint failed with error [Error: connect ETIMEDOUT 184.173.1.18:31317], stack=Error: Calling enrollment endpoint failed with error [Error: connect ETIMEDOUT 184.173.1.18:31317] at ClientRequest.request.on (/home/assure/IBM-fabcar/fabcar-blockchain-sample/web-app/server/node_modules/fabric-ca-client/lib/FabricCAClient.js:487:12) at emitOne (events.js:116:13) at ClientRequest.emit (events.js:211:7) at TLSSocket.socketErrorListener (_http_client.js:401:9) at emitOne (events.js:116:13) at TLSSocket.emit (events.js:211:7) at emitErrorNT (internal/streams/destroy.js:66:8) at _combinedTickCallback (internal/process/next_tick.js:139:11) at process._tickCallback (internal/process/next_tick.js:181:9) Failed to enroll admin user app-admin: ${error}
while checking the reachability towards 184.173.1.18, seems it is not reachable and port 31317 is not open on that CA server. Can you please advise why this server is not reachable? Any other alternatives to that server?
Thank you
@horeaporutiu :)
@emassaad were you able to figure this out? I'm struck at the same point....
Hello,
Not really the IP of the CA is not reachable so I just used the fabcar on local pc where CA is embedded. Not the IBM one
On Sat, Sep 14, 2019 at 2:42 PM Rasheen Ruwisha [email protected] wrote:
@emassaad https://github.com/emassaad were you able to figure this out? I'm struck at the same point....
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/IBM/fabcar-blockchain-sample/issues/20?email_source=notifications&email_token=ADZULTR4JNMRHWFKA54T4V3QJTEY5A5CNFSM4IMMXRU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6W2EMY#issuecomment-531472947, or mute the thread https://github.com/notifications/unsubscribe-auth/ADZULTVLXK3JQUCCIS7LEPDQJTEY5ANCNFSM4IMMXRUQ .
@emassaad Hello,
I tried both the cloud and the local, but both give me the same error, the local one everything worked fine till running enrollAdmin.js Are there any urls to be changed when running locally?
I ran into this as well, and got past it by updating the ca url to localhost:17054
in config.json, my_channel_fabcar_profile.json, and connection.json. However, now it appears the secret in config.json is incorrect, because I'm getting an authentication error.
For getting the app to run locally
- Overwrite the connection.json file present inside the
server/connection.json
with the one present insidecontract/local_fabric/connection.json
- Open config.json file present inside
server/config.json
and replace the connection_file line with"connection_file": "connection.json"
I have the same error, replaced the connection.json file and the connection_file line as advised above. Error is Failed to enroll admin user app-admin: TypeError: Cannot read property 'url' of undefined
now.
web-app/server/config.json:
{
"connection_file": "connection.json",
"appAdmin": "app-admin",
"appAdminSecret": "app-adminpw",
"orgMSPID": "org1msp",
"caName": "184.173.1.18:31317",
"userName": "user1",
"gatewayDiscovery": { "enabled": true, "asLocalhost": false }
}
After I replaced "caName": "184.173.1.18:31317" with "caName": "ca.org1.example.com" in config.json the url was available but I got this error: 2019-12-16T12:24:39.196Z - error: [FabricCAClientService.js]: Failed to enroll app-admin, error:%o message=Enrollment failed with errors [[{"code":20,"message":"Authentication failure"}]]
I changed Admin/AdminSecret to admin/adminpw and got message msg: Successfully enrolled admin user admin and imported it into the wallet
@emassaad @RasheenRuwisha @bentok @terryfernz @gitjps
~We are working on updating the instructions for deploying the fabcar smart contract to IBM Blockchain Platform on IBM Cloud as well as the local fabric network.~
~While the changes have not been merged to master yet, you can get the instructions from the ReadMe.md and run-local.md files within the pull request #34.~
We recently updated the instructions for deploying fabcar smart contract to IBM Blockchain Platform on IBM Cloud as well as the local fabric network. Please refer README.md and run-local.md for these instructions.
Hello @gitjps I have same problem with you "Failed to enroll admin user admin: TypeError: Cannot read property 'url' of undefined". I've tried your solution too, but it's still not working for me, do you have any suggestion?
Hello! I has a local project. Tried to do the same thing, and I didn't has those files... Does anyone know what I could have did wrong? Or what configuration am I missing? Thanks.
I have the same error, replaced the connection.json file and the connection_file line as advised above. Error is
Failed to enroll admin user app-admin: TypeError: Cannot read property 'url' of undefined
now.web-app/server/config.json:
{ "connection_file": "connection.json", "appAdmin": "app-admin", "appAdminSecret": "app-adminpw", "orgMSPID": "org1msp", "caName": "184.173.1.18:31317", "userName": "user1", "gatewayDiscovery": { "enabled": true, "asLocalhost": false } }
After I replaced "caName": "184.173.1.18:31317" with "caName": "ca.org1.example.com" in config.json the url was available but I got this error: 2019-12-16T12:24:39.196Z - error: [FabricCAClientService.js]: Failed to enroll app-admin, error:%o message=Enrollment failed with errors [[{"code":20,"message":"Authentication failure"}]]
I changed Admin/AdminSecret to admin/adminpw and got message msg: Successfully enrolled admin user admin and imported it into the wallet
how I change Admin/AdminSecret in the new version?