seshanth charan dos
seshanth charan dos

Reputation: 53

Channel creation fails in Hyperledger v1.2

I am trying to start a network. The network starts correctly, but channel creation fails.

peer channel create -o orderer-dpm:7050 -f /etc/hyperledger/config/userchannel.pb -c userchannel

Hyperledger - attempt to set key [Policy] /Channel/Application/Writers to version 0, but key is at version 0

The output from docker logs command is ,

    2018-08-31 03:20:54.933 UTC [cauthdsl] func2 -> DEBU 0ee 0xc4200b20b8 principal evaluation succeeds for identity 0
2018-08-31 03:20:54.933 UTC [cauthdsl] func2 -> DEBU 0ef 0xc4200b20b8 signed by 1 principal evaluation starts (used [true])
2018-08-31 03:20:54.933 UTC [cauthdsl] func2 -> DEBU 0f0 0xc4200b20b8 skipping identity 0 because it has already been used
2018-08-31 03:20:54.933 UTC [cauthdsl] func2 -> DEBU 0f1 0xc4200b20b8 principal evaluation fails
2018-08-31 03:20:54.933 UTC [cauthdsl] func1 -> DEBU 0f2 0xc4200b20b8 gate 1535685654932879190 evaluation succeeds
2018-08-31 03:20:54.933 UTC [policies] Evaluate -> DEBU 0f3 Signature set satisfies policy /Channel/Orderer/Ordererdpm/Writers
2018-08-31 03:20:54.933 UTC [policies] Evaluate -> DEBU 0f4 == Done Evaluating *cauthdsl.policy Policy /Channel/Orderer/Ordererdpm/Writers
2018-08-31 03:20:54.933 UTC [policies] Evaluate -> DEBU 0f5 Signature set satisfies policy /Channel/Orderer/Writers
2018-08-31 03:20:54.933 UTC [policies] Evaluate -> DEBU 0f6 == Done Evaluating *policies.implicitMetaPolicy Policy /Channel/Orderer/Writers
2018-08-31 03:20:54.933 UTC [policies] Evaluate -> DEBU 0f7 Signature set satisfies policy /Channel/Writers
2018-08-31 03:20:54.933 UTC [policies] Evaluate -> DEBU 0f8 == Done Evaluating *policies.implicitMetaPolicy Policy /Channel/Writers
2018-08-31 03:20:54.933 UTC [common/configtx] addToMap -> DEBU 0f9 Adding to config map: [Group]  /Channel
2018-08-31 03:20:54.934 UTC [common/configtx] addToMap -> DEBU 0fa Adding to config map: [Group]  /Channel/Application
2018-08-31 03:20:54.934 UTC [common/configtx] addToMap -> DEBU 0fb Adding to config map: [Group]  /Channel/Application/Ordererdpm
2018-08-31 03:20:54.934 UTC [common/configtx] addToMap -> DEBU 0fc Adding to config map: [Value]  /Channel/Consortium
2018-08-31 03:20:54.934 UTC [common/configtx] addToMap -> DEBU 0fd Adding to config map: [Group]  /Channel
2018-08-31 03:20:54.934 UTC [common/configtx] addToMap -> DEBU 0fe Adding to config map: [Group]  /Channel/Application
2018-08-31 03:20:54.934 UTC [common/configtx] addToMap -> DEBU 0ff Adding to config map: [Group]  /Channel/Application/Ordererdpm
2018-08-31 03:20:54.934 UTC [common/configtx] addToMap -> DEBU 100 Adding to config map: [Value]  /Channel/Application/Ordererdpm/AnchorPeers
2018-08-31 03:20:54.934 UTC [common/configtx] addToMap -> DEBU 101 Adding to config map: [Value]  /Channel/Application/Capabilities
2018-08-31 03:20:54.934 UTC [common/configtx] addToMap -> DEBU 102 Adding to config map: [Value]  /Channel/Application/ACLs
2018-08-31 03:20:54.934 UTC [common/configtx] addToMap -> DEBU 103 Adding to config map: [Policy] /Channel/Application/Admins
2018-08-31 03:20:54.934 UTC [common/configtx] addToMap -> DEBU 104 Adding to config map: [Policy] /Channel/Application/Readers
2018-08-31 03:20:54.934 UTC [common/configtx] addToMap -> DEBU 105 Adding to config map: [Policy] /Channel/Application/Writers
2018-08-31 03:20:54.934 UTC [common/configtx] addToMap -> DEBU 106 Adding to config map: [Value]  /Channel/Consortium
2018-08-31 03:20:54.934 UTC [common/configtx] verifyDeltaSet -> DEBU 107 Processing change to key: [Policy] /Channel/Application/Readers
2018-08-31 03:20:54.934 UTC [orderer/common/broadcast] Handle -> WARN 108 [channel: userchannel] Rejecting broadcast of config message from 172.23.0.6:57278 because of error: error authorizing update: error validating DeltaSet: attempt to set key [Policy] /Channel/Application/Readers to version 0, but key is at version 0
2018-08-31 03:20:54.934 UTC [orderer/common/server] func1 -> DEBU 109 Closing Broadcast stream
2018-08-31 03:20:54.936 UTC [grpc] Printf -> DEBU 10a transport: http2Server.HandleStreams failed to read frame: read tcp 172.23.0.3:7050->172.23.0.6:57278: read: connection reset by peer
2018-08-31 03:20:54.936 UTC [common/deliver] Handle -> WARN 10b Error reading from 172.23.0.6:57276: rpc error: code = Canceled desc = context canceled

Any clues what may be the reason for this error.

Upvotes: 2

Views: 398

Answers (1)

seshanth charan dos
seshanth charan dos

Reputation: 53

The problem was when creating the genesis block using configtxgen. The channel name has to be given using -channelID . What I did wrong is ,I gave same channelID for genesis block and channel.tx .

Thanks to Dylan L's answer. This can be solved by giving a channelID while creating channel using configtxgen.

configtxgen -profile genesisProfile -outputBlock genesis.block
configtxgen -profile channelprofile -outputCreateChannelTx mychannel.tx -channelID mychannel

Upvotes: 1

Related Questions