チャネルの作成中にエラーが発生しましたが、このポリシーでは「ライター」サブポリシーの1つを満たす必要があります:許可が拒否されました

ベンティペ

チャネルの作成中にエラーが発生しました:

Error: got unexpected status: FORBIDDEN -- implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Writers' sub-policies to be satisfied: permission denied

注文者は次のように言います

WARN 025 [channel: testchannel] Rejecting broadcast of config message from 192.168.0.121:39954 because of error: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Writers' sub-policies to be satisfied: permission denied

ピアコンテナ内で次のコマンドを使用します。

export CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/crypto-config/peer/msp/users/admin/msp/

peer channel create -c testchannel -f testchannel.tx --outputBlock testchannel.block --tls --cafile /etc/hyperledger/crypto-config/peer/tls-msp/cacerts/192-168-0-114-7054.pem -o 192.168.0.124:7050

このチャンネルのポリシーは次のとおりです。

Channel: &ChannelDefaults
    # Policies defines the set of policies at this level of the config tree
    # For Channel policies, their canonical path is 
    Policies:
        # Who may invoke the 'Deliver' API
        Readers:
            Type: ImplicitMeta
            Rule: "ANY Readers"
        # Who may invoke the 'Broadcast' API
        Writers:
            Type: ImplicitMeta
            Rule: "ANY Writers"
        # By default, who may modify elements at this config level
        Admins:
            Type: ImplicitMeta
            Rule: "MAJORITY Admins"

    # Capabilities describes the channel level capabilities, see the
    # dedicated Capabilities section elsewhere in this file for a full
    # description
    Capabilities:
        <<: *ChannelCapabilities

私は3つのノードとv1.4.1でetcdraftを使用しています

編集1:

私はCliコンテナーを持っていません、そのcliコンテナーからそれを行う必要がありますか?現在、このすべてのコマンドをピアコンテナから実行しています。

編集2:

adminのmspフォルダーにadminの証明書を含むadmincertsフォルダーを追加すると、次のようになります。

  • 管理者
    • msp
      • admincerts
      • signcerts
      • ..。

エラーが発生します:

このポリシーでは、「ライター」サブポリシーの1つが満たされている必要があります:許可が拒否されました

しかし、それを追加しないと、エラーが発生します。

このポリシーでは、「管理者」サブポリシーの1つが満たされている必要があります:許可が拒否されました

ベンティペ

それを修正したので、これはポリシーの問題でした。confitx.ymlで組織レベルのポリシーを編集する必要がありました。

メンバーをリーダーとライターとして追加し、管理者のみを管理者として追加しました

    - &Example
        # DefaultOrg defines the organization which is used in the sampleconfig
        # of the fabric.git development environment
        Name: Example

        # ID to load the MSP definition as
        ID: ExampleMSP

        MSPDir: <pathtomsp>

        Policies:
            Readers:
                Type: Signature
                Rule: "OR('ExampleMSP.member')"
            Writers:
                Type: Signature
                Rule: "OR('ExampleMSP.member')"
            Admins:
                Type: Signature
                Rule: "OR('ExampleMSP.admin')"

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

Related 関連記事

ホットタグ

アーカイブ