Not able to Start Kafka Broker (Single Node, Single Broker)

7,101 views
Skip to first unread message

Pravesh Gupta

unread,
Jul 9, 2017, 8:06:01 AM7/9/17
to Confluent Platform
I am facing following exception when I try to start Kafka on Linux Platform, Looks like some configuration issue :(  but its diving me crazy , Not able to figure out from last one day :

[2017-07-09 11:58:40,884] INFO Completed load of log __consumer_offsets-10 with 1 log segments and log end offset 0 in 4 ms (kafka.log.Log)
[2017-07-09 11:58:40,892] INFO Completed load of log __consumer_offsets-48 with 1 log segments and log end offset 0 in 2 ms (kafka.log.Log)
[2017-07-09 11:58:40,898] INFO Completed load of log __consumer_offsets-29 with 1 log segments and log end offset 0 in 2 ms (kafka.log.Log)
[2017-07-09 11:58:40,907] INFO Completed load of log __consumer_offsets-0 with 1 log segments and log end offset 0 in 2 ms (kafka.log.Log)
[2017-07-09 11:58:40,913] INFO Completed load of log wikiticker-0 with 1 log segments and log end offset 24433 in 2 ms (kafka.log.Log)
[2017-07-09 11:58:40,928] INFO Completed load of log test-0 with 1 log segments and log end offset 0 in 8 ms (kafka.log.Log)
[2017-07-09 11:58:40,941] INFO Logs loading complete in 802 ms. (kafka.log.LogManager)
[2017-07-09 11:58:41,136] INFO Starting log cleanup with a period of 300000 ms. (kafka.log.LogManager)
[2017-07-09 11:58:41,148] INFO Starting log flusher with a default period of 9223372036854775807 ms. (kafka.log.LogManager)
[2017-07-09 11:58:41,281] FATAL [Kafka Server 0], Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
kafka.common.KafkaException: Socket server failed to bind to no1010042153159.corp.adobe.com:9093: Cannot assign requested address.
        at kafka.network.Acceptor.openServerSocket(SocketServer.scala:330)
        at kafka.network.Acceptor.<init>(SocketServer.scala:255)
        at kafka.network.SocketServer$$anonfun$startup$1.apply(SocketServer.scala:98)
        at kafka.network.SocketServer$$anonfun$startup$1.apply(SocketServer.scala:90)
        at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
        at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
        at kafka.network.SocketServer.startup(SocketServer.scala:90)
        at kafka.server.KafkaServer.startup(KafkaServer.scala:215)
        at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:39)
        at kafka.Kafka$.main(Kafka.scala:67)
        at kafka.Kafka.main(Kafka.scala)
Caused by: java.net.BindException: Cannot assign requested address
        at sun.nio.ch.Net.bind0(Native Method)
        at sun.nio.ch.Net.bind(Net.java:433)
        at sun.nio.ch.Net.bind(Net.java:425)
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:67)
        at kafka.network.Acceptor.openServerSocket(SocketServer.scala:326)
        ... 10 more
[2017-07-09 11:58:41,298] INFO [Kafka Server 0], shutting down (kafka.server.KafkaServer)
[2017-07-09 11:58:41,302] INFO [Socket Server on Broker 0], Shutting down (kafka.network.SocketServer)
[2017-07-09 11:58:41,308] INFO [Socket Server on Broker 0], Shutdown completed (kafka.network.SocketServer)
[2017-07-09 11:58:41,316] INFO Shutting down. (kafka.log.LogManager)
[2017-07-09 11:58:41,453] INFO Shutdown complete. (kafka.log.LogManager)
[2017-07-09 11:58:41,454] INFO Terminate ZkClient event thread. (org.I0Itec.zkclient.ZkEventThread)
[2017-07-09 11:58:41,461] INFO EventThread shut down for session: 0x15d2734858e0002 (org.apache.zookeeper.ClientCnxn)
[2017-07-09 11:58:41,462] INFO Session: 0x15d2734858e0002 closed (org.apache.zookeeper.ZooKeeper)
[2017-07-09 11:58:41,467] INFO [Kafka Server 0], shut down completed (kafka.server.KafkaServer)
[2017-07-09 11:58:41,469] FATAL Fatal error during KafkaServerStartable startup. Prepare to shutdown (kafka.server.KafkaServerStartable)
kafka.common.KafkaException: Socket server failed to bind to no1010042153159.corp.adobe.com:9093: Cannot assign requested address.
        at kafka.network.Acceptor.openServerSocket(SocketServer.scala:330)
        at kafka.network.Acceptor.<init>(SocketServer.scala:255)
        at kafka.network.SocketServer$$anonfun$startup$1.apply(SocketServer.scala:98)
        at kafka.network.SocketServer$$anonfun$startup$1.apply(SocketServer.scala:90)
        at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
        at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
        at kafka.network.SocketServer.startup(SocketServer.scala:90)
        at kafka.server.KafkaServer.startup(KafkaServer.scala:215)
        at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:39)
        at kafka.Kafka$.main(Kafka.scala:67)
        at kafka.Kafka.main(Kafka.scala)
