You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by shyla deshpande <de...@gmail.com> on 2017/08/09 05:28:43 UTC

Unable to start kafka server, 0.0.0.0:9092: Address already in use. Please help

Hello all,

I am trying to use kafka locally on my Mac. When I am trying to start the
kafka server I get the following error. Please help. Thanks.

[2017-08-08 22:16:37,319] FATAL [Kafka Server 0], Fatal error during
KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
kafka.common.KafkaException: Socket server failed to bind to 0.0.0.0:9092:
Address already in use.
at kafka.network.Acceptor.openServerSocket(SocketServer.scala:327)
at kafka.network.Acceptor.<init>(SocketServer.scala:252)
at
kafka.network.SocketServer$$anonfun$startup$1.apply(SocketServer.scala:91)
at
kafka.network.SocketServer$$anonfun$startup$1.apply(SocketServer.scala:83)
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:83)
at kafka.server.KafkaServer.startup(KafkaServer.scala:222)
at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:38)
at kafka.Kafka$.main(Kafka.scala:65)
at kafka.Kafka.main(Kafka.scala)
Caused by: java.net.BindException: Address already in use
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:323)
... 10 more

Re: Unable to start kafka server, 0.0.0.0:9092: Address already in use. Please help

Posted by "M. Manna" <ma...@gmail.com>.
Shyla,

Lets break it down into two sequential checks

1)
I didn't see these ZK configs. Please gracefully shutdown everything, and
add these to your zookeeper.properties before restarting ZK and broker:
tickTime=1000
initLimit=3
syncLimit=7

Now run the previously mentioned commands for zookeeper shell and check if
the broker is registered correctly (you can see kafka server logs too).

2) If the above doesn't work.

try to delete all your logs for ZK and kafka, reconfigure your port to 9094.
Start ZK first, then start the broker
Repeat your process.

If the broker is registered successfully, you will know from the logs -
this means that on your mac someone/something is using port 9092.






On 9 August 2017 at 18:31, shyla deshpande <de...@gmail.com> wrote:

