Hyperledger fabric 当用MSPanchor文件更新我的订购者时,我得到一个错误

Hyperledger fabric 当用MSPanchor文件更新我的订购者时,我得到一个错误,hyperledger-fabric,Hyperledger Fabric,以下是调用的命令和输出。 这是在hyperledger结构网络上设置频道期间进行的 peer channel update -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/Org1MSPanchors.tx 2018-03-22 03:19:34.849 UTC[msp]GetLocalMSP->DEBU 001返回现有本地msp 2018-03-22 03:19:34.849 UTC[msp]GetDefault

以下是调用的命令和输出。 这是在hyperledger结构网络上设置频道期间进行的

peer channel update -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/Org1MSPanchors.tx
2018-03-22 03:19:34.849 UTC[msp]GetLocalMSP->DEBU 001返回现有本地msp 2018-03-22 03:19:34.849 UTC[msp]GetDefaultSigningIdentity->DEBU 002获取默认签名身份 2018-03-22 03:19:34.850 UTC[channelCmd]InitCmdFactory->INFO 003背书人和订购人连接已初始化 错误:通道创建事务无效:通道ID通道不匹配!=我的频道 `


有人遇到过这种情况吗?

尝试运行
对等频道列表
可能不存在同名频道。

尝试运行
对等频道列表
可能不存在同名频道

背书人和订购人连接初始化错误:通道创建事务无效:通道ID通道不匹配!=我的频道

您正在尝试应用配置事务,该事务针对id为<代码>频道的频道,针对id为<代码>我的频道的频道

您需要为
mychannel
重新生成配置事务,或者为
channel
使用现有事务,例如:

peer channel update -o orderer.example.com:7050 -c channel -f ./channel-artifacts/Org1MSPanchors.tx
背书人和订购人连接初始化错误:通道创建事务无效:通道ID通道不匹配!=我的频道

您正在尝试应用配置事务,该事务针对id为<代码>频道的频道,针对id为<代码>我的频道的频道

您需要为
mychannel
重新生成配置事务,或者为
channel
使用现有事务,例如:

peer channel update -o orderer.example.com:7050 -c channel -f ./channel-artifacts/Org1MSPanchors.tx

通常发生此错误的情况是,一个组织是两个不同频道的一部分,但对于给定的配置文件,从configtxgen工具仅创建了一个MSPAnchors.tx文件。理想情况下,您希望为该组织所属的每个频道生成MSPAnchors.tx文件

假设您计划将Org1保留为两个不同通道(Ch1和Ch2)的一部分,则必须为每个通道生成.tx文件:

configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org1MSPanchors1.tx -channelID Ch1 -asOrg Org1MSP
configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org1MSPanchors2.tx -channelID Ch2 -asOrg Org1MSP
这将在通道工件文件夹中创建两个.tx文件:

Org1MSPanchors1.tx
Org1MSPanchors2.tx
然后,为了更新Ch1上的锚节点:

peer channel update -o orderer.example.com:7050 -c ch1 -f ./channel-artifacts/ORG1MSPanchors1.tx
关于Ch2:

peer channel update -o orderer.example.com:7050 -c ch2 -f ./channel-artifacts/ORG1MSPanchors2.tx

上面的通道更新命令假定
核心\u对等\u TLS\u ENABLED
设置为false,否则您必须使用
--cafile
标志提供订购方的CA文件路径

通常发生此错误的情况是,一个组织是两个不同通道的一部分,但仅从中创建了一个MSPAnchors.tx文件为给定配置文件配置TXGEN工具。理想情况下,您希望为该组织所属的每个频道生成MSPAnchors.tx文件

假设您计划将Org1保留为两个不同通道(Ch1和Ch2)的一部分,则必须为每个通道生成.tx文件:

configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org1MSPanchors1.tx -channelID Ch1 -asOrg Org1MSP
configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org1MSPanchors2.tx -channelID Ch2 -asOrg Org1MSP
这将在通道工件文件夹中创建两个.tx文件:

Org1MSPanchors1.tx
Org1MSPanchors2.tx
然后,为了更新Ch1上的锚节点:

peer channel update -o orderer.example.com:7050 -c ch1 -f ./channel-artifacts/ORG1MSPanchors1.tx
关于Ch2:

peer channel update -o orderer.example.com:7050 -c ch2 -f ./channel-artifacts/ORG1MSPanchors2.tx
上述通道更新命令假定
核心\u对等\u TLS\u启用
设置为false,否则您必须使用
--cafile
标志提供订购方的CA文件路径