Error: got unexpected status: FORBIDDEN -- Failed to reach implicit threshold of 1 sub-policies, required 1 remaining: permission denied

Jim Green picture Jim Green · Jan 8, 2018 · Viewed 11.8k times · Source

My fabric version is 1.1.0-preview, the peer, orderer, configtxgen is newly generated.

when I execute the configtxgen tool:

configtxgen -profile SoloOrdererGenesis -outputBlock genesis.block 
configtxgen -profile mych -outputCreateChannelTx channel-artifacts/mych.tx -channelID mych

It generate the genesis.block and mych.tx with channelName is mych.

Then orderer start with genesis.block, I execute following:

peer channel create -f mych.tx -o orderer.example.com:7050 -c mych

it throw the error,

Error: got unexpected status: FORBIDDEN -- Failed to reach implicit threshold of 1 sub-policies, required 1 remaining: permission denied

which step is wrong?

my configtx.yaml file is:

---
Profiles:
    SoloOrdererGenesis:
        Orderer:
            <<: *OrdererDefaults
            Organizations:
                - *OrdererOrg
        Consortiums:
            SampleConsortium4:
                Organizations:
                    - *Org1
                    - *Org2
                    - *Org3
                    - *Org4
            SampleConsortium3:
                Organizations:
                    - *Org1
                    - *Org2
                    - *Org3
            SampleConsortium2:
                Organizations:
                    - *Org1
                    - *Org2
            SampleConsortium1:
                Organizations:
                    - *Org1
    mych4:
        Consortium: SampleConsortium4
        Application:
            <<: *ApplicationDefaults
            Organizations:
                - *Org1
                - *Org2
                - *Org3
                - *Org4
    mych3:
        Consortium: SampleConsortium3
        Application:
            <<: *ApplicationDefaults
            Organizations:
                - *Org1
                - *Org2
                - *Org3

    mych2:
        Consortium: SampleConsortium2
        Application:
            <<: *ApplicationDefaults
            Organizations:
                - *Org1
                - *Org2

    mych1:
        Consortium: SampleConsortium1
        Application:
            <<: *ApplicationDefaults
            Organizations:
                - *Org1
Organizations:
    - &OrdererOrg
        Name: OrdererOrg
        ID: OrdererMSP
        MSPDir: orderer/msp

    - &Org1
        Name: Org1MSP
        ID: Org1MSP
        MSPDir: org1/peer/msp
        AnchorPeers:
            - Host: peer.org1.example.com
              Port: 17051
    - &Org2
        Name: Org2MSP
        ID: Org2MSP
        MSPDir: org2/peer/msp
        AnchorPeers:
            - Host: peer.org2.example.com
              Port: 27051            
Orderer: &OrdererDefaults
    OrdererType: solo
    Addresses:
        - orderer.example.com:7050
    BatchTimeout: 2s
    BatchSize:
        MaxMessageCount: 10
        AbsoluteMaxBytes: 99 MB
        PreferredMaxBytes: 512 KB
    Organizations:

Application: &ApplicationDefaults
    Organizations:

Answer

VinodRasane picture VinodRasane · Apr 25, 2018

When I got this problem my solutions was pretty simple .. I had already started my network using

/byfn.sh -m up

forgot about it and was trying to start it first by generating the crypto and then using the same command. The problem was resolved as soon as I first downed the old network using

/byfn.sh -m down

and started again with the same up command.