Java Client Connection Kafka report the following error
bin/kafka-console-consumer.sh --zookeeper 255.255.255.255:2181 --topic eventbustopic[ 2015-06-02 16:23:04,375] warn fetching topic metadata with correlation id 0 for topics [set (eventbustopic)] from broker [id:1,host:some_host ,port:9092] failed (kafka.client.clientutils$) java.nio.channels.closedchannelexception at kafka.network.blockingchannel.send (blockingchannel.scala:100) at Kafka.producer.syncproducer.liftedtree1$1 (syncproducer.scala:73) at kafka.producer.syncproducer.kafka$producer$syncproducer$ $doSend (syncproducer.scala:72) at Kafka.producer.SyncProducer.send (syncproducer.scala:113) at kafka.client.clientutils$. Fetchtopicmetadata (clientutils.scala:58) at kafka.client.clientutils$.fetchtopicmetadata (clientutils.scala:93) at kafka.consumer.consumerfetchermanager$ Leaderfinderthread.dowork (consumerfetchermanager.scala:66) at Kafka.utils.ShutdownableThread.run (shutdownablethread.scala:60) [2015-06-02 16:23:04,515] WARN Fetching topic metadata with Correlation id 0 for topics [set (eventbustopic)] FRom broker [id:0,host:some_host,port:9092] failed (kafka.client.clientutils$) java.nio.channels.closedchannelexception at Kafka.network.BlockingChannel.send (blockingchannel.scala:100) at kafka.producer.syncproducer.liftedtree1$1 (SyncProducer.scala : () at kafka.producer.syncproducer.kafka$producer$syncproducer$ $doSend (syncproducer.scala:72) At kafka.producer.syncproducer.send (syncproducer.scala:113) aT kafka.client.clientutils$.fetchtopicmetadata (clientutils.scala:58) at kafka.client.clientutils$.fetchtopicmetadata (ClientUtils.scala:93) at Kafka.consumer.consumerfetchermanager$leaderfinderthread.dowork (consumerfetchermanager.scala:66) at kafka.utils.shutdownablethread.run (SHUTDOWNABLETHREAD.SCALA:60)
is because the Advertised.host.name attribute in Kafka Server.properties is not configured. This property represents the address of the client to access the Kafka. If not configured, the host name is the default.
Java Connection Kafka Error JAVA.NIO.CHANNELS.CLOSEDCHANNELEXCEP