Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kafka standalone error: WARN Attempting to send response via channel for which there is no open connection, connection id 0 (kafka.network.Processor)

I install kafka on a standalone server and try to stream data to mongodb. when start kafka service, bin/kafka-server-start.sh config/server.properties I had a warning: WARN Attempting to send response via channel for which there is no open connection, connection id 0 (kafka.network.Processor)

Even though, there is no problem for data entered at producer and displayed at consumer.

but I think this cause the data write to mongodb. I have no data write to mongodb after start data streaming.

anyone can help with this issue? Thank you so much.

like image 624
Robin Avatar asked Nov 07 '22 16:11

Robin


1 Answers

  //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)
    }

so, channel was closed by the selector because it was idle too long

like image 115
michael_stackof Avatar answered Nov 15 '22 09:11

michael_stackof