java.net.UnknownHostException: -Z

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.

  • UnknownHostException kafka
    via Stack Overflow by noplay
    ,
    • java.net.UnknownHostException: -Z at java.net.InetAddress.getAllByName0(Unknown Source) at java.net.InetAddress.getAllByName0(Unknown Source) at java.net.InetAddress.getAllByName(Unknown Source) at java.net.InetAddress.getLocalHost(Unknown Source) at weblogic.servlet.internal.HttpServer.initServerNameAndPort(HttpServer.java:579) at weblogic.servlet.internal.HttpServer.start(HttpServer.java:196) at weblogic.servlet.internal.WebService.startWebServers(WebService.java:134) at weblogic.servlet.internal.WebService.resume(WebService.java:105) at weblogic.t3.srvr.ServerLifeCycleList.resume(ServerLifeCycleList.java:61) at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:812) at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:294) at weblogic.Server.main(Server.java:31)

    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,
    46 more bugmates