对等通道fectch误差:MSP Sampleorg未在通道上定义
我已经将HyperLeDger面料和CD部署到织物样本/测试网络中,我可以运行命令./ network.sh up createChannel
,容器的状态为“ UP”,我可以裁员链代码。 但是,当我打算运行命令
peer channel fetch config config_block.pb -o $ORDERER_CONTAINER -c $CH_NAME --tls --cafile $TLS_ROOT_CA
以获取频道配置时,我已经
2022-05-17 10:09:31.644 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2022-05-17 10:09:31.647 UTC [cli.common] readBlock -> INFO 002 Expect block, but got status: &{FORBIDDEN}
Error: can't read the block: &{FORBIDDEN}
检查了订单器的日志,它给了
2022-05-16 11:39:04.803 UTC [policies] SignatureSetToValidIdentities -> WARN 061 invalid identity: certificate subject=CN=peer0.org1.example.com,OU=COP,L=San Francisco,ST=California,C=US serialnumber=268337738708423250738667250199689187829 error="MSP SampleOrg is not defined on channel"
2022-05-16 11:39:04.803 UTC [policies] SignatureSetToValidIdentities -> WARN 062 invalid identity: certificate subject=CN=peer0.org1.example.com,OU=COP,L=San Francisco,ST=California,C=US serialnumber=268337738708423250738667250199689187829 error="MSP SampleOrg is not defined on channel"
2022-05-16 11:39:04.803 UTC [policies] SignatureSetToValidIdentities -> WARN 063 invalid identity: certificate subject=CN=peer0.org1.example.com,OU=COP,L=San Francisco,ST=California,C=US serialnumber=268337738708423250738667250199689187829 error="MSP SampleOrg is not defined on channel"
2022-05-16 11:39:04.803 UTC [common.deliver] deliverBlocks -> WARN 064 [channel: mychannel] Client 12.11.52.5:50846 is not authorized: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Readers' sub-policies to be satisfied: permission denied
我注意到,在network.sh up createChannel
日志中,命令运行 的结果
Fetching the most recent configuration block for the channel
+ peer channel fetch config config_block.pb -o orderer.example.com:7050 --ordererTLSHostnameOverride orderer.example.com -c mychannel --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
2022-05-16 15:35:42.810 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2022-05-16 15:35:42.816 UTC [cli.common] readBlock -> INFO 002 Received block: 1
2022-05-16 15:35:42.816 UTC [channelCmd] fetch -> INFO 003 Retrieving last config block: 1
2022-05-16 15:35:42.818 UTC [cli.common] readBlock -> INFO 004 Received block: 1
Decoding config block to JSON and isolating config to Org2MSPconfig.json
+ configtxlator proto_decode --input config_block.pb --type common.Block
+ jq '.data.data[0].payload.data.config'
正确地使用了我尝试在日志中复制相同命令 ,然后在cli bash
中运行它。 结果仍然相同。
我找不到类似的错误,也不明白为什么我得到这个错误。 有人有想法吗?
I've deployed Hyperledger Fabric and cd into fabric-samples/test-network, I can run the command ./network.sh up createChannel
, the containers' status are "up" and I can delploy a chaincode.
However, when I intend to run the command
peer channel fetch config config_block.pb -o $ORDERER_CONTAINER -c $CH_NAME --tls --cafile $TLS_ROOT_CA
to fetch the channel config, I got
2022-05-17 10:09:31.644 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2022-05-17 10:09:31.647 UTC [cli.common] readBlock -> INFO 002 Expect block, but got status: &{FORBIDDEN}
Error: can't read the block: &{FORBIDDEN}
I've checked the orderer's log, and it gives
2022-05-16 11:39:04.803 UTC [policies] SignatureSetToValidIdentities -> WARN 061 invalid identity: certificate subject=CN=peer0.org1.example.com,OU=COP,L=San Francisco,ST=California,C=US serialnumber=268337738708423250738667250199689187829 error="MSP SampleOrg is not defined on channel"
2022-05-16 11:39:04.803 UTC [policies] SignatureSetToValidIdentities -> WARN 062 invalid identity: certificate subject=CN=peer0.org1.example.com,OU=COP,L=San Francisco,ST=California,C=US serialnumber=268337738708423250738667250199689187829 error="MSP SampleOrg is not defined on channel"
2022-05-16 11:39:04.803 UTC [policies] SignatureSetToValidIdentities -> WARN 063 invalid identity: certificate subject=CN=peer0.org1.example.com,OU=COP,L=San Francisco,ST=California,C=US serialnumber=268337738708423250738667250199689187829 error="MSP SampleOrg is not defined on channel"
2022-05-16 11:39:04.803 UTC [common.deliver] deliverBlocks -> WARN 064 [channel: mychannel] Client 12.11.52.5:50846 is not authorized: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Readers' sub-policies to be satisfied: permission denied
I noticed that in the network.sh up createChannel
logs, the command run correctly with results like
Fetching the most recent configuration block for the channel
+ peer channel fetch config config_block.pb -o orderer.example.com:7050 --ordererTLSHostnameOverride orderer.example.com -c mychannel --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
2022-05-16 15:35:42.810 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2022-05-16 15:35:42.816 UTC [cli.common] readBlock -> INFO 002 Received block: 1
2022-05-16 15:35:42.816 UTC [channelCmd] fetch -> INFO 003 Retrieving last config block: 1
2022-05-16 15:35:42.818 UTC [cli.common] readBlock -> INFO 004 Received block: 1
Decoding config block to JSON and isolating config to Org2MSPconfig.json
+ configtxlator proto_decode --input config_block.pb --type common.Block
+ jq '.data.data[0].payload.data.config'
I've tried copy the same commands in the logs, and run it in the cli bash
The results is still the same.
I can't find similar errors and I don't understand why I got this.
Does anyone have any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我通过修改
docker-compose-test-net.yaml
来解决此问题组织,对等通道获取
命令运行正确。I solved this problem by modify the
docker-compose-test-net.yaml
, I split thecli
intocli1,cli2
,one for each organization, and thepeer channel fetch
command runs correctly.我最近遇到了这个问题。事实证明,我们正在使用的组织名称不一致 -
org1
在执行以后的连接时注册对等时vs.org1
I had this problem recently. Turns out the org names we were using were inconsistent -
org1
when registering peers vs.Org1
when performing a later connection