1 Reply Latest reply on Feb 3, 2006 6:33 PM by Peter Johnson

    java.net.UnknownHostException during startup

    Luis Daniel Rangel Tovar Newbie

      Hi all.

      It has happened to me in a couple of Win32 installations that a fresh new install fails to startup properly with the given error:

      15:29:02,468 WARN [ServiceController] Problem starting service jboss:service=invoker,type=http
      java.net.UnknownHostException: DS-SW-0001: DS-SW-0001
       at java.net.InetAddress.getLocalHost(InetAddress.java:1308)
      


      ... where DS-SW-0001 is the name of this PC, i've added the entries on LMHOSTS (And imported them and enabled lmhosts lookups)

      127.0.0.1 localhost
      127.0.0.1 DS-SW-0001
      


      and set this lines in jboss startup script:

      JAVA_OPTS="-server -Xms128m -Xmx128m -Djava.rmi.server.useLocalHostname=false -Djava.rmi.server.hostname=127.0.0.1"
      


      as an environment variable too.

      I've seen somewhere posts that claim itis fixed when they are online, well, this PC is on a LAN, a few switches away from the InternetServiceProvider, funny thing thou, the very same version of jBoss 4.0.3SP1 runs nice and smooth on my laptop, online and offline, while the desktop fails to bind services that use the hostname.

      ... if already started the server I type in an addressbar http://DS-SW-0001:8080 it opens jBoss's JMX Console, so the name is working, however several services are missing and waiting for a proper deployment.

      Is there a workaround ? Maybe something I'm missing here ?

      Does this has happened to any one else and has succesfully corrected it ?


      Thanks in advance.

      _______________________

      Production:
      Debian GNU Linux jBoss 4.0.3SP1
      XeonDual
      PostgreSQL 8
      Hibernate 3.1
      ---------------------------------
      Development:
      Debian GNU Linux jBoss 4.0.3SP1
      XeonDual
      PostgreSQL 8
      Hibernate 3.1.2
      ---------------------------------
      Desktop ( Fails )
      WinXP Pro jBoss 4.0.3SP1
      Pentium4
      PostgreSQL 8
      Hibernate 3.1
      ---------------------------------
      Laptop (Works)
      WinXP Home jBoss 4.0.3SP1
      Pentium4
      PostgreSQL 8
      Hibernate 3.1