Reputation: 79
The following is the command called and the output. This is during setting up channels on a hyperledger fabric network.
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 Returning existing local MSP 2018-03-22 03:19:34.849 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity 2018-03-22 03:19:34.850 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized Error: Invalid channel create transaction : mismatched channel ID channel != mychannel `
Has anyone encountered this?
Upvotes: 0
Views: 1131
Reputation: 872
A situation when this error usually occurs is when an Org is part of 2 different channels but only 1 MSPAnchors.tx file has been created from configtxgen tool for a given profile. Ideally, you would want to generate MSPAnchors.tx file for each channel which that Org will be part of.
Assume you are planning to keep Org1 as part of 2 different channels (Ch1 and Ch2), then you will have to generate .tx file for each of these channels:
configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org1MSPanchors1.tx -channelID Ch1 -asOrg Org1MSP
configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org1MSPanchors2.tx -channelID Ch2 -asOrg Org1MSP
This will create two .tx files in Channel-Artifacts folder:
Org1MSPanchors1.tx
Org1MSPanchors2.tx
Then for updating anchor peers on Ch1:
peer channel update -o orderer.example.com:7050 -c ch1 -f ./channel-artifacts/ORG1MSPanchors1.tx
And on Ch2:
peer channel update -o orderer.example.com:7050 -c ch2 -f ./channel-artifacts/ORG1MSPanchors2.tx
The above channel update command is assuming that CORE_PEER_TLS_ENABLED
is set to false otherwise you'll have to provide CA file path of Orderer using --cafile
flag
Upvotes: 1
Reputation: 41222
Endorser and orderer connections initialized Error: Invalid channel create transaction : mismatched channel ID channel != mychannel
You are trying to apply configuration transaction which aimed for channel with id channel
, for channel id mychannel
.
You either need to regenerate config transaction for mychannel
or to use existing one for channel
, e.g.:
peer channel update -o orderer.example.com:7050 -c channel -f ./channel-artifacts/Org1MSPanchors.tx
Upvotes: 1
Reputation: 1
Try run peer channel list
maybe channel with such name doesn't exist.
Upvotes: 0