java.net.UnknownHostException

centos5: centos5

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


rafaelrafael

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

Stack trace

  • java.net.UnknownHostException: centos5: centos5 at java.net.InetAddress.getLocalHost(InetAddress.java:1426) at org.apache.jk.common.ChannelSocket.unLockSocket(ChannelSocket.java:490) at org.apache.jk.common.ChannelSocket.pause(ChannelSocket.java:288) at org.apache.jk.server.JkMain.pause(JkMain.java:739) at org.apache.jk.server.JkCoyoteHandler.pause(JkCoyoteHandler.java:153) at org.apache.catalina.connector.Connector.pause(Connector.java:1138) at org.apache.catalina.core.StandardService.stop(StandardService.java:578) at org.apache.catalina.core.StandardServer.stop(StandardServer.java:788) at org.apache.catalina.startup.Catalina.stop(Catalina.java:662) at org.apache.catalina.startup.Catalina.start(Catalina.java:629) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

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

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