java.net.UnknownHostException

tip

When kafka creates new consumers, it simply concatenate the name of your VM to generate the consumer id. So, your VM resolves localhost as the name of your VM, not whatever you had set. To solve, add kafka(or the name of VM) plus address to /etc/hosts

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • Issues on Redhat, but not elsewhere
    via by octoberdan,
  • java.net.UnknownHostException on Solaris
    via by Jitesh Sinha,
  • UnknownHostException kafka
    via Stack Overflow by noplay
    ,
    • java.net.UnknownHostException: esterel: esterel at java.net.InetAddress.getLocalHost(InetAddress.java:1315) at org.jgroups.util.Util.getBindAddress(Util.java:2065) at org.jgroups.protocols.TP.setProperties(TP.java:619) at org.jgroups.protocols.UDP.setProperties(UDP.java:147) at org.jgroups.stack.Protocol.setPropertiesInternal(Protocol.java:95) at org.jgroups.stack.Configurator$ProtocolConfiguration.createLayer(Configurator.java:699) at org.jgroups.stack.Configurator$ProtocolConfiguration.access$0(Configurator.java:665) at org.jgroups.stack.Configurator.createProtocols(Configurator.java:375) at org.jgroups.stack.Configurator.setupProtocolStack(Configurator.java:58) at org.jgroups.stack.ProtocolStack.setup(ProtocolStack.java:205) at org.jgroups.JChannel.init(JChannel.java:1400) at org.jgroups.JChannel.<init>(JChannel.java:248) at org.jgroups.JChannel.<init>(JChannel.java:231) at com.etrali.tests.ChannelFactory.createChannel(ChannelFactory.java:28) at com.etrali.tests.notification.Sender.<init>(Sender.java:115) at com.etrali.tests.notification.Sender.main(Sender.java:108)

    Users with the same issue

    raj76
    2 times, last one,
    nasimk
    2 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    9 more bugmates