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,
  • on Solaris
    via by Jitesh Sinha,
  • UnknownHostException kafka
    via Stack Overflow by noplay
    • esterel: esterel at at org.jgroups.util.Util.getBindAddress( at org.jgroups.protocols.TP.setProperties( at org.jgroups.protocols.UDP.setProperties( at org.jgroups.stack.Protocol.setPropertiesInternal( at org.jgroups.stack.Configurator$ProtocolConfiguration.createLayer( at org.jgroups.stack.Configurator$ProtocolConfiguration.access$0( at org.jgroups.stack.Configurator.createProtocols( at org.jgroups.stack.Configurator.setupProtocolStack( at org.jgroups.stack.ProtocolStack.setup( at org.jgroups.JChannel.init( at org.jgroups.JChannel.<init>( at org.jgroups.JChannel.<init>( at com.etrali.tests.ChannelFactory.createChannel( at com.etrali.tests.notification.Sender.<init>( at com.etrali.tests.notification.Sender.main(

    Users with the same issue

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