我的fabric版本是1.1.0-preview,peer、orderer、configtxgen是新生成的。
当我执行 configtxgen 工具时:
configtxgen -profile SoloOrdererGenesis -outputBlock genesis.block
configtxgen -profile mych -outputCreateChannelTx channel-artifacts/mych.tx -channelID mych
它生成 genesis.block 和 mych.tx,channelName 是 mych。
然后 orderer 以 genesis.block 开始,我执行以下操作:
peer channel create -f mych.tx -o orderer.example.com:7050 -c mych
它抛出错误,
Error: got unexpected status: FORBIDDEN -- Failed to reach implicit threshold of 1 sub-policies, required 1 remaining: permission denied
哪一步错了?
我的 configtx.yaml 文件是:
---
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:
最佳答案
当我遇到这个问题时,我的解决方案非常简单..我已经开始使用我的网络
/byfn.sh -m up
忘记了它并试图首先通过生成加密然后使用相同的命令来启动它。
我第一次使用旧网络关闭后,问题就解决了
/byfn.sh -m down
并使用相同的 up 命令再次启动。
关于hyperledger-fabric - 错误 : got unexpected status: FORBIDDEN -- Failed to reach implicit threshold of 1 sub-policies, 需要 1 个剩余:权限被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48151804/