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.

  • Compilation issue
    via GitHub by KevinColemanInc
    ,
    • java.net.UnknownHostException: kuti-zsolt: hostname nor at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293) at java.net.InetAddress.getLocalHost(InetAddress.java:1469) at net.jini.discovery.LookupDiscovery.getLocalHost(LookupDiscovery.java:2396) at net.jini.discovery.LookupDiscovery.init(LookupDiscovery.java:3174) at net.jini.discovery.LookupDiscovery.beginDiscovery(LookupDiscovery.java:3086) at net.jini.discovery.LookupDiscovery.<init>(LookupDiscovery.java:1946) at net.jini.discovery.LookupDiscoveryManager.beginDiscovery(LookupDiscoveryManager.java:1549) at net.jini.discovery.LookupDiscoveryManager.<init>(LookupDiscoveryManager.java:966) at org.rioproject.impl.client.DiscoveryManagementPool$SharedDiscoveryManager.<init>(DiscoveryManagementPool.java:531) at org.rioproject.impl.client.DiscoveryManagementPool$DiscoveryControl.createSharedDiscoveryManager(DiscoveryManagementPool.java:424) at org.rioproject.impl.client.DiscoveryManagementPool$DiscoveryControl.createLookupDiscoveryManager(DiscoveryManagementPool.java:342) at org.rioproject.impl.client.DiscoveryManagementPool.getDiscoveryManager(DiscoveryManagementPool.java:214) at org.rioproject.tools.cli.ServiceFinder.<init>(ServiceFinder.java:98) at org.rioproject.tools.cli.CLI.doInit(CLI.java:1518) at org.rioproject.tools.cli.CLI.initCLI(CLI.java:1434) at org.rioproject.tools.cli.CLI.main(CLI.java:1584)

    Users with the same issue

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