Hyperledger Composer 多用户身份
Hyperledger composer multi user identity
我正在关注下面的教程
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
感谢您的帮助。
这个问题描述了您看到的问题
https://github.com/hyperledger/composer/issues/1761
CLI 和 Rest 服务器都已注册用户,但这会导致两个环境为同一身份存储不同的证书(例如颁发日期和到期日期)。无论哪个环境首先为该身份使用他们的证书并在运行时激活 identity/participant 都会注册他们的证书。当另一个环境出示他们的证书时,找不到它(因为它与第一个环境不同),因此报告身份未注册。
解决此问题的方法是,如果您计划在其余服务器中使用身份,请不要先从 CLI 对其进行 ping。
我正在关注下面的教程
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
感谢您的帮助。
这个问题描述了您看到的问题 https://github.com/hyperledger/composer/issues/1761
CLI 和 Rest 服务器都已注册用户,但这会导致两个环境为同一身份存储不同的证书(例如颁发日期和到期日期)。无论哪个环境首先为该身份使用他们的证书并在运行时激活 identity/participant 都会注册他们的证书。当另一个环境出示他们的证书时,找不到它(因为它与第一个环境不同),因此报告身份未注册。
解决此问题的方法是,如果您计划在其余服务器中使用身份,请不要先从 CLI 对其进行 ping。