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.

  • How to Setup Hadoop 2.7.1 on CentOS & Ubuntu
    via by Unknown author,
  • Issues running grails on a remote environment
    via Stack Overflow by Josh K
    ,
  • GeoTelematic® Solutions, Inc.
    via by Unknown author,
  • UnknownHostException - Caucho Forums
    via by Unknown author,
  • QUEUE Error - GATK-Forum
    via by Unknown author,
    • java.net.UnknownHostException: RHEL: RHEL at java.net.InetAddress.getLocalHost(InetAddress.java:1426) at org.apache.hadoop.net.DNS.resolveLocalHostname(DNS.java:264) at org.apache.hadoop.net.DNS.<init>(DNS.java:57) at org.apache.hadoop.hdfs.server.namenode.NNStorage.newBlockPoolID(NNStorage.java:914) at org.apache.hadoop.hdfs.server.namenode.NNStorage.newNamespaceInfo(NNStorage.java:550) at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:144) at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:837) at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1213) at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1320)

    Users with the same issue

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