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.

  • Startup Problem - Port used
    via by itdude,
  • Error al iniciar glassfish
    via by Laura,
  • java.net.UnknownHostException: - Forums | Liferay
    via by Unknown author,
  • hadoop eclipse 三(转)
    via by Unknown author,
  • java.net.UnknownHostException: - Forums | Liferay
    via by Unknown author,
    • java.net.UnknownHostException: (none): (none) at java.net.InetAddress.getLocalHost(InetAddress.java:1353) at com.sun.enterprise.util.net.NetUtils.getCanonicalHostName(NetUtils.java:305) at com.sun.enterprise.v3.server.SystemTasks.setSystemPropertiesFromEnv(SystemTasks.java:146) at com.sun.enterprise.v3.server.SystemTasks.postConstruct(SystemTasks.java:94) at com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:131) at com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:91) at com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82) at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67) at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139) at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:76) at org.jvnet.hk2.component.Habitat.getBy(Habitat.java:1048) at org.jvnet.hk2.component.Habitat.getByType(Habitat.java:1029) at com.sun.hk2.component.InjectInjectionResolver.getComponentInjectValue(InjectInjectionResolver.java:159) at com.sun.hk2.component.InjectInjectionResolver.getValue(InjectInjectionResolver.java:90) at org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:141) at org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:91) at com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:126) at com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:91) at com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82) at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67) at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139) at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:76) at com.sun.enterprise.module.bootstrap.Main.findStartupService(Main.java:378) at org.glassfish.kernel.GlassFishActivator$1.newGlassFish(GlassFishActivator.java:105) at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:113) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97) at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:55)[#|2011-04-13T16:02:58.512+0200|WARNING|glassfish3.1|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.util|_ThreadID=1;_ThreadName=main;|RAR8068: Using default datasource : __ds_jdbc_ra for pool : mysql_liberty_groupPool|#]

    Users with the same issue

    raj76
    2 times, last one,
    nasimk
    2 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    9 more bugmates