3 Replies Latest reply on Jul 16, 2002 3:38 PM by Ulrich Romahn


    James Ng Newbie

      Hi guys!

      I'm new to JBoss and upon starting the server I downloaded and built, it's already giving me problems.

      It refused to start.

      I checked the log file and saw the subject-mentioned error when the server tried to deploy.

      I asked my colleague and he said that I didn't have a DNS so it failed. He told me to try and get host by IP instead of get by hostname.

      The problem now is that I don't know how to set the server config to do just that.

      Anyone here has any ideas as to how to solve my problem?
      Thanx in adv.

        • 1. Re: java.net.UnknownHostException
          Joel Vogt Master

          can you post the bit of the log where the error is?

          • 2. Re: java.net.UnknownHostException
            James Ng Newbie

            Here is part of the log which show the error:

            ERROR [WebService] Failed to get localhost name
            java.net.UnknownHostException: earth
            at java.net.InetAddress.getAllByName0(InetAddress.java:566)
            at java.net.InetAddress.getAllByName0(InetAddress.java:535)
            at java.net.InetAddress.getAllByName(InetAddress.java:528)
            at java.net.InetAddress.getLocalHost(InetAddress.java:718)
            at org.jboss.web.WebService.(WebService.java:76)
            at java.lang.reflect.Constructor.newInstance(Native Method)
            at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:786)
            at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:240)
            at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:267)
            at org.jboss.system.ServiceCreator.install(ServiceCreator.java:86)
            at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:167)
            at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:130)
            at org.jboss.system.ServiceController.install(ServiceController.java:217)
            at java.lang.reflect.Method.invoke(Native Method)

            • 3. Re: java.net.UnknownHostException
              Ulrich Romahn Newbie

              Well, if you don't have a DNS, you need to put the name of your computer in a file called 'hosts'.
              On Unix/Linux this file is usually in /etc and on Windows machines in C:\WinNT\system32\driver\etc.

              You need to make an entry such as:


              in which you replace the IP with the IP of your machine (in Unix/Linux issue the command 'ifconfig', in Windows 'ipconfig') and 'server-name' needs to be replaced by the name of your machine.

              NOTE: on Unix/Linux, you need to have root access to modify 'hosts' or run the 'ifconfig' command. This usually should solve your issue.