java.net.UnknownHostException

RHEL: RHEL

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 web2

  • via Oracle Community by Cheney Shue, 1 year ago
    rhel
  • via tecadmin.net by Unknown author, 11 months ago
    RHEL: RHEL
  • Stack trace

    • java.net.UnknownHostException: RHEL: RHEL at java.net.InetAddress.getLocalHost(InetAddress.java:1426) at org.apache.hadoop.net.DNS.resolveLocalHostIPAddress(DNS.java:287) at org.apache.hadoop.net.DNS.<init>(DNS.java:58) 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)

    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, 4 days ago
    2 times, 1 month ago
    2 times, 7 months ago
    Unknown user
    Once, 10 months ago
    Unknown user
    Once, 11 months ago
    10 more bugmates