Open cgironda opened 5 years ago
@cgironda please make sure to follow the prerequisites as shown in the instructions:
Node.js - Node v8.9.x
. While this error is likely unrelated to the node version, please do make sure you are using Node version 8.9.x since that is what this pattern has been tested with.
The error you are facing is likely because:
1) The caName, orgMSPID, appAdmin, or appAdminSecret in the config.json
file is wrong https://github.com/IBM/build-blockchain-insurance-app/blob/master/web/www/blockchain/config.json#L6. Double-check that you have downloaded the connection profile from IBM Blockchain Platform, and have overwritten the ibpConnection.json
file, as shown in the last part of step 8 here: https://github.com/IBM/build-blockchain-insurance-app#update-application-connection
Furthermore, make sure the caName, orgMSPID, appAdmin, appAdminSecret in your config.json
is exactly written as shown in your downloaded ibpConnection.json
file. That should solve the issue.
If you are still running into the same issue, it could be the way that you have built your network maybe incorrect. Please let me know if this fixes it.
when you are running enrollAdmin.js, you are referencing the kubernetes cluster nodes that you have deployed as part of https://github.com/IBM/build-blockchain-insurance-app#step-1-create-ibm-cloud-services
So make sure you are referencing the correct URLs to the cluster, and each time you enroll a different appAdmin, you will need to update the config.json file, as shown in the gifs in step 9.
@horeaporutiu , thanks for your reply.
As you mentioned, this error is likely unrelated to the node version. However, I changed it to node v8.9.4
without any changes in the output, where I followed the prerequisites of the https://github.com/IBM/build-blockchain-insurance-app tutorial
The steps below summarize the process I followed in the tutorial:
1) The IBM Blockchain Network was built according to the prerequisites of the STEP 1.
2) In order to enroll the "appAdmin": "insuranceApp-admin"
in the config.json file, I replaced the value of the caName
directive with the value of certificateAuthorities
given in the ipbConnection.json file, where I previously replaced its contents using the mychannel_insurance_profile.json file, as shown in the STEP 8.
3) After executing the command node enrollAdmin.js
inside the web/www/blockchain folder, I obtained the following output:
Wallet path: /Users/$USER/Documents/IBM_Blockchain/build-blockchain-insurance-app/web/www/blockchain/wallet
2019-07-31T02:58:10.589Z - error: [FabricCAClientService.js]: Failed to enroll insuranceApp-admin, error:%o message=Calling enrollment endpoint failed with error [Error: connect ETIMEDOUT 169.60.31.202:7054], stack=Error: Calling enrollment endpoint failed with error [Error: connect ETIMEDOUT 169.60.31.202:7054]
at ClientRequest.request.on (/Users/cgironda/Documents/IBM_Blockchain/build-blockchain-insurance-app/web/node_modules/fabric-ca-client/lib/FabricCAClient.js:487:12)
at ClientRequest.emit (events.js:198:13)
at TLSSocket.socketErrorListener (_http_client.js:392:9)
at TLSSocket.emit (events.js:198:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
Failed to enroll admin user ' + insuranceApp-admin + : Error: Calling enrollment endpoint failed with error [Error: connect ETIMEDOUT 169.60.31.202:7054]
The best of all is that I followed the same process at home, and everything works well. I was wondering why this process does not work in my workplace if I have the same MacOS version with all the prerequisites satisfied in both machines, i.e., same configuration.
I built the IBM Blockchain Network in my workplace, and I used the JSON files that I downloaded to recover the identities in the wallet when I opened the IBM Blockchain console in my computer at home.
I started to think that the proxy configuration in my job would be causing the problem. Maybe I have to tell my network not to use proxy with some hosts.
Anyways, the connect ETIMEDOUT
error that I obtained after executing node enrollAdmin.js
, is usually a problem related to the connectivity of the network. However, maybe the problem is easier to solve than I think.
If you can give me a hand on this would be great. Thank you.
could you try something out for me?
Go ahead and create a new insurance app-admin identity from your insurance CA. This will be the same step as this one: https://github.com/IBM/build-blockchain-insurance-app#create-insurance-application-admin except you will want to create a new enroll ID and enroll secret, such as the following.
Enroll ID: insuranceApp-admin2
Enroll Secret: insuranceApp-admin2pw
Make sure to add the atrribute hf.Registrar.Roles = *
as shown in the instructions. Next,
try and run the enrollAdmin.js
script but go ahead and update the config.json
to reflect the newly created insuranceApp-admin2 identity.
So your updated config.json
should look like this, before you run the enrollAdmin.js
script:
{
"connection_file": "ibpConnection.json",
"appAdmin": "insuranceApp-admin2",
"appAdminSecret": "insuranceApp-admin2pw",
"orgMSPID": "insurancemsp",
"caName": "https://124b79efa8f5xxxxxx394edac7b5-ca081cbf.horea-blockchain-32x32xp.us-south.containers.appdomain.cloud:7054",
"userName": "insuranceUser",
"gatewayDiscovery": { "enabled": true, "asLocalhost": false }
}
If this does not work, then this is likely a problem with the network.
Hi @horeaporutiu,
Sorry for the delay in this reply. I followed your steps above without success, but I should make a final confirmation this Thursday (8/8) with a different network.
In the meanwhile, I was wondering if you can guide me to tell my network not to use the proxy for certain hosts used to run the docker images in the tutorial.
In order to have a better picture of what I am asking, please check the link below: https://stackoverflow.com/questions/57194706/using-vs-code-extension-containers-doesnt-run-for-the-hyperledger-fabric
Any help would be highly appreciated.
Hi,
Thanks to read this issue.
Behind a proxi correctly configured and under the following configuration:
node -v
:v8.16.0
orv10.16.0
npm -v
:v6.9.0
I executed the Step 9. Enroll App Admin Identities, of the tutorial:
https://github.com/IBM/build-blockchain-insurance-app#step-9-enroll-app-admin-identities
obtaining the error below:
This error seems to appear when docker "containers are not available", but please can you confirm that issue?.
Thank you