java.net.UnknownHostException

localhost: localhost

Samebug tips1

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

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web71

  • via Oracle Community by 937637, 1 year ago
    [localhost]
  • localhost]
  • Stack trace

    • java.net.UnknownHostException: localhost: localhost at java.net.InetAddress.getLocalHost(InetAddress.java:1308) at com.sun.enterprise.util.net.NetUtils.getCanonicalHostName(NetUtils.java:66) at com.sun.enterprise.util.ASenvPropertyReader.setSystemProperties(ASenvPropertyReader.java:161) at com.sun.enterprise.server.PEMain.main(PEMain.java:185) at com.sun.rave.tray.RavePEMain.main(RavePEMain.java:37)

    Write tip

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

    Users with the same issue

    5 times, 12 hours ago
    2 times, 1 month ago
    2 times, 7 months ago
    Unknown user
    Once, 10 months ago
    Unknown user
    Once, 10 months ago
    10 more bugmates