java.net.UnknownHostException: localhost.localdomain: localhost.localdomain

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert 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

Solutions on the web

via Oracle Community by 658434, 1 year ago
localhost.localdomain: localhost.localdomain
via Stack Overflow by Olalekan Adebari
, 1 month ago
localhost.localdomain: localhost.localdomain: System error
via verydemo.com by Unknown author, 2 years ago
localhost.localdomain: localhost.localdomain
via Coderanch by Alan Shiers, 11 months ago
localhost.localdomain: localhost.localdomain
via Oracle Community by 843841, 1 year ago
localhost.localdomain: localhost.localdomain
via GitHub by litaonet
, 7 months ago
localhost.localdomain: localhost.localdomain: Name or service not known
java.net.UnknownHostException: localhost.localdomain: localhost.localdomain
at java.net.InetAddress.getLocalHost(InetAddress.java:1191)

Users with the same issue

5 times, 4 months ago
2 times, 5 months ago
2 times, 11 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.