对等通道fectch误差:MSP Sampleorg未在通道上定义

发布于 2025-01-29 16:22:56 字数 2938 浏览 3 评论 0原文

我已经将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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

东走西顾 2025-02-05 16:22:56

我通过修改docker-compose-test-net.yaml来解决此问题组织,对等通道获取命令运行正确。

I solved this problem by modify the docker-compose-test-net.yaml, I split the cli into cli1,cli2,one for each organization, and the peer channel fetch command runs correctly.

鹤舞 2025-02-05 16:22:56

我最近遇到了这个问题。事实证明,我们正在使用的组织名称不一致 - 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文