Caused by: java.net.BindException: Cannot assign requested address
        at sun.nio.ch.Net.bind0(Native Method)
        at sun.nio.ch.Net.bind(Net.java:433)
        at sun.nio.ch.Net.bind(Net.java:425)
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:67)
        at kafka.network.Acceptor.openServerSocket(SocketServer.scala:326)
        ... 10 more


Following is the server.properties Snapshot :


############################# Socket Server Settings #############################


listeners=PLAINTEXT://10.42.153.159:9093


advertised.listeners=PLAINTEXT://10.42.153.159:9093


#listener.security.protocol.map=PLAINTEXT:PLAINTEXT,SSL:SSL,SASL_PLAINTEXT:SASL_PLAINTEXT,SASL_SSL:SASL_SSL

I can see Zoopkeeper running (Via jps command) .

Pls help.

Thanks,
Pravesh Gupta

Robin Moffatt

unread,
Jul 9, 2017, 11:53:06 AM7/9/17
to confluent...@googlegroups.com
Is something else already running on port 9093? 

netstat -plnt|grep 9093


--
You received this message because you are subscribed to the Google Groups "Confluent Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platform+unsub...@googlegroups.com.
To post to this group, send email to confluent-platform@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/1893ce31-d596-4bf2-ac20-121ca7b1ad89%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Pravesh Gupta

unread,
Jul 9, 2017, 2:33:41 PM7/9/17
to Confluent Platform
Nope. Nothing is running at that port. Even I tried with some other port , still the same issue. 

If I dont give the "listeners"property in the server.properties, Kafka does gets started succesfully, but I want to access the Broker from remote machine and hence required to set the "listeners" port.

Mahesh Abeyratne

unread,
Jul 10, 2017, 12:26:37 AM7/10/17
to Confluent Platform
Try:

listeners=PLAINTEXT://:9093 or listeners=PLAINTEXT://0.0.0.0:9093

Pravesh Gupta

unread,
Jul 11, 2017, 2:32:34 PM7/11/17
to Confluent Platform
Well there was issue with my local host file where the Linux machine itself did not knew its own host name. Hence the Bind Exception.

After adding the hostname entry in the hosts file , I could resolve the issue.

Thanks :)

malavi...@gmail.com

unread,
Jul 12, 2018, 10:24:54 AM7/12/18
to Confluent Platform
Please let me know how you did that ?

Amit Sahu

unread,
Jul 13, 2018, 3:46:52 PM7/13/18
to confluent...@googlegroups.com
Hi, 
She might have done it using a myid file. 
It has zk host & id details. 

Regards, 
Amit 

--
You received this message because you are subscribed to the Google Groups "Confluent Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platform+unsub...@googlegroups.com.
To post to this group, send email to confluent-platform@googlegroups.com.

Amit Sahu

unread,
Jul 13, 2018, 3:48:46 PM7/13/18
to confluent...@googlegroups.com
Hi, 
Sorry, she did this by including the hostname entry of the machine in the system's hosts file. 

On Jul 14, 2018 1:16 AM, "Amit Sahu" <amitsahu...@gmail.com> wrote:
Hi, 
She might have done it using a myid file. 
It has zk host & id details. 

Regards, 
Amit 
On Jul 12, 2018 7:54 PM, <malavi...@gmail.com> wrote:
Please let me know how you did that ?


On Wednesday, July 12, 2017 at 12:02:34 AM UTC+5:30, Pravesh Gupta wrote:
Well there was issue with my local host file where the Linux machine itself did not knew its own host name. Hence the Bind Exception.

After adding the hostname entry in the hosts file , I could resolve the issue.

Thanks :)

--
You received this message because you are subscribed to the Google Groups "Confluent Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platform+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages