java.net.UnknownHostException

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.

  • Linux: Installation of snappy - snap - STEP Forum
    via by Unknown author,
    • java.net.UnknownHostException: ip-172-30-0-37: ip-172-30-0-37: unknown error at java.net.InetAddress.getLocalHost(InetAddress.java:1505) at org.ow2.proactive.scheduler.core.DataSpaceServiceStarter.startNamingService(DataSpaceServiceStarter.java:138) at org.ow2.proactive.scheduler.core.SchedulerFrontend.initActivity(SchedulerFrontend.java:243) at org.objectweb.proactive.core.body.ActiveBody.run(ActiveBody.java:163) at java.lang.Thread.run(Thread.java:745) Caused by: java.net.UnknownHostException: ip-172-30-0-37: unknown error at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) at java.net.InetAddress.getLocalHost(InetAddress.java:1500) ... 4 more

    Users with the same issue

    nasimknasimk
    2 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    raj76raj76
    2 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    61 more bugmates