gpt4 book ai didi

connection - Kafka 独立错误 : WARN Attempting to send response via channel for which there is no open connection, 连接 ID 0(kafka.network.Processor)

转载 作者:行者123 更新时间:2023-12-02 03:00:17 26 4
gpt4 key购买 nike

我在独立服务器上安装 kafka 并尝试将数据流式传输到 mongodb。
启动kafka服务时,bin/kafka-server-start.sh config/server.properties
我有一个警告:
警告尝试通过没有打开连接的 channel 发送响应,连接 id 0 (kafka.network.Processor)

尽管如此,在生产者处输入并在消费者处显示的数据没有问题。

但我认为这会导致数据写入 mongodb。开始数据流后,我没有数据写入 mongodb。

任何人都可以帮助解决这个问题?非常感谢。

最佳答案

  //processor.sendResponse
protected[network] def sendResponse(response: RequestChannel.Response) {
trace(s"Socket server received response to send, registering for write and sending data: $response")
val channel = selector.channel(response.responseSend.destination)
// `channel` can be null if the selector closed the connection because it was idle for too long
if (channel == null) {
warn(s"Attempting to send response via channel for which there is no open connection, connection id $id")
response.request.updateRequestMetrics()
}
else {
selector.send(response.responseSend)
inflightResponses += (response.request.connectionId -> response)
}

所以, channel 被选择器关闭,因为它空闲时间太长

关于connection - Kafka 独立错误 : WARN Attempting to send response via channel for which there is no open connection, 连接 ID 0(kafka.network.Processor),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46532543/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com