Hyperledger: The current identity, with the name 'admin' and the identifier <ID> has not been registered

103 Views Asked by At

I was in charge of solving a problem in Hyperledger which consists of identity expiration, unfortunately i do not have much details about the network itself, i've tried to delete the card using:

composer card delete admin@network

And using import:

composer card import -f admin.card

Both card and bna are the in the same directory, but when doing so if i try to ping the network it shows the following error:

Hyperledger: The current identity, with the name 'admin' and the identifier <ID> has not been registered

I just need to recover this admin user without loosing or changing anything in the network.

2

There are 2 best solutions below

0
gufronra On BEST ANSWER

Have you check the listed cards on the network?

composer card list

for identity expiration and can't get access to your network, you can try this.

Set your machine datetime before the card expired. go to your network directory ex. cd ~/example-network. then request new identity:

composer identity request -c PeerAdmin@hlfv1 -u admin -s adminpw newadmin

create new admin card:

composer card create -p config/connection.json -u newadmin -n example-network -c newadmin/admin-pub.pem -k newadmin/admin-priv.pem

import created card:

composer card import -f [email protected]

extract created card (it's actually compressed file), i recommend to extract into new directory called newadmin.

bind new identity:

composer identity bind -c oldadmin@example-network --participantId resource:org.hyperledger.composer.system.NetworkAdmin#admin --certificateFile newadmin/credentials/certificate

set back your machine datetime. now you have access to your network again.

composer network ping -c newadmin@example-network

cheers.

4
david_k On

There was a golden rule for hyperledger composer networks. Never let your identities expire. If you have (and it sounds like you have) then you will be locked out of your business network and there are no tools in hyperledger Composer to help you recover. Hyperledger Composer has been end of life for quite a while now so no one will be using it or developing it anymore.