简体   繁体   中英

Failed Error: Private key missing from key store. Can not establish the signing identity for user admin

Generating the public key but not able to generate the private key of admin user while registering a new user through REST services in blockchain network and also getting below mentioned error.

Error:Failed Error: Private key missing from key store. Can not establish the signing identity for user admin.

Followed the below steps :

  1. Created a network in hyperledger fabric.
  2. Created new a node application to publish the rest services by referring the existing "balance-transfer" application.

  3. Then started the node application.

  4. Testing the rest services url in postman tool.

Getting the above mentioned error while testing the url http://localhost:4000/users in Postman tool.

Error at code level: app.js--->helper.js

let adminUserObj = await client.setUserContext({username: admins[0].username, password: admins[0].secret});

Please suggest.

Remove the folders holding key-value store for organizations -> fabric-client-kv-* from the balance-transfer fabric sample.

rm -rf fabric-client-kv-*

Then create the network again. This resolved the issue for me.

have you tried to restart the network completely? (by using the "runApp.sh" script for that?) Take a look inside this script to the restartNetwork() function, where the "fabric-client-kv-org" folders in your balance-transfer folder are removed.

Does it work?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM