mesos/kafka

Broker getting Lost when running second Broker on a different slave node

Closed this issue · 2 comments

Hi ALL,

I have 4 cluster setup, 1 master, scheduler, 2 slave nodes.
Scheduler has registered with master and first broker is up and running on slave node but when start another broker on second slave node I am getting following error

set up is on open stack. let me know if you need more logs

2015-10-15 19:57:16,214] INFO Loading logs. (kafka.log.LogManager)
[2015-10-15 19:57:16,221] INFO Logs loading complete. (kafka.log.LogManager)
[2015-10-15 19:57:16,221] INFO Starting log cleanup with a period of 300000 ms. (kafka.log.LogManager)
[2015-10-15 19:57:16,224] INFO Starting log flusher with a default period of 9223372036854775807 ms. (kafka.log.LogManager)
[2015-10-15 19:57:16,258] FATAL [Kafka Server 1], Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
kafka.common.KafkaException: Socket server failed to bind to 10.203.53.13:31000: Cannot assign requested address.
at kafka.network.Acceptor.openServerSocket(SocketServer.scala:260)
at kafka.network.Acceptor.(SocketServer.scala:205)
at kafka.network.SocketServer.startup(SocketServer.scala:86)
at kafka.server.KafkaServer.startup(KafkaServer.scala:99)
at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at ly.stealth.mesos.kafka.KafkaServer.start(BrokerServer.scala:49)
at ly.stealth.mesos.kafka.Executor$.ly$stealth$mesos$kafka$Executor$$runBroker0$1(Executor.scala:76)
at ly.stealth.mesos.kafka.Executor$$anon$1.run(Executor.scala:98)
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:256)
... 11 more

It got resolved, i used bind-address as private ip of my machine while creating the broker, however strange thing is with first broker i hadn't specified any bind-address but it still is running , i am not sure why is this.

Please let me know if there is any specific reason behind this

if the process is still running you might not have cgroup configured, mesos default is posix

by default the broker binds to the agent's host in the offer that is provided, override by bind-address as you did