【问题标题】:Channel creation fails in Hyperledger v1.2Hyperledger v1.2 中的通道创建失败
【发布时间】:2018-09-21 20:12:28
【问题描述】:

我正在尝试启动网络。网络正常启动,但频道创建失败。

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

Hyperledger - 尝试将密钥 [Policy] /Channel/Application/Writers 设置为版本 0,但密钥为版本 0

docker logs 命令的输出是,

    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

任何线索可能是导致此错误的原因。

【问题讨论】:

    标签: hyperledger-fabric


    【解决方案1】:

    问题出在使用 configtxgen 创建创世块时。频道名称必须使用 -channelID 给出。我做错的是,我为创世块和 channel.tx 提供了相同的 channelID。

    感谢Dylan L's answer。 这可以通过在使用 configtxgen 创建频道时提供频道 ID 来解决。

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

    【讨论】:

      猜你喜欢
      • 2019-01-06
      • 2019-05-21
      • 1970-01-01
      • 2019-02-04
      • 2019-07-26
      • 2018-01-25
      • 2019-06-01
      • 2016-07-11
      • 2018-06-19
      相关资源
      最近更新 更多