> Hi Mannna. Thanks again. I see the problem, but not sure how to fix..
>
> server.properties -- > listener settings
> --------------------------------------------------
> listeners=PLAINTEXT://localhost:9092
> advertised.listeners=PLAINTEXT://localhost:9092
>
>
> $ bin/zookeeper-shell.sh localhost:2181 get /brokers/ids/0
> Connecting to localhost:2181
>
> WATCHER::
>
> WatchedEvent state:SyncConnected type:None path:null
> Node does not exist: /brokers/ids/0
>
> On Wed, Aug 9, 2017 at 9:56 AM, M. Manna <ma...@gmail.com> wrote:
>
> > Could you also provide the following outputs (assuming you have only 1
> > broker and zookeeper):
> >
> > 1) zookeeper-shell.sh localhost:2181
> > get /brokers/ids/0
> >
> > from the output, can you see if your broker info is correct
> >
> > Also, in your server.properties where is advertised.listeners and
> listeners
> > properties? Did you just omit it for the email?
> >
> > Regards,
> >
> >
> >
> > On 9 August 2017 at 17:49, shyla deshpande <de...@gmail.com>
> > wrote:
> >
> > > Hi Manna , Thanks for the response. All the properties in both the
> files
> > > are the defaults provided when we download kafka. I have listed them
> > below.
> > >
> > > zookeeper.properties
> > > -----------------------------
> > > dataDir=/tmp/zookeeper
> > > clientPort=2181
> > > maxClientCnxns=0
> > >
> > > server.properties
> > > -----------------------
> > > broker.id=0
> > > num.network.threads=3
> > > num.io.threads=8
> > > socket.send.buffer.bytes=102400
> > > socket.receive.buffer.bytes=102400
> > > socket.request.max.bytes=104857600
> > > log.dirs=/tmp/kafka-logs
> > > num.partitions=1
> > > log.retention.hours=168
> > > log.segment.bytes=1073741824
> > > log.retention.check.interval.ms=300000
> > > zookeeper.connect=localhost:2181
> > > zookeeper.connection.timeout.ms=6000
> > >
> > >
> > > On Wed, Aug 9, 2017 at 1:08 AM, M. Manna <ma...@gmail.com> wrote:
> > >
> > > > Hi,
> > > >
> > > > Could you Post your zookeeper.properties and server.properties file
> > > > details?
> > > >
> > > > Thanks,
> > > >
> > > > On 9 August 2017 at 07:08, shyla deshpande <deshpandeshyla@gmail.com
> >
> > > > wrote:
> > > >
> > > > > I have even tried deleting the contents of log.dirs and dataDir
> > before
> > > > > starting the zookeeper and kafka server, still no success. I
> > appreciate
> > > > any
> > > > > help.
> > > > >
> > > > > On Tue, Aug 8, 2017 at 10:43 PM, shyla deshpande <
> > > > deshpandeshyla@gmail.com
> > > > > >
> > > > > wrote:
> > > > >
> > > > > > I was successfully using it for many months, and now I am unable
> > to.
> > > > > > I have used lsof -i tcp:9092 to see any process using 9092 port
> > and I
> > > > > > don't see any process using 9092.
> > > > > >
> > > > > > On Tue, Aug 8, 2017 at 10:28 PM, shyla deshpande <
> > > > > deshpandeshyla@gmail.com
> > > > > > > wrote:
> > > > > >
> > > > > >> Hello all,
> > > > > >>
> > > > > >> I am trying to use kafka locally on my Mac. When I am trying to
> > > start
> > > > > the
> > > > > >> kafka server I get the following error. Please help. Thanks.
> > > > > >>
> > > > > >> [2017-08-08 22:16:37,319] FATAL [Kafka Server 0], Fatal error
> > during
> > > > > >> KafkaServer startup. Prepare to shutdown
> > (kafka.server.KafkaServer)
> > > > > >> kafka.common.KafkaException: Socket server failed to bind to
> > > > > 0.0.0.0:9092:
> > > > > >> Address already in use.
> > > > > >> at kafka.network.Acceptor.openServerSocket(SocketServer.
> > scala:327)
> > > > > >> at kafka.network.Acceptor.<init>(SocketServer.scala:252)
> > > > > >> at kafka.network.SocketServer$$anonfun$startup$1.apply(SocketSe
> > > > > >> rver.scala:91)
> > > > > >> at kafka.network.SocketServer$$anonfun$startup$1.apply(SocketSe
> > > > > >> rver.scala:83)
> > > > > >> at scala.collection.mutable.ResizableArray$class.foreach(Resiza
> > > > > >> bleArray.scala:59)
> > > > > >> at scala.collection.mutable.ArrayBuffer.foreach(
> > > ArrayBuffer.scala:48)
> > > > > >> at kafka.network.SocketServer.startup(SocketServer.scala:83)
> > > > > >> at kafka.server.KafkaServer.startup(KafkaServer.scala:222)
> > > > > >> at kafka.server.KafkaServerStartable.startup(KafkaServerStartab
> > > > > >> le.scala:38)
> > > > > >> at kafka.Kafka$.main(Kafka.scala:65)
> > > > > >> at kafka.Kafka.main(Kafka.scala)
> > > > > >> Caused by: java.net.BindException: Address already in use
> > > > > >> 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(ServerSocketChannelI
> > > > > >> mpl.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:323)
> > > > > >> ... 10 more
> > > > > >>
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: Unable to start kafka server, 0.0.0.0:9092: Address already in use. Please help

Posted by shyla deshpande <de...@gmail.com>.
Hi Mannna. Thanks again. I see the problem, but not sure how to fix..

server.properties -- > listener settings
--------------------------------------------------
listeners=PLAINTEXT://localhost:9092
advertised.listeners=PLAINTEXT://localhost:9092


$ bin/zookeeper-shell.sh localhost:2181 get /brokers/ids/0
Connecting to localhost:2181

WATCHER::

WatchedEvent state:SyncConnected type:None path:null
Node does not exist: /brokers/ids/0

On Wed, Aug 9, 2017 at 9:56 AM, M. Manna <ma...@gmail.com> wrote:

