java.net.UnknownHostException

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.

  • From Scott McCulley, I ran in to some difficulties during the install of Crowd. I thought I might bring them up to as something to address in your next release. 1) During the configuration of the default admin, the application attempts to resolve the hostname of the server. If it fails, it reports error. But before it does, it adds the user and group to the DB so it is impossible to re-use that admin user or create a new one, since the group already exists. Question: {noformat} Is it really necessary to attempt to resolve the hostname of the server? What if (and I am) using a different name to access Crowd, and it isn't the name of the server?? {noformat} Suggestion: {noformat} 1) Ask for the name of the server (actually, I think you do.) Then use that server name instead of attempting to use the hostname. 2) Don't create the user if you intend to fail. Or if you fail, drop the user from the DB, so it can be re-used later. 3) Same goes for the admin group as well... {noformat} Error log: {noformat} 2011-09-18 19:34:20,050 http-8095-1 INFO [console.action.setup.SelectSetupStep] Current setup step is /console/setup/directoryinternalsetup.action 2011-09-18 19:34:24,651 http-8095-1 INFO [console.action.setup.SelectSetupStep] Current setup step is /console/setup/defaultadministrator.action 2011-09-18 19:34:46,700 http-8095-1 ERROR [console.action.setup.DefaultAdministrator] web3.cardboard-box.com: web3.cardboard-box.com java.net.UnknownHostException: web3.cardboard-box.com: web3.cardboard-box.com at java.net.InetAddress.getLocalHost(InetAddress.java:1360) at com.atlassian.crowd.console.action.setup.DefaultAdministrator.addCrowdApplication(DefaultAdministrator.java:213) at com.atlassian.crowd.console.action.setup.DefaultAdministrator.doUpdate(DefaultAdministrator.java:112) 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) {noformat}
    via by Vincent Choy [Atlassian],
  • From Scott McCulley, I ran in to some difficulties during the install of Crowd. I thought I might bring them up to as something to address in your next release. 1) During the configuration of the default admin, the application attempts to resolve the hostname of the server. If it fails, it reports error. But before it does, it adds the user and group to the DB so it is impossible to re-use that admin user or create a new one, since the group already exists. Question: {noformat} Is it really necessary to attempt to resolve the hostname of the server? What if (and I am) using a different name to access Crowd, and it isn't the name of the server?? {noformat} Suggestion: {noformat} 1) Ask for the name of the server (actually, I think you do.) Then use that server name instead of attempting to use the hostname. 2) Don't create the user if you intend to fail. Or if you fail, drop the user from the DB, so it can be re-used later. 3) Same goes for the admin group as well... {noformat} Error log: {noformat} 2011-09-18 19:34:20,050 http-8095-1 INFO [console.action.setup.SelectSetupStep] Current setup step is /console/setup/directoryinternalsetup.action 2011-09-18 19:34:24,651 http-8095-1 INFO [console.action.setup.SelectSetupStep] Current setup step is /console/setup/defaultadministrator.action 2011-09-18 19:34:46,700 http-8095-1 ERROR [console.action.setup.DefaultAdministrator] web3.cardboard-box.com: web3.cardboard-box.com java.net.UnknownHostException: web3.cardboard-box.com: web3.cardboard-box.com at java.net.InetAddress.getLocalHost(InetAddress.java:1360) at com.atlassian.crowd.console.action.setup.DefaultAdministrator.addCrowdApplication(DefaultAdministrator.java:213) at com.atlassian.crowd.console.action.setup.DefaultAdministrator.doUpdate(DefaultAdministrator.java:112) 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) {noformat}
    via by Vincent Choy [Atlassian],
  • HIVE VIEW ERROR
    via Stack Overflow by Yogesh Selvaraj
    ,
  • Java mon amour: September 2015
    via by Unknown author,
  • UnknownHostException kafka
    via Stack Overflow by noplay
    ,
    • java.net.UnknownHostException: web3.cardboard-box.com: web3.cardboard-box.com at java.net.InetAddress.getLocalHost(InetAddress.java:1360) at com.atlassian.crowd.console.action.setup.DefaultAdministrator.addCrowdApplication(DefaultAdministrator.java:213) at com.atlassian.crowd.console.action.setup.DefaultAdministrator.doUpdate(DefaultAdministrator.java:112) 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)

    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