Channel creation fails in Hyperledger Fabric v1.2

夙愿已清 提交于 2019-12-04 07:14:35

I got the solution from JSKIM. Since you are using the fabric v1.2, the orderer will create a default channel when the orderer node started up with the genesis block.

I guess you are using configtxgen to generate your own channel artifacts but ignore the naming rules of the channel. So when your exec into your orderer's container:

docker exec -it <orderer's container ID> bash

and cd into the chains directory, which is set to /var/hyperledger/production/orderer/chains by default. You will notice that there is already a channel exits.

Here is the solution:

configtxgen -profile testOrgsOrdererGenesis -channelID testchannel -outputBlock ./crypto-config/ordererOrganizations/orderer.block
configtxgen -profile testorgschannel -channelID mychannel-outputCreateChannelTx ./crypto-config/ordererOrganizations/mychannel.tx

when you generate the genesis block, using channelID to specific it. Or you can rename your channel when your create channel configuration transaction.

I finally managed to pass this error by changing the name of the generated channel. However, this does not explain why some names do not work.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!