> Could you also provide the following outputs (assuming you have only 1
> broker and zookeeper):
>
> 1) zookeeper-shell.sh localhost:2181
> get /brokers/ids/0
>
> from the output, can you see if your broker info is correct
>
> Also, in your server.properties where is advertised.listeners and listeners
> properties? Did you just omit it for the email?
>
> Regards,
>
>
>
> On 9 August 2017 at 17:49, shyla deshpande <de...@gmail.com>
> wrote:
>
> > Hi Manna , Thanks for the response. All the properties in both the files
> > are the defaults provided when we download kafka. I have listed them
> below.
> >
> > zookeeper.properties
> > -----------------------------
> > dataDir=/tmp/zookeeper
> > clientPort=2181
> > maxClientCnxns=0
> >
> > server.properties
> > -----------------------
> > broker.id=0
> > num.network.threads=3
> > num.io.threads=8
> > socket.send.buffer.bytes=102400
> > socket.receive.buffer.bytes=102400
> > socket.request.max.bytes=104857600
> > log.dirs=/tmp/kafka-logs
> > num.partitions=1
> > log.retention.hours=168
> > log.segment.bytes=1073741824
> > log.retention.check.interval.ms=300000
> > zookeeper.connect=localhost:2181
> > zookeeper.connection.timeout.ms=6000
> >
> >
> > On Wed, Aug 9, 2017 at 1:08 AM, M. Manna <ma...@gmail.com> wrote:
> >
> > > Hi,
> > >
> > > Could you Post your zookeeper.properties and server.properties file
> > > details?
> > >
> > > Thanks,
> > >
> > > On 9 August 2017 at 07:08, shyla deshpande <de...@gmail.com>
> > > wrote:
> > >
> > > > I have even tried deleting the contents of log.dirs and dataDir
> before
> > > > starting the zookeeper and kafka server, still no success. I
> appreciate
> > > any
> > > > help.
> > > >
> > > > On Tue, Aug 8, 2017 at 10:43 PM, shyla deshpande <
> > > deshpandeshyla@gmail.com
> > > > >
> > > > wrote:
> > > >
> > > > > I was successfully using it for many months, and now I am unable
> to.
> > > > > I have used lsof -i tcp:9092 to see any process using 9092 port
> and I
> > > > > don't see any process using 9092.
> > > > >
> > > > > On Tue, Aug 8, 2017 at 10:28 PM, shyla deshpande <
> > > > deshpandeshyla@gmail.com
> > > > > > wrote:
> > > > >
> > > > >> Hello all,
> > > > >>
> > > > >> I am trying to use kafka locally on my Mac. When I am trying to
> > start
> > > > the
> > > > >> kafka server I get the following error. Please help. Thanks.
> > > > >>
> > > > >> [2017-08-08 22:16:37,319] FATAL [Kafka Server 0], Fatal error
> during
> > > > >> KafkaServer startup. Prepare to shutdown
> (kafka.server.KafkaServer)
> > > > >> kafka.common.KafkaException: Socket server failed to bind to
> > > > 0.0.0.0:9092:
> > > > >> Address already in use.
> > > > >> at kafka.network.Acceptor.openServerSocket(SocketServer.
> scala:327)
> > > > >> at kafka.network.Acceptor.<init>(SocketServer.scala:252)
> > > > >> at kafka.network.SocketServer$$anonfun$startup$1.apply(SocketSe
> > > > >> rver.scala:91)
> > > > >> at kafka.network.SocketServer$$anonfun$startup$1.apply(SocketSe
> > > > >> rver.scala:83)
> > > > >> at scala.collection.mutable.ResizableArray$class.foreach(Resiza
> > > > >> bleArray.scala:59)
> > > > >> at scala.collection.mutable.ArrayBuffer.foreach(
> > ArrayBuffer.scala:48)
> > > > >> at kafka.network.SocketServer.startup(SocketServer.scala:83)
> > > > >> at kafka.server.KafkaServer.startup(KafkaServer.scala:222)
> > > > >> at kafka.server.KafkaServerStartable.startup(KafkaServerStartab
> > > > >> le.scala:38)
> > > > >> at kafka.Kafka$.main(Kafka.scala:65)
> > > > >> at kafka.Kafka.main(Kafka.scala)
> > > > >> Caused by: java.net.BindException: Address already in use
> > > > >> 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(ServerSocketChannelI
> > > > >> mpl.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:323)
> > > > >> ... 10 more
> > > > >>
> > > > >
> > > > >
> > > >
> > >
> >
>

Re: Unable to start kafka server, 0.0.0.0:9092: Address already in use. Please help

Posted by "M. Manna" <ma...@gmail.com>.
Could you also provide the following outputs (assuming you have only 1
broker and zookeeper):

1) zookeeper-shell.sh localhost:2181
get /brokers/ids/0

from the output, can you see if your broker info is correct

Also, in your server.properties where is advertised.listeners and listeners
properties? Did you just omit it for the email?

Regards,



On 9 August 2017 at 17:49, shyla deshpande <de...@gmail.com> wrote:

