question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WARN [SocketServer brokerId=1] Unexpected error from /IPaddress; closing connection (org.apache.kafka.common.network.Selector)

See original GitHub issue

Hi Team, i have a 3 node kafka cluster running on kubernetes with quite a standard configuration (see below) and external node ports exposed. The cluster works as expected, the only problem i have is a bunch of log messages in broker nodes

apiVersion: kafka.strimzi.io/v1beta1
kind: Kafka
metadata:
  name: my-cluster
spec:
  kafka:
    version: 2.5.0
    replicas: 3
    listeners:
      plain: {}
      tls: {}
      external:
        type: nodeport
        tls: false
    config:
      offsets.topic.replication.factor: 3
      transaction.state.log.replication.factor: 3
      transaction.state.log.min.isr: 2
      log.message.format.version: "2.5"
    storage:
      type: jbod
      volumes:
      - id: 0
        type: persistent-claim
        size: 30Gi
        class: manual
        deleteClaim: false
  zookeeper:
    replicas: 3
    storage:
      type: persistent-claim
      size: 30Gi
      class: manual
      deleteClaim: false
  entityOperator:
    topicOperator: {}
    userOperator: {}

Here’s a sample of the messages i get:

2020-08-05 15:32:44,650 WARN [SocketServer brokerId=1] Unexpected error from /IP_ADDRESS; closing connection (org.apache.kafka.common.network.Selector) [data-plane-kafka-network-thread-1-ListenerName(EXTERNAL-9094)-PLAINTEXT-9]
org.apache.kafka.common.network.InvalidReceiveException: Invalid receive (size = 369296128 larger than 104857600)
        at org.apache.kafka.common.network.NetworkReceive.readFrom(NetworkReceive.java:105)
        at org.apache.kafka.common.network.KafkaChannel.receive(KafkaChannel.java:448)
        at org.apache.kafka.common.network.KafkaChannel.read(KafkaChannel.java:398)
        at org.apache.kafka.common.network.Selector.attemptRead(Selector.java:678)
        at org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:580)
        at org.apache.kafka.common.network.Selector.poll(Selector.java:485)
        at kafka.network.Processor.poll(SocketServer.scala:861)
        at kafka.network.Processor.run(SocketServer.scala:760)
        at java.base/java.lang.Thread.run(Thread.java:834)
2020-08-05 15:32:44,650 WARN [SocketServer brokerId=1] Unexpected error from /IP_ADDRESS; closing connection (org.apache.kafka.common.network.Selector) [data-plane-kafka-network-thread-1-ListenerName(EXTERNAL-9094)-PLAINTEXT-10]
org.apache.kafka.common.network.InvalidReceiveException: Invalid receive (size = 369296128 larger than 104857600)
        at org.apache.kafka.common.network.NetworkReceive.readFrom(NetworkReceive.java:105)
        at org.apache.kafka.common.network.KafkaChannel.receive(KafkaChannel.java:448)
        at org.apache.kafka.common.network.KafkaChannel.read(KafkaChannel.java:398)
        at org.apache.kafka.common.network.Selector.attemptRead(Selector.java:678)
        at org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:580)
        at org.apache.kafka.common.network.Selector.poll(Selector.java:485)
        at kafka.network.Processor.poll(SocketServer.scala:861)
        at kafka.network.Processor.run(SocketServer.scala:760)
        at java.base/java.lang.Thread.run(Thread.java:834)
2020-08-05 15:32:44,727 WARN [SocketServer brokerId=1] Unexpected error from /IP_ADDRESS; closing connection (org.apache.kafka.common.network.Selector) [data-plane-kafka-network-thread-1-ListenerName(EXTERNAL-9094)-PLAINTEXT-11]
org.apache.kafka.common.network.InvalidReceiveException: Invalid receive (size = 369296128 larger than 104857600)
        at org.apache.kafka.common.network.NetworkReceive.readFrom(NetworkReceive.java:105)
        at org.apache.kafka.common.network.KafkaChannel.receive(KafkaChannel.java:448)
        at org.apache.kafka.common.network.KafkaChannel.read(KafkaChannel.java:398)
        at org.apache.kafka.common.network.Selector.attemptRead(Selector.java:678)
        at org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:580)
        at org.apache.kafka.common.network.Selector.poll(Selector.java:485)
        at kafka.network.Processor.poll(SocketServer.scala:861)
        at kafka.network.Processor.run(SocketServer.scala:760)
        at java.base/java.lang.Thread.run(Thread.java:834)
2020-08-05 15:32:45,412 WARN [SocketServer brokerId=1] Unexpected error from /IP_ADDRESS; closing connection (org.apache.kafka.common.network.Selector) [data-plane-kafka-network-thread-1-ListenerName(EXTERNAL-9094)-PLAINTEXT-9]
org.apache.kafka.common.network.InvalidReceiveException: Invalid receive (size = 369296128 larger than 104857600)
        at org.apache.kafka.common.network.NetworkReceive.readFrom(NetworkReceive.java:105)
        at org.apache.kafka.common.network.KafkaChannel.receive(KafkaChannel.java:448)
        at org.apache.kafka.common.network.KafkaChannel.read(KafkaChannel.java:398)
        at org.apache.kafka.common.network.Selector.attemptRead(Selector.java:678)
        at org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:580)
        at org.apache.kafka.common.network.Selector.poll(Selector.java:485)
        at kafka.network.Processor.poll(SocketServer.scala:861)
        at kafka.network.Processor.run(SocketServer.scala:760)
        at java.base/java.lang.Thread.run(Thread.java:834)

Would you please help me figuring out what’s going on? I thing it is somehow related to external nodeport configuration or ssl but i really don’t understand what i’m doing wrong

thank you in advance

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
GabrielLizcommented, Feb 27, 2021

hi @max70-root i’m facing exacly the same issue could you explain a little more how to fix it.

thank you.

0reactions
ksdvishnukumarcsecommented, Nov 2, 2022

Am also facing the same issue… Any one has resolved the issue? It really helps if its solved…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unexpected error from /172.18.0.1; closing connection (org ...
I created a docker-compose for raising 10 conainers aimed for log porpuses and they are working as expected but both kafka and zookeeper ......
Read more >
Gwen (Chen) Shapira on Twitter: "WARN [SocketServer ...
WARN [SocketServer brokerId=0] Unexpected error from /0:0:0:0:0:0:0:1; closing connection (http://org.apache.kafka.common.network.Selector) ...
Read more >
Abhi (JIRA) - The Mail Archive
unix.com (org.apache.kafka.common.security.kerberos.KerberosLogin) [2019-02-20 09:01:11,176] WARN [SocketServer brokerId=1] Unexpected error ...
Read more >
KB485494: “Error 1067: The process terminated unexpectedly ...
"Windows could not start the Apache Kafka service on Local Computer. Error 1067: ... closing connection (org.apache.kafka.common.network.
Read more >
Diagnose failed authentication - Ops - Confluent Community
Hello all I'm getting an error on my Kafka cluster in server.log. ... /<node_ip> (SSL handshake failed) (org.apache.kafka.common.network.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found