Hyperledger Composer:: Error: The current identity must be activated (ACTIVATION_REQUIRED)

左心房为你撑大大i 提交于 2019-12-11 05:21:52

问题


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.


回答1:


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




回答2:


A temporary work around is to ACTIVATE the card yourself:

$ composer identity list -c admin@basic-sample-network
✔ List all identities in the business network
-
  $class:      org.hyperledger.composer.system.Identity
  identityId:  8dc315997a5ad0ade3b4343c6b81ae37a3c2c7f22eddab90dd09717e7459772e
  name:        admin
  issuer:      ac3dbcbe135ba48b29f97665bb103f8260c38d3872473e584314392797c595f3
  certificate:
    """
      -----BEGIN CERTIFICATE-----
      MIICAjCCAaigAwIBAgIUOA7RAw1TbKo2UjwkeS9YRCSFupowCgYIKoZIzj0EAwIw
      czELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNh
      biBGcmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMT
      E2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMTgwODA4MDYzODAwWhcNMTkwODA4MDY0
      MzAwWjAhMQ8wDQYDVQQLEwZjbGllbnQxDjAMBgNVBAMTBWFkbWluMFkwEwYHKoZI
      zj0CAQYIKoZIzj0DAQcDQgAEeBeSqbzishSi0Q0+f0HavwPsN1240zIxuL12iWUR
      U9aEO/cLusEr9fg44UUh3xzp4VQGChJ5TNRu4s/uBbuFxqNsMGowDgYDVR0PAQH/
      BAQDAgeAMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFF1ZYXNpBsGXEomhlTBT9NeJ
      CUqIMCsGA1UdIwQkMCKAIBmrZau7BIB9rRLkwKmqpmSecIaOOr0CF6Mi2J5H4aau
      MAoGCCqGSM49BAMCA0gAMEUCIQCMuttwm6sSCjtwl8xk4FZM4PHH0F5YGxJvNUjn
      SeeCCQIgAmmD9aabcY7jHttdfAZ2zNepihdRKjN1xsxy4i7KaQ4=
      -----END CERTIFICATE-----

    """
  state:       ACTIVATED
  participant: resource:org.hyperledger.composer.system.NetworkAdmin#admin

Command succeeded


来源:https://stackoverflow.com/questions/46201984/hyperledger-composer-error-the-current-identity-must-be-activated-activation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!