> Hi Manna , Thanks for the response. All the properties in both the files
> are the defaults provided when we download kafka. I have listed them below.
>
> zookeeper.properties
> -----------------------------
> dataDir=/tmp/zookeeper
> clientPort=2181
> maxClientCnxns=0
>
> server.properties
> -----------------------
> broker.id=0
> num.network.threads=3
> num.io.threads=8
> socket.send.buffer.bytes=102400
> socket.receive.buffer.bytes=102400
> socket.request.max.bytes=104857600
> log.dirs=/tmp/kafka-logs
> num.partitions=1
> log.retention.hours=168
> log.segment.bytes=1073741824
> log.retention.check.interval.ms=300000
> zookeeper.connect=localhost:2181
> zookeeper.connection.timeout.ms=6000
>
>
> On Wed, Aug 9, 2017 at 1:08 AM, M. Manna <ma...@gmail.com> wrote:
>
> > Hi,
> >
> > Could you Post your zookeeper.properties and server.properties file
> > details?
> >
> > Thanks,
> >
> > On 9 August 2017 at 07:08, shyla deshpande <de...@gmail.com>
> > wrote:
> >
> > > I have even tried deleting the contents of log.dirs and dataDir before
> > > starting the zookeeper and kafka server, still no success. I appreciate
> > any
> > > help.
> > >
> > > On Tue, Aug 8, 2017 at 10:43 PM, shyla deshpande <
> > deshpandeshyla@gmail.com
> > > >
> > > wrote:
> > >
> > > > I was successfully using it for many months, and now I am unable to.
> > > > I have used lsof -i tcp:9092 to see any process using 9092 port and I
> > > > don't see any process using 9092.
> > > >
> > > > On Tue, Aug 8, 2017 at 10:28 PM, shyla deshpande <
> > > deshpandeshyla@gmail.com
> > > > > wrote:
> > > >
> > > >> Hello all,
> > > >>
> > > >> I am trying to use kafka locally on my Mac. When I am trying to
> start
> > > the
> > > >> kafka server I get the following error. Please help. Thanks.
> > > >>
> > > >> [2017-08-08 22:16:37,319] FATAL [Kafka Server 0], Fatal error during
> > > >> KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
> > > >> kafka.common.KafkaException: Socket server failed to bind to
> > > 0.0.0.0:9092:
> > > >> Address already in use.
> > > >> at kafka.network.Acceptor.openServerSocket(SocketServer.scala:327)
> > > >> at kafka.network.Acceptor.<init>(SocketServer.scala:252)
> > > >> at kafka.network.SocketServer$$anonfun$startup$1.apply(SocketSe
> > > >> rver.scala:91)
> > > >> at kafka.network.SocketServer$$anonfun$startup$1.apply(SocketSe
> > > >> rver.scala:83)
> > > >> at scala.collection.mutable.ResizableArray$class.foreach(Resiza
> > > >> bleArray.scala:59)
> > > >> at scala.collection.mutable.ArrayBuffer.foreach(
> ArrayBuffer.scala:48)
> > > >> at kafka.network.SocketServer.startup(SocketServer.scala:83)
> > > >> at kafka.server.KafkaServer.startup(KafkaServer.scala:222)
> > > >> at kafka.server.KafkaServerStartable.startup(KafkaServerStartab
> > > >> le.scala:38)
> > > >> at kafka.Kafka$.main(Kafka.scala:65)
> > > >> at kafka.Kafka.main(Kafka.scala)
> > > >> Caused by: java.net.BindException: Address already in use
> > > >> 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(ServerSocketChannelI
> > > >> mpl.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:323)
> > > >> ... 10 more
> > > >>
> > > >
> > > >
> > >
> >
>

Re: Unable to start kafka server, 0.0.0.0:9092: Address already in use. Please help

Posted by shyla deshpande <de...@gmail.com>.
Hi Manna , Thanks for the response. All the properties in both the files
are the defaults provided when we download kafka. I have listed them below.

zookeeper.properties
-----------------------------
dataDir=/tmp/zookeeper
clientPort=2181
maxClientCnxns=0

server.properties
-----------------------
broker.id=0
num.network.threads=3
num.io.threads=8
socket.send.buffer.bytes=102400
socket.receive.buffer.bytes=102400
socket.request.max.bytes=104857600
log.dirs=/tmp/kafka-logs
num.partitions=1
log.retention.hours=168
log.segment.bytes=1073741824
log.retention.check.interval.ms=300000
zookeeper.connect=localhost:2181
zookeeper.connection.timeout.ms=6000


On Wed, Aug 9, 2017 at 1:08 AM, M. Manna <ma...@gmail.com> wrote:

> Hi,
>
> Could you Post your zookeeper.properties and server.properties file
> details?
>
> Thanks,
>
> On 9 August 2017 at 07:08, shyla deshpande <de...@gmail.com>
> wrote:
>
> > I have even tried deleting the contents of log.dirs and dataDir before
> > starting the zookeeper and kafka server, still no success. I appreciate
> any
> > help.
> >
> > On Tue, Aug 8, 2017 at 10:43 PM, shyla deshpande <
> deshpandeshyla@gmail.com
> > >
> > wrote:
> >
> > > I was successfully using it for many months, and now I am unable to.
> > > I have used lsof -i tcp:9092 to see any process using 9092 port and I
> > > don't see any process using 9092.
> > >
> > > On Tue, Aug 8, 2017 at 10:28 PM, shyla deshpande <
> > deshpandeshyla@gmail.com
> > > > wrote:
> > >
> > >> Hello all,
> > >>
> > >> I am trying to use kafka locally on my Mac. When I am trying to start
> > the
> > >> kafka server I get the following error. Please help. Thanks.
> > >>
> > >> [2017-08-08 22:16:37,319] FATAL [Kafka Server 0], Fatal error during
> > >> KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
> > >> kafka.common.KafkaException: Socket server failed to bind to
> > 0.0.0.0:9092:
> > >> Address already in use.
> > >> at kafka.network.Acceptor.openServerSocket(SocketServer.scala:327)
> > >> at kafka.network.Acceptor.<init>(SocketServer.scala:252)
> > >> at kafka.network.SocketServer$$anonfun$startup$1.apply(SocketSe
> > >> rver.scala:91)
> > >> at kafka.network.SocketServer$$anonfun$startup$1.apply(SocketSe
> > >> rver.scala:83)
> > >> at scala.collection.mutable.ResizableArray$class.foreach(Resiza
> > >> bleArray.scala:59)
> > >> at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
> > >> at kafka.network.SocketServer.startup(SocketServer.scala:83)
> > >> at kafka.server.KafkaServer.startup(KafkaServer.scala:222)
> > >> at kafka.server.KafkaServerStartable.startup(KafkaServerStartab
> > >> le.scala:38)
> > >> at kafka.Kafka$.main(Kafka.scala:65)
> > >> at kafka.Kafka.main(Kafka.scala)
> > >> Caused by: java.net.BindException: Address already in use
> > >> 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(ServerSocketChannelI
> > >> mpl.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:323)
> > >> ... 10 more
> > >>
> > >
> > >
> >
>

Re: Unable to start kafka server, 0.0.0.0:9092: Address already in use. Please help

Posted by "M. Manna" <ma...@gmail.com>.
Hi,

Could you Post your zookeeper.properties and server.properties file details?

Thanks,

On 9 August 2017 at 07:08, shyla deshpande <de...@gmail.com> wrote:

> I have even tried deleting the contents of log.dirs and dataDir before
> starting the zookeeper and kafka server, still no success. I appreciate any
> help.
>
> On Tue, Aug 8, 2017 at 10:43 PM, shyla deshpande <deshpandeshyla@gmail.com
> >
> wrote:
>
> > I was successfully using it for many months, and now I am unable to.
> > I have used lsof -i tcp:9092 to see any process using 9092 port and I
> > don't see any process using 9092.
> >
> > On Tue, Aug 8, 2017 at 10:28 PM, shyla deshpande <
> deshpandeshyla@gmail.com
> > > wrote:
> >
> >> Hello all,
> >>
> >> I am trying to use kafka locally on my Mac. When I am trying to start
> the
> >> kafka server I get the following error. Please help. Thanks.
> >>
> >> [2017-08-08 22:16:37,319] FATAL [Kafka Server 0], Fatal error during
> >> KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
> >> kafka.common.KafkaException: Socket server failed to bind to
> 0.0.0.0:9092:
> >> Address already in use.
> >> at kafka.network.Acceptor.openServerSocket(SocketServer.scala:327)
> >> at kafka.network.Acceptor.<init>(SocketServer.scala:252)
> >> at kafka.network.SocketServer$$anonfun$startup$1.apply(SocketSe
> >> rver.scala:91)
> >> at kafka.network.SocketServer$$anonfun$startup$1.apply(SocketSe
> >> rver.scala:83)
> >> at scala.collection.mutable.ResizableArray$class.foreach(Resiza
> >> bleArray.scala:59)
> >> at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
> >> at kafka.network.SocketServer.startup(SocketServer.scala:83)
> >> at kafka.server.KafkaServer.startup(KafkaServer.scala:222)
> >> at kafka.server.KafkaServerStartable.startup(KafkaServerStartab
> >> le.scala:38)
> >> at kafka.Kafka$.main(Kafka.scala:65)
> >> at kafka.Kafka.main(Kafka.scala)
> >> Caused by: java.net.BindException: Address already in use
> >> 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(ServerSocketChannelI
> >> mpl.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:323)
> >> ... 10 more
> >>
> >
> >
>

