1. 程式人生 > 其它 >成功解決0 sub-policies were satisfied, but this policy requires 1 of the ‘Writers‘ sub-policies to be sa

成功解決0 sub-policies were satisfied, but this policy requires 1 of the ‘Writers‘ sub-policies to be sa

技術標籤:區塊鏈Hyperledger Fabric 2.xfabric區塊鏈linux

在Fabric網路中建立通道時報錯:

Error: got unexpected status: FORBIDDEN -- config update for existing channel did not pass initial checks: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Writers' sub-policies to be satisfied: permission denied

在這裡插入圖片描述

原因通過configtxgen命令生成創世區塊時使用的通道名與建立通道時使用的通道名一樣,如下所示,channelID-c通道名均為amops

configtxgen -profile SampleMultiNodeEtcdRaft -channelID amops -outputBlock ./channel-artifacts/genesis.block
peer channel create -o agridepartorderer.amops.com:7050 -c amops -f ./channel-artifacts/channel.tx --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/amops.com/orderers/agridepartorderer.amops.com/msp/tlscacerts/tlsca.amops.com-cert.pem

configtxgen指令中的channel修改成不一樣的即可

configtxgen -profile SampleMultiNodeEtcdRaft -channelID amopsdeploy -outputBlock ./channel-artifacts/genesis.block

重啟Fabric網路後解決如上問題

成功解決:Error: got unexpected status: FORBIDDEN -- config update for existing channel did not pass initial checks: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Writers' sub-policies to be satisfied: permission denied

的問題。

歡迎小夥伴討論,文章內容如有錯誤請在評論區評論或發私聊訊息,謝謝你。