【问题标题】:Hyperledger composer multi user identity超级账本作曲家多用户身份
【发布时间】:2017-09-07 15:38:06
【问题描述】:

我正在关注下面的教程

https://hyperledger.github.io/composer/integrating/enabling-rest-authentication.html

我能够完成设置默认钱包身份之前的步骤。在此之后,当我尝试系统 ping 方法时,我得到了错误。

{
  "error": {
    "statusCode": 500,
    "name": "Error",
    "message": "Error trying to ping. Error: Error trying to query chaincode. Error: chaincode error (status: 500, message: Error: The current identity has not been registered:maeid1)",
    "stack": "Error: Error trying to ping. Error: Error trying to query chaincode. Error: chaincode error (status: 500, message: Error: The current identity has not been registered:maeid1)\n    at _checkRuntimeVersions.then.catch (/home/praval/.nvm/versions/node/v6.11.1/lib/node_modules/composer-rest-server/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:696:34)"
  }
}

我在使用访问令牌进行测试时遇到同样的错误。

curl -v http://localhost:3000/api/system/ping?access_token=xxxxx

虽然我可以成功运行网络 ping。

composer network ping -p hlfv1 -n 'digitalproperty-network' -i maeid1 -s NfUhmXtiaSUH

感谢您的帮助。

【问题讨论】:

    标签: hyperledger-composer


    【解决方案1】:

    此问题描述了您看到的问题 https://github.com/hyperledger/composer/issues/1761

    CLI 和 Rest 服务器都注册了用户,但这会导致两个环境都为相同的身份存储不同的证书(例如颁发日期和到期日期)。无论哪个环境首先将其证书用于该身份并在运行时激活该身份/参与者,都已注册其证书。当另一个环境出示他们的证书时,它没有被找到(因为它与第一个环境不同),因此报告身份没有注册。

    解决此问题的方法是,如果您打算在其余服务器中使用该身份,请不要先从 CLI 对其进行 ping。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-03-02
      • 2022-11-10
      • 2018-12-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多