java.net.UnknownHostException: bananas: bananas

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
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.

  • JBOSS Unknowhost exception
    via Stack Overflow by Mohan
    ,
  • getting exception while sending mail using java
    via Stack Overflow by abhi
    ,
  • java.net.UnknownHostException
    via Stack Overflow by Gilberto Ribeiro
    ,
  • UnknownHostException on TeamCity server start
    via by Unknown author,
    • java.net.UnknownHostException: bananas: bananas at java.net.InetAddress.getLocalHost(InetAddress.java:1354) at dns.main(dns.java:7)

    Users with the same issue

    raj76
    raj762 times, last one,
    nasimk
    nasimk2 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    9 more bugmates