Java Client Connection Kafka cluster error

Source: Internet
Author: User

When sending a message to the Kafka cluster, the error is as follows:

Page_visits-1:30005 MS has passed since batch creation plus linger time

Add Log4j.properties, set to debug level, with the following error:

2017-06-03 17:33:31,417 DEBUG [org.apache.kafka.clients.NetworkClient]-Error connecting to Node 2 at Kafka-cluster-64bi t:9094:
Java.io.IOException:Can ' t resolve address:kafka-cluster-64bit:9094
At Org.apache.kafka.common.network.Selector.connect (selector.java:182)
At Org.apache.kafka.clients.NetworkClient.initiateConnect (networkclient.java:629)
At Org.apache.kafka.clients.NetworkClient.ready (networkclient.java:186)
At Org.apache.kafka.clients.producer.internals.Sender.run (sender.java:184)
At Org.apache.kafka.clients.producer.internals.Sender.run (sender.java:126)
At Java.lang.Thread.run (thread.java:745)
caused by:java.nio.channels.UnresolvedAddressException
At Sun.nio.ch.Net.checkAddress (net.java:101)
At Sun.nio.ch.SocketChannelImpl.connect (socketchannelimpl.java:622)
At Org.apache.kafka.common.network.Selector.connect (selector.java:179)
... 5 more

Workaround:

Config/server.properties modification

Modified before: listeners=plaintext://:9092

Modified: listeners=plaintext://192.168.137.176:9092

Specific code reference: Kafka Java client code example

Java Client Connection Kafka cluster error

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.