Anchor peer update failed, Consortium config value missing #fabric-orderer #fabric-peer #orderer #organizations #channel


gonzalo.bustos@...
 

Hello!

I wanted to create an easy-to-start local environment for my hyperledger-fabric network, so I created a script that only kills the network containers (all configuration, transaction and cert files remain) and then another script that re-starts the containers. When I restart them, I have to rejoin the organization peers to the channel, and I believe I should also update the anchor peers again for each organization.

I managed to rejoin the organization peers to the channel with little effort, but I'm getting an error when trying to update the Anchor Peers.

The error: Error: got unexpected status: BAD_REQUEST -- Consortium config value missing

That error pops up right after trying to update the anchor peers on the channel with the following command:
+ peer channel update -o localhost:7050 --ordererTLSHostnameOverride orderer.com -c prescriptionschannel -f ./channel-artifacts/MedicOrgMSPanchors.tx --tls --cafile /var/www/psh/medical-chain/medchain-network/organizations/ordererOrganizations/orderer.com/orderers/orderer.com/msp/tlscacerts/tlsca.orderer.com-cert.pem
resulting error code => 1
 
Thank you in advance!


Kavin Arumugam
 

Hi Gonzalo,

     I think, Anchor Peer Update Transaction has errors in it.

     Please refer the following link for sample Anchor Peer Update: 


     Note: Modify the MSP ID, Peer Address & Port, etc according to your needs.



On Thu, 4 Nov, 2021, 12:26 am gonzalo.bustos via lists.hyperledger.org, <gonzalo.bustos=wearepsh.com@...> wrote:

Hello!

I wanted to create an easy-to-start local environment for my hyperledger-fabric network, so I created a script that only kills the network containers (all configuration, transaction and cert files remain) and then another script that re-starts the containers. When I restart them, I have to rejoin the organization peers to the channel, and I believe I should also update the anchor peers again for each organization.

I managed to rejoin the organization peers to the channel with little effort, but I'm getting an error when trying to update the Anchor Peers.

The error: Error: got unexpected status: BAD_REQUEST -- Consortium config value missing

That error pops up right after trying to update the anchor peers on the channel with the following command:
+ peer channel update -o localhost:7050 --ordererTLSHostnameOverride orderer.com -c prescriptionschannel -f ./channel-artifacts/MedicOrgMSPanchors.tx --tls --cafile /var/www/psh/medical-chain/medchain-network/organizations/ordererOrganizations/orderer.com/orderers/orderer.com/msp/tlscacerts/tlsca.orderer.com-cert.pem
resulting error code => 1
 
Thank you in advance!


gonzalo.bustos@...
 

THE PROBLEM HAS BEEN SOLVED.

 

Thanks to @Kavin above for his help.

 

Just in case it is useful to anyone out there, if you want to keep your local images when shutting down the local hlf network and have them get back up again perfectly, remember to create the necessary docker volumes to maintain persistance. Avoid trying to recreate connections or blocks that had already been created.

In my case, I needed make the following update to my docker-compose.yaml volume configuration:

#- peer0.org1.example.com:/var/hyperledger/production
- ../backup/peer0.org1.example.com:/var/hyperledger/production

To each of my peers and orderers.

This was suggested by Kavin off-thread, so shoutout to him.