【问题标题】:Error encountered in the "session.sendAndReceiveWithRetry(tx)"在“session.sendAndReceiveWithRetry(tx)”中遇到错误
【发布时间】:2018-06-05 21:27:50
【问题描述】:

我们的应用目前使用 Corda V2.0,并部署到专用服务器,我们使用 3 个公证人并配置了 RAFT,但是当有交易的输入状态时,在日志中发现以下错误

messaging.NodeMessagingClient.sendWithRetry - Reached the maximum number of retries (3) for message ClientMessageImpl

在阅读了FinalityFlow的代码后,我们发现这个错误应该发生在NotaryFlow.kt中以下代码的“session.sendAndReceiveWithRetry(tx)”步骤中

val response = try {
                val session = initiateFlow(notaryParty)
                if (serviceHub.networkMapCache.isValidatingNotary(notaryParty)) {
                    subFlow(SendTransactionWithRetry(session, stx))
                    session.receive<List<TransactionSignature>>()
                } else {
                    val tx: Any = if (stx.isNotaryChangeTransaction()) {
                        stx.notaryChangeTx
                    } else {
                        stx.buildFilteredTransaction(Predicate { it is StateRef || it is TimeWindow || it == notaryParty })
                    }
                    session.sendAndReceiveWithRetry(tx)
                }
            } catch (e: NotaryException) {
                if (e.error is NotaryError.Conflict) {
                    e.error.conflict.verified()
                }
                throw e
            }

我们尝试在节点之间相互ping通,公证人1、2和3的RPC端口都在监听,但是从错误信息来看,我们不确定这是不是由于通信/消息不能在节点和公证人之间工作。 Notaries 节点正在运行,并且其日志中没有任何错误。

所以我们想知道用 RPC 端口相互 ping 是否可以确保它们之间的消息传递能够正常工作?是否有任何方法可以测试两个节点(节点和公证人)之间的消息是否可以正确发送和接收?非常感谢。

【问题讨论】:

标签: corda


【解决方案1】:

Corda 3 中存在一个已知错误,即重启 Raft 公证集群后,它不再为客户端请求提供服务。相反,Raft 集群最终会被多个领导者分区。

Corda 的 JIRA 板上正在跟踪此问题:https://r3-cev.atlassian.net/browse/CORDA-1527

【讨论】:

  • 嗨乔尔,我认为这不仅适用于 RAFT 部分,似乎它喜欢 rpc 套接字重新连接地址找不到导致网络恢复后重试
猜你喜欢
  • 1970-01-01
  • 2018-01-22
  • 2015-10-04
  • 1970-01-01
  • 2017-10-11
  • 2017-01-02
  • 2011-07-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多