【发布时间】:2020-02-14 17:18:51
【问题描述】:
我正在运行 Hyperledger Fabric v1.2。我有一个 orderer、ca、kafka 和 peers 在不同的服务器上运行。生成证书并将其放置在服务器上各自的位置,然后我生成创世块和通道 tx 文件,然后启动 orderer 和 peers。
但是,当我使用以下命令创建通道时,我会在订购者日志的底部收到以下消息。
./peer channel create -o orderer1.example.com:7050 -c mychannel -f /etc/hyperledger/fabric/channels/mychannel.tx
到目前为止,一切似乎都还可以,并且工作正常。
2018-08-21 19:25:30.957 UTC [cauthdsl] func2 -> DEBU 1a5 0xc42000e740 identity 0 does not satisfy principal: the identity is a member of a different MSP (expected SampleOrg, got SampleOrgMSP)
2018-08-21 19:25:30.957 UTC [cauthdsl] func2 -> DEBU 1a6 0xc42000e740 principal evaluation fails
2018-08-21 19:25:30.957 UTC [cauthdsl] func1 -> DEBU 1a7 0xc42000e740 gate 1534879530956937482 evaluation fails
2018-08-21 19:25:30.957 UTC [policies] Evaluate -> DEBU 1a8 Signature set did not satisfy policy /Channel/Application/SampleOrg/Admins
2018-08-21 19:25:30.957 UTC [policies] Evaluate -> DEBU 1a9 == Done Evaluating *cauthdsl.policy Policy /Channel/Application/SampleOrg/Admins
2018-08-21 19:25:30.957 UTC [policies] func1 -> DEBU 1aa Evaluation Failed: Only 0 policies were satisfied, but needed 1 of [ SampleOrg.Admins ]
2018-08-21 19:25:30.957 UTC [policies] Evaluate -> DEBU 1ab Signature set did not satisfy policy /Channel/Application/ChannelCreationPolicy
2018-08-21 19:25:30.957 UTC [policies] Evaluate -> DEBU 1ac == Done Evaluating *policies.implicitMetaPolicy Policy /Channel/Application/ChannelCreationPolicy
2018-08-21 19:25:30.957 UTC [orderer/common/broadcast] Handle -> WARN 1ad [channel: mychannel] Rejecting broadcast of config message from xxx.xxx.xxx.xxx:1234 because of error: error authorizing update: error validating DeltaSet: policy for [Group] /Channel/Application not satisfied: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining
2018-08-21 19:25:30.957 UTC [orderer/common/server] func1 -> DEBU 1ae Closing Broadcast stream
2018-08-21 19:25:30.959 UTC [grpc] Printf -> DEBU 1af transport: http2Server.HandleStreams failed to read frame: read tcp xxx.xxx.xxx.xxx:7050->xxx.xxx.xxx.xxx:1234: read: connection reset by peer
2018-08-21 19:25:30.959 UTC [common/deliver] Handle -> WARN 1b0 Error reading from xxx.xxx.xxx.xxx:1234: rpc error: code = Canceled desc = context canceled
2018-08-21 19:25:30.959 UTC [orderer/common/server] func1 -> DEBU 1b1 Closing Deliver stream
我认为这是在订购者的 configtx 文件中声明策略的方式,但我不确定。
configtx.yaml 中的部分
Organizations:
- &SampleOrdererOrg
Name: SampleOrdererOrg
ID: SampleOrdererMSP
MSPDir: /etc/hyperledger/orderer1/msp
Policies: &SampleOrgPolicies
Readers:
Type: Signature
Rule: "OR('SampleOrdererOrg.member')"
Writers:
Type: Signature
Rule: "OR('SampleOrdererOrg.member')"
Admins:
Type: Signature
Rule: "OR('SampleOrdererOrg.admin')"
- &SampleOrg
Name: SampleOrg
ID: SampleOrgMSP
MSPDir: /etc/hyperledger/org/msp/
Policies: &SampleOrgPolicies
Readers:
Type: Signature
Rule: "OR('SampleOrg.member')"
Writers:
Type: Signature
Rule: "OR('SampleOrg.member')"
Admins:
Type: Signature
Rule: "OR('SampleOrg.admin')"
AnchorPeers:
- Host: peer1.example.com
Port: 7051
- Host: peer2.example.com
Port: 7051
- Host: peer3.example.com
Port: 7051
Profiles:
SampleKafkaDev:
<<: *ChannelDefaults
Orderer:
<<: *OrdererDefaults
OrdererType: kafka
Organizations:
- <<: *SampleOrg
Policies:
<<: *SampleOrgPolicies
Admins:
Type: Signature
Rule: "OR('SampleOrg.member')"
Application:
<<: *ApplicationDefaults
Organizations:
- <<: *SampleOrg
Policies:
<<: *SampleOrgPolicies
Admins:
Type: Signature
Rule: "OR('SampleOrg.member')"
Consortiums:
SampleConsortium:
Organizations:
- <<: *SampleOrg
Policies:
<<: *SampleOrgPolicies
Admins:
Type: Signature
Rule: "OR('SampleOrg.member')"
MyChannel:
Consortium: SampleConsortium
Application:
<<: *ApplicationDefaults
Organizations:
- *SampleOrg
【问题讨论】:
标签: hyperledger-fabric hyperledger