Troubleshooting policy error on channel creation


Nikhil Gupta
 

Forward answer to the mailing list since so many hit these problems:
---------- Forwarded message ---------
From: Nikhil Gupta <nikhilg550@...>
Date: Tue, Sep 22, 2020 at 4:53 PM
Subject: Re: [Hyperledger Fabric] Troubleshooting policy error on channel creation
To: Simeon MacMillen <industrial_eng@...>


Hey Simeon,

This is a problem with the cert that submitted the request.

This stack overflow post has a lot of information that you can use to debug the issue: https://stackoverflow.com/questions/57662562/when-i-try-to-create-a-channel-using-hyperledger-fabric-the-request-fails

Nik


On Tue, Sep 22, 2020 at 3:07 PM Simeon MacMillen <industrial_eng@...> wrote:

I've been trying to troubleshoot an error on channel creation for the past week and would be grateful for any feedback.

I'm building a simple network (loosely inspired by the Test Network), (currently) with 1 Peer, 1 Orderer, and 2 corresponding CAs running as services on a single host Docker swarm network.

After creating the genesis block and restarting the Orderer node, I login to a CLI, create a channel Tx, and try to start the application channel:

peer channel create -o $host:1050 -c $CHANNEL_NAME --ordererTLSHostnameOverride OEM_Orderer -f ./channel-artifacts/${CHANNEL_NAME}.tx --outputBlock ./channel-artifacts/${CHANNEL_NAME}.block --tls --cafile $ORDERER_CA

I get this error:
Error: got unexpected status: BAD_REQUEST -- error validating channel creation transaction for new channel 'supply-chain-network', could not successfully apply update to template configuration: error authorizing update: error validating DeltaSet: policy for [Group]  /Channel/Application not satisfied: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Admins' sub-policies to be satisfied

Assuming that my problem lies in my Policy declaration (in configtx.yaml), what "names" should be used for Policy rules?  (e.g. Rule: "OR('name.admin')")  Where do these "name" values originate?  Or is there anything else obvious that I'm doing wrong?

Reference:
configtx.yaml: https://pastebin.com/Uyd7wK8G
Docker file for nodes and cli: https://pastebin.com/vLNYyDgX
Script & terminal commands: https://pastebin.com/sARkFzBC
StackOverflow post: https://stackoverflow.com/q/63962180

Join fabric@lists.hyperledger.org to automatically receive all group messages.