简体   繁体   English

失败错误:密钥库中缺少私钥。 无法为用户 admin 建立签名身份

[英]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.在通过区块链网络中的 REST 服务注册新用户时,生成公钥但无法生成管理员用户的私钥,并且还出现以下错误。

Error:Failed Error: Private key missing from key store.错误:失败 错误:密钥库中缺少私钥。 Can not establish the signing identity for user admin.无法为用户 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.在邮递员工具中测试其余服务 url。

Getting the above mentioned error while testing the url http://localhost:4000/users in Postman tool.在 Postman 工具中测试 url http://localhost:4000/users 时出现上述错误。

Error at code level: app.js--->helper.js代码级错误: 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.从余额转移结构示例中删除保存组织键值存储的文件夹 -> fabric-client-kv-*。

rm -rf fabric-client-kv-* rm -rf 结构客户端-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. (为此使用“runApp.sh”脚本?)查看该脚本的 restartNetwork() 函数,其中删除了 balance-transfer 文件夹中的“fabric-client-kv-org”文件夹。

Does it work?它有效吗?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Hyperledger Fabric 在哪里存储用户的公钥和私钥? - Where does Hyperledger fabric store the public key and private key of the user? 如何解决“私钥存储失败?” Error01问题? - How can I fix “Failed Storing private key?” Error01 problem? 无法生成第一个网络样本(存储私钥失败) - Can't generate first network sample (failed storing private key) 我可以为我的超级账本结构用户使用现有证书,私钥,公钥,而不是从CA或cryptogen创建新证书吗? - Can I use Existing Certificate, private key, public key for my hyperledger fabric user rather than creating new from CA or cryptogen? 从对等方加入频道时出错:此身份不是管理员 - Error joining channel from peer: This identity is not an admin 弹珠,无法在本地网络上安装链码-错误“此身份不是管理员” - marbles,Failed to install chaincode on local network - error “This identity is not an admin” 关于用户和管理员的身份 - Regarding the identity of user and admin Hyperledger Fabric get User Private Key from Node.js SDK 2.2版本 - Hyperledger Fabric get User Private Key from Node.js SDK 2.2 version 修改身份:无法验证用户是否可以对类型“用户”进行操作 - Modifying an Identity: Failed to verify if user can act on type 'user' 在用户密钥生成过程中,用户私钥存储在fabric-ca中的什么位置 - Where does user private key is stored in fabric-ca in user key generation process
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM