"java.nio.channels.UnresolvedAddressException" while starting kafka server

  apache-kafka, apache-zookeeper, windows

I started zookeeper after that i have ran "kafka-server-start.bat mypathserver.properties" command to start kafka server.

Getting following error in kafka server window.

 INFO Opening socket connection to server localhost/<unresolved>:2181. Will not attempt to authenticate using SASL (unknown error) (org.apache.zookeeper.ClientCnxn)
 WARN Session 0x0 for server localhost/<unresolved>:2181, unexpected error, closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn)
 java.nio.channels.UnresolvedAddressException
  at java.base/sun.nio.ch.Net.checkAddress(Net.java:149)
  at java.base/sun.nio.ch.Net.checkAddress(Net.java:157)
  at java.base/sun.nio.ch.SocketChannelImpl.checkRemote(SocketChannelImpl.java:815)
  at java.base/sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:837)
  at org.apache.zookeeper.ClientCnxnSocketNIO.registerAndConnect(ClientCnxnSocketNIO.java:277)
  at org.apache.zookeeper.ClientCnxnSocketNIO.connect(ClientCnxnSocketNIO.java:287)
  at org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:1021)
  at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1064)

Below are the properties in server.properties

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=C:KafkaLog
num.partitions=1
num.recovery.threads.per.data.dir=1
offsets.topic.replication.factor=1
transaction.state.log.replication.factor=1
transaction.state.log.min.isr=1
log.retention.hours=168
log.segment.bytes=1073741824
log.retention.check.interval.ms=300000
zookeeper.connect=localhost:2181
zookeeper.connection.timeout.ms=6000
confluent.support.metrics.enable=true
confluent.support.customer.id=anonymous
group.initial.rebalance.delay.ms=0

Zookeeper properties are

dataDir=C:ZookeeperLog
clientPort=2181
maxClientCnxns=0

Source: Windows Questions

LEAVE A COMMENT