问题描述
kafka 生产者报错
问题出现的环境背景及自己尝试过哪些方法
同样的代码,很多电脑都是好的。只有一台报错
2019-01-24 15:51:45.811 DEBUG 448 --- [kafka-producer-network-thread | producer-1] o.apache.kafka.common.network.Selector : [Producer clientId=producer-1] Connection with / disconnected
java.io.IOException: 远程主机强迫关闭了一个现有的连接。
at sun.nio.ch.SocketDispatcher.read0(Native Method) ~[na:1.8.0_51]
at sun.nio.ch.SocketDispatcher.read(Unknown Source) ~[na:1.8.0_51]
at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source) ~[na:1.8.0_51]
at sun.nio.ch.IOUtil.read(Unknown Source) ~[na:1.8.0_51]
at sun.nio.ch.SocketChannelImpl.read(Unknown Source) ~[na:1.8.0_51]
at org.apache.kafka.common.network.PlaintextTransportLayer.read(PlaintextTransportLayer.java:104) ~[kafka-clients-2.0.1.jar!/:na]
at org.apache.kafka.common.network.NetworkReceive.readFrom(NetworkReceive.java:94) ~[kafka-clients-2.0.1.jar!/:na]
at org.apache.kafka.common.network.KafkaChannel.receive(KafkaChannel.java:335) ~[kafka-clients-2.0.1.jar!/:na]
at org.apache.kafka.common.network.KafkaChannel.read(KafkaChannel.java:296) ~[kafka-clients-2.0.1.jar!/:na]
at org.apache.kafka.common.network.Selector.attemptRead(Selector.java:562) [kafka-clients-2.0.1.jar!/:na]
at org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:498) [kafka-clients-2.0.1.jar!/:na]
at org.apache.kafka.common.network.Selector.poll(Selector.java:427) [kafka-clients-2.0.1.jar!/:na]
at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:510) [kafka-clients-2.0.1.jar!/:na]
at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:239) [kafka-clients-2.0.1.jar!/:na]
at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:163) [kafka-clients-2.0.1.jar!/:na]
at java.lang.Thread.run(Unknown Source) [na:1.8.0_51]
后面很多都是重复的报错
telnet brokerip 9092 连接有问题的机器节点看能通?