Hyperledger Fabric-通道尚未启动

时间:2019-07-30 15:18:27

标签: apache-kafka hyperledger-fabric hyperledger

不幸的是,码头工人停运后,我们的测试通道之一已停止正常工作。这是先前使用的“对等链码调用”命令的输出:

Error: error sending transaction for invoke: got unexpected status: SERVICE_UNAVAILABLE -- will not enqueue, consenter for this channel hasn't started yet - proposal response: version:1 response:<status:200 payload:"be85bda14845a33cd07db9825d2e473dc65902e6986fdfccea30d8c32385f758" > payload:"\n \364\242+\t\222\216\361\020\024}d7\203\277WY04\233\225vA\376u\330r\2045\312\206\304\333\022\211\001\n3\022\024\n\004lscc\022\014\n\n\n\004strs\022\002\010\004\022\033\n\004strs\022\023\032\021\n\tkeepalive\032\004ping\032E\010\310\001\032@be85bda14845a33cd07db9825d2e473dc65902e6986fdfccea30d8c32385f758\"\013\022\004strs\032\0031.0" endorsement:<endorser:"\n\013BackboneMSP\022\203\007-----BEGIN CERTIFICATE----- etc. more output removed from here 

我在订购者的日志中找到了这个

2019-07-29 14:46:50.930 UTC [orderer/consensus/kafka] try -> DEBU 3c10 [channel: steel] Connecting to the Kafka cluster
2019-07-29 14:46:50.931 UTC [orderer/consensus/kafka] try -> DEBU 3c11 [channel: steel] Need to retry because process failed = kafka server: The requested offset is outside the range of offsets maintained by the server for the given topic/partition.
2019-07-29 14:46:56.967 UTC [common/deliver] Handle -> WARN 3c12 Error reading from 10.0.0.4:32800: rpc error: code = Canceled desc = context canceled
2019-07-29 14:46:56.967 UTC [orderer/common/server] func1 -> DEBU 3c13 Closing Deliver stream
2019-07-29 14:46:56.972 UTC [orderer/common/server] Deliver -> DEBU 3c14 Starting new Deliver handler
2019-07-29 14:46:56.972 UTC [common/deliver] Handle -> DEBU 3c15 Starting new deliver loop for 10.0.0.4:32802
2019-07-29 14:46:56.973 UTC [common/deliver] Handle -> DEBU 3c16 Attempting to read seek info message from 10.0.0.4:32802
2019-07-29 14:46:56.973 UTC [common/deliver] deliverBlocks -> WARN 3c17 [channel: steel] Rejecting deliver request for 10.0.0.4:32802 because of consenter error
2019-07-29 14:46:56.973 UTC [common/deliver] Handle -> DEBU 3c18 Waiting for new SeekInfo from 10.0.0.4:32802
2019-07-29 14:46:56.973 UTC [common/deliver] Handle -> DEBU 3c19 Attempting to read seek info message from 10.0.0.4:32802
2019-07-29 14:46:56.995 UTC [common/deliver] Handle -> WARN 3c1a Error reading from 10.0.0.23:49844: rpc error: code = Canceled desc = context canceled
2019-07-29 14:46:56.995 UTC [orderer/common/server] func1 -> DEBU 3c1b Closing Deliver stream

这是来自认可方同行的日志:

2019-07-29 15:14:17.829 UTC [ConnProducer] DisableEndpoint -> WARN 3d6 Only 1 endpoint remained, will not black-list it
2019-07-29 15:14:17.834 UTC [blocksProvider] DeliverBlocks -> WARN 3d7 [steel] Got error &{SERVICE_UNAVAILABLE}
2019-07-29 15:14:27.839 UTC [blocksProvider] DeliverBlocks -> WARN 3d8 [steel] Got error &{SERVICE_UNAVAILABLE}

我使用这些docker映像:

  • hyperledger / fabric-kafka:0.4.10
  • hyperledger / fabric-orderer:1.2.0
  • hyperledger / fabric-peer:1.2.0

基于上述情况,我假设订购者与相应的kafka主题之间的一致性被破坏了。如果我将请求重定向到另一个订购者或强制更改kafka主题负责人,这也无济于事。如果设置了KAFKA_LOG_RETENTION_MS = -1是否正确,是否可以防止此错误?

查看档案后,我发现无法修复此错误。正如我所看到的,我不能只关闭一个通道,如果我不希望订购者日志中出现连续的错误消息,甚至必须停止订阅该通道的所有对等设备。在像我这样的情况下,最佳做法是什么?

有关; 桑德尔

1 个答案:

答案 0 :(得分:0)

  

同意错误


  

这意味着在连接建立之前您正在尝试的黑白卡夫卡和订购者   做一些操作。

Which means there is an error present in between kafka and orderer

注意:可能您建立的连接不稳定       尝试检查订购者的日志,其中应该有一条消息已发布       成功。       每当Kafka,订购者尝试连接时,订购者都会在以下情况中发布消息:       成功发布到某个主题,这表示您已正确配置

确保连接黑白卡夫卡和订购者的配置正确

2019-07-29 14:46:50.931 UTC [orderer/consensus/kafka] try -> DEBU 3c11 [channel: steel] Need to retry because process failed = kafka server: The requested offset is outside the range of offsets maintained by the server for the given topic/partition.

通过上述线索,Kafka可以与订购者一起完成 尝试检查this