0
votes

I have updated composer [cli,playground,rest server etc..] from v.0.16.5 to v 0.19.0. After deploying the network when I try to ping the network it first throws an error and then connects to it on the second try. Why is this happening? How can I activate the current identity admin as in error?

composer network ping -c admin@university

Error: Error trying to ping. Error: 2 UNKNOWN: error executing chaincode: transaction returned with failure: Error: The current identity, with the name 'admin' and the identifier '01899e04161a3a6d64670504fa122e55818295352929b6a616333a3739fde3f2', must be activated (ACTIVATION_REQUIRED) Command failed

composer network ping -c admin@university

The connection to the network was successfully tested: university Business network version: 0.0.1 Composer runtime version: 0.19.0 participant: org.hyperledger.composer.system.NetworkAdmin#admin identity: org.hyperledger.composer.system.Identity#76edd946537645ea0016455a076e32dd10daac1e39fb75200d737b78dbca675d

Command succeeded

1

1 Answers

3
votes

When an Identity is first used it has an Enrollment ID and Secret, and a status of "ISSUED". After the first use the Secret is invalidated and Certificates are passed to the client Wallet and the ID has a status of "ACTIVATED".

You can see these different states in this example output from composer identity list command:

$class:      org.hyperledger.composer.system.Identity
  identityId:  3a1f3c629ef2106b138836f3c9e5fe1ac8358c60a4a1232c5ef1a16a805ab313
  name:        mary
  issuer:      ac3dbcbe135ba48b29f97665bb103f8260c38d3872473e584314392797c595f3
  certificate: 
  state:       ISSUED
  participant: resource:org.acme.mynetwork.Trader#mary


- 
  $class:      org.hyperledger.composer.system.Identity
  identityId:  57d1f173c6a9a7f789d243749de16340fee8bf383748d47ac360f846e5c238b9
  name:        mark
  issuer:      ac3dbcbe135ba48b29f97665bb103f8260c38d3872473e584314392797c595f3
  certificate: 
    """
  -----BEGIN CERTIFICATE-----
  MIICbTCCAhOgAwIBAgIUWHvLyD+Vs6YE1KTpCm1LlQej728wCgYIKoZIzj0EAwIw
  czELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNh
  biBGcmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMT
  E2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMTgwNDAzMTExNjAwWhcNMTkwNDAzMTEy
  MTAwWjAtMRwwDQYDVQQLEwZjbGllbnQwCwYDVQQLEwRvcmcxMQ0wCwYDVQQDEwRt
  YXJrMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAER3WsqouV+M07SG8gMExLFCZs
  8aUSsH8hMRUhKjibzV8fE/JJMOitoLSRpa/KU24p9IiDqBPZY/QdszTE5wzbuqOB
  yjCBxzAOBgNVHQ8BAf8EBAMCB4AwDAYDVR0TAQH/BAIwADAdBgNVHQ4EFgQU7EL5
  azn+RHinsX6EvEFZeQ5/II4wKwYDVR0jBCQwIoAgGatlq7sEgH2tEuTAqaqmZJ5w
  ho46vQIXoyLYnkfhpq4wWwYIKgMEBQYHCAEET3siYXR0cnMiOnsiaGYuQWZmaWxp
  YXRpb24iOiJvcmcxIiwiaGYuRW5yb2xsbWVudElEIjoibWFyayIsImhmLlR5cGUi
  OiJjbGllbnQifX0wCgYIKoZIzj0EAwIDSAAwRQIhAJSXtjEMu/8xkd0uLzJOP91h
  JdHa57ihiPkxOjRGqthTAiAMFrhY0gu/yUxN9cuLdmt/tNaile8W2/Kt+yZBW+ng
  gg==
  -----END CERTIFICATE-----

    """
  state:       ACTIVATED
  participant: resource:org.acme.mynetwork.Trader#t01

The composer identity list command gives a server side view, but a client side view can be seen with composer card list :

composer card list -c mary
userName:            mary
description:         
businessNetworkName: tutorial-network
identityId:          
roles:               none
connectionProfile: 
  name:   hlfv1
  x-type: hlfv1
credentials:         One time use only secret set

composer card list -c mark@tutorial-network
userName:            mark
description:         
businessNetworkName: tutorial-network
identityId:          57d1f173c6a9a7f789d243749de16340fee8bf383748d47ac360f846e5c238b9
roles:               none
connectionProfile: 
  name:   hlfv1
  x-type: hlfv1
credentials:         Credentials set

So your transition from 'Activation Required' to activitated is OK, but what is unusual is the "command failed" - what is normal is that the transition from ISSUED to ACTIVATED is hidden from the user, and the first ping works!