Hyperledger Composer ::错误:必须激活当前身份(ACTIVATION_REQUIRED) [英] Hyperledger Composer:: Error: The current identity must be activated (ACTIVATION_REQUIRED)

查看:122
本文介绍了Hyperledger Composer ::错误:必须激活当前身份(ACTIVATION_REQUIRED)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人遇到超级账本编辑器的链码错误,例如:错误:必须激活当前身份(ACTIVATION_REQUIRED)?我正在使用的身份在composer-playground中显示ISSUED.但是一旦我通过REST服务器使用系统/ping,链代码日志就会显示此错误.我希望在参与者使用注册证书提交交易时,Composer链代码从注册证书中提取注册ID,并使用它来查找向其颁发身份的参与者实例.我通过CLI发出身份,然后在REST服务器中使用它而不在CLI中进行任何操作.我不确定如何克服此错误.欣赏!任何帮助.

我将所有作曲家组件更新为0.12.2.我使用以下CLI命令发布身份:

提交者参加者添加-p jiyababa -n'digitalproperty-network'-i PeerAdmin -s adminpw -d'{"$ class":"net.biz.digitalPropertyNetwork.Person","personId":"dcsen @ abc. com," firstName:" Dul," lastName:" Sen}'

撰写者身份问题-p jiyababa -n'digitalproperty-network'-i admin -s adminpw -u dcsen1 -a"resource:net.biz.digitalPropertyNetwork.Person#dcsen@abc.com"

在作曲者锁链代码上仍然出现相同的错误.

2017-09-17 14:56:12.599 UTC [Composer]错误-> ERRO 01e @JS:IdentityManager:getIdentity()错误:当前身份尚未注册:admin 2017-09-17 14:56: 12.682 UTC [Composer]错误-> ERRO 01f @JS:IdentityManager:getIdentity()错误:当前身份尚未注册:admin 2017-09-17 15:09:58.641 UTC [Composer]错误-> ERRO 020 @JS :IdentityManager:validateIdentity()错误:必须激活当前身份(ACTIVATION_REQUIRED)

我还尝试使用管理员"用户添加参与者并发布身份,但没有运气:出现作曲者链码错误::

错误:内部[/on](/chaincode/input/src/composer/vendor/gopkg.in/olebedev/go-duktape.v3/duk_console.c:55)内部未处理的承诺拒绝{activationRequired:true}内部

@JS:IdentityManager:validateIdentity()错误:必须激活当前身份(ACTIVATION_REQUIRED)

但是我可以使用以下命令通过composer CLI激活身份: 作曲者网络ping -n digitalproperty-network -p jiyababa -i dcsen1 -s BEkeKFlLVnBL

一旦通过CLI激活,我将无法在REST Server中使用该身份.这意味着,来自REST服务器的第一个交易请求不会激活身份注册表中的身份.

解决方案

如果您使用的CLI/Client Application/Rest Server的旧版本试图连接到Composer运行时的更新版本,则可能会发生这种情况.部署业务网络时已部署. 听起来您使用新版本的CLI部署了业务网络并发布了身份,但尚未将Rest Server更新为相同版本. 有关更新的信息可以在以下位置找到 https://hyperledger.github.io/composer/managing/updating-composer. html

Any one came across hyperledger composer's chaincode error like : Error: The current identity must be activated (ACTIVATION_REQUIRED)?? The identity which I am using showing ISSUED in composer-playground. But once I am using System/ping through REST server, chaincode log showing this error. I hope at the time when a participant submits a transaction using an enrollment certificate, the Composer chaincode extracts the enrollment ID from the enrollment certificate, and uses it to look up the participant instance that the identity was issued to. I issued identity through CLI and then I am using it in REST server without doing anything in CLI. I am not sure how to overcome this error. Appreciate! any help.

I updated all composer components to 0.12.2. I used the following CLI commands to issue identity:

composer participant add -p jiyababa -n 'digitalproperty-network' -i PeerAdmin -s adminpw -d '{"$class":"net.biz.digitalPropertyNetwork.Person","personId":"dcsen@abc.com","firstName":"Dul","lastName":"Sen"}'

composer identity issue -p jiyababa -n 'digitalproperty-network' -i admin -s adminpw -u dcsen1 -a "resource:net.biz.digitalPropertyNetwork.Person#dcsen@abc.com"

Still getting the same error at composer chaincode.

2017-09-17 14:56:12.599 UTC [Composer] Error -> ERRO 01e @JS : IdentityManager :getIdentity() Error: The current identity has not been registered:admin 2017-09-17 14:56:12.682 UTC [Composer] Error -> ERRO 01f @JS : IdentityManager :getIdentity() Error: The current identity has not been registered:admin 2017-09-17 15:09:58.641 UTC [Composer] Error -> ERRO 020 @JS : IdentityManager :validateIdentity() Error: The current identity must be activated (ACTIVATION_REQUIRED)

I also tried using "admin" user to add participant and issue identity but no luck: getting composer chaincode error::

Error: Unhandled promise rejection {activationRequired:true} at [anon] (/chaincode/input/src/composer/vendor/gopkg.in/olebedev/go-duktape.v3/duk_console.c:55) internal

@JS : IdentityManager :validateIdentity() Error: The current identity must be activated (ACTIVATION_REQUIRED)

But I can ACTIVATE the identity through composer CLI using the following command: composer network ping -n digitalproperty-network -p jiyababa -i dcsen1 -s BEkeKFlLVnBL

Once I ACTIVATED through CLI, I could NOT use the identity in REST Server. That means, first transaction request from REST server not activating the identity in identity registry.

解决方案

This can happen if you are using an old version of the CLI/Client Application/Rest Server trying to connect to a much newer version of the composer runtime that is deployed when you deploy the business network. It sounds like you deployed a business network and issued identities using a newver version of the CLI, but haven't updated the Rest Server to the same version. Information about updating can be found at https://hyperledger.github.io/composer/managing/updating-composer.html

这篇关于Hyperledger Composer ::错误:必须激活当前身份(ACTIVATION_REQUIRED)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