Re: Unable to start kafka server, 0.0.0.0:9092: Address already in use. Please help

Posted by shyla deshpande <de...@gmail.com>.
I have even tried deleting the contents of log.dirs and dataDir before
starting the zookeeper and kafka server, still no success. I appreciate any
help.

On Tue, Aug 8, 2017 at 10:43 PM, shyla deshpande <de...@gmail.com>
wrote:

> I was successfully using it for many months, and now I am unable to.
> I have used lsof -i tcp:9092 to see any process using 9092 port and I
> don't see any process using 9092.
>
> On Tue, Aug 8, 2017 at 10:28 PM, shyla deshpande <deshpandeshyla@gmail.com
> > wrote:
>
>> Hello all,
>>
>> I am trying to use kafka locally on my Mac. When I am trying to start the
>> kafka server I get the following error. Please help. Thanks.
>>
>> [2017-08-08 22:16:37,319] FATAL [Kafka Server 0], Fatal error during
>> KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
>> kafka.common.KafkaException: Socket server failed to bind to 0.0.0.0:9092:
>> Address already in use.
>> at kafka.network.Acceptor.openServerSocket(SocketServer.scala:327)
>> at kafka.network.Acceptor.<init>(SocketServer.scala:252)
>> at kafka.network.SocketServer$$anonfun$startup$1.apply(SocketSe
>> rver.scala:91)
>> at kafka.network.SocketServer$$anonfun$startup$1.apply(SocketSe
>> rver.scala:83)
>> at scala.collection.mutable.ResizableArray$class.foreach(Resiza
>> bleArray.scala:59)
>> at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
>> at kafka.network.SocketServer.startup(SocketServer.scala:83)
>> at kafka.server.KafkaServer.startup(KafkaServer.scala:222)
>> at kafka.server.KafkaServerStartable.startup(KafkaServerStartab
>> le.scala:38)
>> at kafka.Kafka$.main(Kafka.scala:65)
>> at kafka.Kafka.main(Kafka.scala)
>> Caused by: java.net.BindException: Address already in use
>> 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(ServerSocketChannelI
>> mpl.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:323)
>> ... 10 more
>>
>
>

Re: Unable to start kafka server, 0.0.0.0:9092: Address already in use. Please help

Posted by shyla deshpande <de...@gmail.com>.
I was successfully using it for many months, and now I am unable to.
I have used lsof -i tcp:9092 to see any process using 9092 port and I don't
see any process using 9092.

On Tue, Aug 8, 2017 at 10:28 PM, shyla deshpande <de...@gmail.com>
wrote:

> Hello all,
>
> I am trying to use kafka locally on my Mac. When I am trying to start the
> kafka server I get the following error. Please help. Thanks.
>
> [2017-08-08 22:16:37,319] FATAL [Kafka Server 0], Fatal error during
> KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
> kafka.common.KafkaException: Socket server failed to bind to 0.0.0.0:9092:
> Address already in use.
> at kafka.network.Acceptor.openServerSocket(SocketServer.scala:327)
> at kafka.network.Acceptor.<init>(SocketServer.scala:252)
> at kafka.network.SocketServer$$anonfun$startup$1.apply(
> SocketServer.scala:91)
> at kafka.network.SocketServer$$anonfun$startup$1.apply(
> SocketServer.scala:83)
> 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:83)
> at kafka.server.KafkaServer.startup(KafkaServer.scala:222)
> at kafka.server.KafkaServerStartable.startup(
> KafkaServerStartable.scala:38)
> at kafka.Kafka$.main(Kafka.scala:65)
> at kafka.Kafka.main(Kafka.scala)
> Caused by: java.net.BindException: Address already in use
> 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:323)
> ... 10 more
>