kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "tong_ss@csbucn.com" <tong...@csbucn.com>
Subject Producer failed to send the message to the backup kafka broker
Date Mon, 04 Jul 2016 06:25:21 GMT
Hi,

I have 2 kafka nodes(node0--xx.host.com:9092,node1--localhost:9093) and 1 zookeeper node,and
the producer configuration is below:
bootstrap.servers=xx.host.com:9092,localhost:9093

it's works fine when the 2 kafka nodes are running. But when I shutdown the node0,and I got
the error logs below,it seems the messages can not forward to the sencond node, how to resolve
it?

------error logs----------------------------------------

14:06:54.865 [kafka-producer-network-thread | producer-9] DEBUG o.a.kafka.common.network.Selector
- Connection with /xx.host.com disconnected
java.io.EOFException: null
at org.apache.kafka.common.network.NetworkReceive.readFromReadableChannel(NetworkReceive.java:83)
~[classes/:na]
at org.apache.kafka.common.network.NetworkReceive.readFrom(NetworkReceive.java:71) ~[classes/:na]
at org.apache.kafka.common.network.KafkaChannel.receive(KafkaChannel.java:160) ~[classes/:na]
at org.apache.kafka.common.network.KafkaChannel.read(KafkaChannel.java:141) ~[classes/:na]
at org.apache.kafka.common.network.Selector.poll(Selector.java:286) ~[classes/:na]
at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:270) [classes/:na]
at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:216) [classes/:na]
at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:128) [classes/:na]
at java.lang.Thread.run(Unknown Source) [na:1.6.0_26]
14:06:54.865 [kafka-producer-network-thread | producer-9] DEBUG o.apache.kafka.clients.NetworkClient
- Node 1 disconnected.
14:06:54.865 [kafka-producer-network-thread | producer-9] DEBUG o.apache.kafka.clients.NetworkClient
- Initialize connection to node 0 for sending metadata request
14:06:54.866 [kafka-producer-network-thread | producer-9] DEBUG o.a.kafka.common.metrics.Metrics
- Added sensor with name node-0.bytes-sent
14:06:54.866 [kafka-producer-network-thread | producer-9] DEBUG o.a.kafka.common.metrics.Metrics
- Added sensor with name node-0.bytes-received
14:06:54.866 [kafka-producer-network-thread | producer-9] DEBUG o.a.kafka.common.metrics.Metrics
- Added sensor with name node-0.latency
14:06:54.866 [kafka-producer-network-thread | producer-9] DEBUG o.apache.kafka.clients.NetworkClient
- Completed connection to node 0
14:06:54.866 [kafka-producer-network-thread | producer-9] DEBUG o.apache.kafka.clients.NetworkClient
- Sending metadata request ClientRequest(expectResponse=true, callback=null, request=RequestSend(header={api_key=3,api_version=0,correlation_id=12,client_id=producer-9},
body={topics=[sensorTopic]}), isInitiatedByNetworkClient, createdTimeMs=1467612414866, sendTimeMs=0)
to node 0
14:06:54.869 [kafka-producer-network-thread | producer-9] DEBUG org.apache.kafka.clients.Metadata
- Updated cluster metadata version 3 to Cluster(nodes = [Node(1, xx.host.com, 9092), Node(0,
182.119.118.7, 9092)], partitions = [Partition(topic = sensorTopic, partition = 0, leader
= 1, replicas = [1,0,], isr = [1,], Partition(topic = sensorTopic, partition = 1, leader =
0, replicas = [0,1,], isr = [0,], Partition(topic = sensorTopic, partition = 6, leader = 0,
replicas = [1,0,], isr = [0,], Partition(topic = sensorTopic, partition = 7, leader = 0, replicas
= [0,1,], isr = [0,], Partition(topic = sensorTopic, partition = 3, leader = 0, replicas =
[0,1,], isr = [0,], Partition(topic = sensorTopic, partition = 5, leader = 0, replicas = [0,1,],
isr = [0,], Partition(topic = sensorTopic, partition = 4, leader = 0, replicas = [1,0,], isr
= [0,], Partition(topic = sensorTopic, partition = 9, leader = 0, replicas = [1,0,], isr =
[0,], Partition(topic = sensorTopic, partition = 2, leader = 0, replicas = [1,0,], isr = [0,],
Partition(topic = sensorTopic, partition = 8, leader = 0, replicas = [0,1,], isr = [0,]])

14:06:56.250 [kafka-producer-network-thread | producer-9] DEBUG o.a.kafka.common.network.Selector
- Connection with 0.0.0.0/0.0.0.0 disconnected
java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.6.0_26]
at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source) ~[na:1.6.0_26]
at org.apache.kafka.common.network.PlaintextTransportLayer.finishConnect(PlaintextTransportLayer.java:54)
~[classes/:na]
at org.apache.kafka.common.network.KafkaChannel.finishConnect(KafkaChannel.java:79) ~[classes/:na]
at org.apache.kafka.common.network.Selector.poll(Selector.java:274) ~[classes/:na]
at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:270) [classes/:na]
at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:216) [classes/:na]
at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:128) [classes/:na]
at java.lang.Thread.run(Unknown Source) [na:1.6.0_26]
14:06:56.251 [kafka-producer-network-thread | producer-9] DEBUG o.apache.kafka.clients.NetworkClient
- Node 1 disconnected.
14:06:56.251 [kafka-producer-network-thread | producer-9] DEBUG o.apache.kafka.clients.NetworkClient
- Sending metadata request ClientRequest(expectResponse=true, callback=null, request=RequestSend(header={api_key=3,api_version=0,correlation_id=13,client_id=producer-9},
body={topics=[sensorTopic]}), isInitiatedByNetworkClient, createdTimeMs=1467612416251, sendTimeMs=0)
to node 0
14:06:56.253 [kafka-producer-network-thread | producer-9] DEBUG org.apache.kafka.clients.Metadata
- Updated cluster metadata version 4 to Cluster(nodes = [Node(1, xx.host.com, 9092), Node(0,
182.119.118.7, 9092)], partitions = [Partition(topic = sensorTopic, partition = 0, leader
= 1, replicas = [1,0,], isr = [1,], Partition(topic = sensorTopic, partition = 1, leader =
0, replicas = [0,1,], isr = [0,], Partition(topic = sensorTopic, partition = 6, leader = 0,
replicas = [1,0,], isr = [0,], Partition(topic = sensorTopic, partition = 7, leader = 0, replicas
= [0,1,], isr = [0,], Partition(topic = sensorTopic, partition = 3, leader = 0, replicas =
[0,1,], isr = [0,], Partition(topic = sensorTopic, partition = 5, leader = 0, replicas = [0,1,],
isr = [0,], Partition(topic = sensorTopic, partition = 4, leader = 0, replicas = [1,0,], isr
= [0,], Partition(topic = sensorTopic, partition = 9, leader = 0, replicas = [1,0,], isr =
[0,], Partition(topic = sensorTopic, partition = 2, leader = 0, replicas = [1,0,], isr = [0,],
Partition(topic = sensorTopic, partition = 8, leader = 0, replicas = [0,1,], isr = [0,]])

14:06:57.303 [kafka-producer-network-thread | producer-9] DEBUG o.a.kafka.common.network.Selector
- Connection with 0.0.0.0/0.0.0.0 disconnected
java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.6.0_26]
at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source) ~[na:1.6.0_26]
at org.apache.kafka.common.network.PlaintextTransportLayer.finishConnect(PlaintextTransportLayer.java:54)
~[classes/:na]
at org.apache.kafka.common.network.KafkaChannel.finishConnect(KafkaChannel.java:79) ~[classes/:na]
at org.apache.kafka.common.network.Selector.poll(Selector.java:274) ~[classes/:na]
at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:270) [classes/:na]
at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:216) [classes/:na]
at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:128) [classes/:na]
at java.lang.Thread.run(Unknown Source) [na:1.6.0_26]
14:06:57.304 [kafka-producer-network-thread | producer-9] DEBUG



童树山
中嘉仁和科技(北京)有限公司
北京市朝阳区东三环北路3号幸福大厦B座813室
邮编 100027
Room 813, Block B, Lucky Tower,
3 Dongsanhuan Beilu, Chaoyang District,
Beijing 100027, China
Tel: 010-64661846
Fax: 010-64661840
Mobile: 13818663262
E-mail:tong_ss@csbucn.com
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message