2 Replies Latest reply on Aug 28, 2002 8:24 AM by Adrian Brock

    SOS - Address in use exception. Help me to run JBoss 3.0 on

    Jayakumar Newbie

      Hi All,

      Sorry to post this frequently asked question on java.net.BindException: Address in use issue. I already searched this forum and tried out all suggestions of various kind souls, for this issue. Let me explain in details about my problem:

      I have JBoss 3.0.0 (with Jetty) installed on my Dell PC running Windows 2000 Professional edition (Service Pack 3) under Domain controller using static IP with administrator equivalent rights, using Sun's JRE 1.3.1 (build 1.3.1-b24) with Hotspot Client VM.

      I don't have any other applications or servers running in my machine at the time of running my JBoss. But getting java.net.BindException: Address in use: JVM_Bind, when Jetty trying to bind port 8080. Also I tried JBoss with tomcat, but same problem. The address it is trying to bind is 0.0.0.0 (as seen in console) and all other ports are bound properly i.e. 4444, 8090, 8091, 8083, 1099 etc. even though the address in this case also 0.0.0.0

      Part of the log seen on console:

      11:07:53,950 INFO [OILServerILService] Starting
      11:07:53,960 INFO [OILServerILService] JBossMQ OIL service available at : 0.0.0.0/0.0.0.0:8090
      11:07:53,980 INFO [OILServerILService] Started
      11:07:53,990 INFO [UILServerILService] Starting
      11:07:54,000 INFO [UILServerILService] JBossMQ UIL service available at : 0.0.0.0/0.0.0.0:8091
      11:07:54,030 INFO [UILServerILService] Started

      I am sure that no other application is using port 8080 (using netstat -a command and also using fport from www.foundstone.com) and found other ports (i.e. 4444, 8083 etc) are being used by java.exe. So, I did a clean shutdown of JBoss (using .bat file). Then I tried running standalone Catalina 4.0.1 and found that it is sucessfully up and running. Then I shutdowned Catalina. Now I made it sure that all ports which are going to be used by JBoss, is free. Then I opened one more command prompt and tried running JBoss. But this time, when RMI/JRMP invoker tried to bind port 4444 (this is before Jetty or Catalin trying to bind 8080), got the same java.net.BindException.

      One funny thing is that the IP addres is shown as 0.0.0.0 as seen in console

      11:07:46,590 WARN [Jetty] WARNING: Failed to start: SocketListener@0.0.0.0:8080

      and also bindAddress=null

      11:07:38,498 INFO [NamingService] Started jnpPort=1099, rmiPort=0, backlog=50, bindAddress=null, Client SocketFactory=null, Server SocketFactory=null

      I tried running JBoss atleast 5 times (sometimes even restarting PC), but no luck. Also, I tried the following tips given by other peoples:

      1) Stoping DHCP client and running JBoss
      2) Removing the PC from Domain controller
      3) Using ports other than 8080 (I did by giving -Djetty.port=9999)
      4) User rights issue (I have administrator equivalent rights)
      5) Giving a static IP (I already done have it)
      6) Installing latest network drivers (I have SP3)
      7) Making sure that no other applications use those ports (I am running my PC with minimal windows services and no other applications or servers running in my PC at the time of starting my JBoss).

      and also other couple of suggestions, but NO LUCK.

      Portion of the exception as seen in console as below:

      11:07:46,590 WARN [Jetty] WARNING: Failed to start: SocketListener@0.0.0.0:8080
      11:07:46,600 ERROR [JettyService] multiple exceptions...
      11:07:46,620 ERROR [JettyService] exception
      java.net.BindException: Address in use: JVM_Bind
      at java.net.PlainSocketImpl.socketBind(Native Method)
      at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:405)
      at java.net.ServerSocket.(ServerSocket.java:170)
      at org.mortbay.util.ThreadedServer.newServerSocket(ThreadedServer.java:315)
      at org.mortbay.util.ThreadedServer.start(ThreadedServer.java:388)
      at org.mortbay.http.SocketListener.start(SocketListener.java:108)
      at org.mortbay.http.HttpServer.start(HttpServer.java:198)
      at org.jboss.jetty.JettyService.startService(JettyService.java:177)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:162)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:894)
      at $Proxy6.start(Unknown Source)
      ........................
      ........................
      ........................

      and while binding the port 4444, the following exception occurs:

      11:31:44,347 ERROR [JRMPInvoker] Failed
      java.rmi.server.ExportException: Port already in use: 4444; nested exception is:
      java.net.BindException: Address in use: JVM_Bind
      java.net.BindException: Address in use: JVM_Bind
      at java.net.PlainSocketImpl.socketBind(Native Method)
      at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:405)
      at java.net.ServerSocket.(ServerSocket.java:170)
      at java.net.ServerSocket.(ServerSocket.java:82)
      at sun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(RMIDirectSocketFactory.java:30)
      at sun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(RMIMasterSocketFactory.java:312)
      at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:559)
      at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:222)
      at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:176)
      at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:319)
      at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:119)
      at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:125)
      at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:109)
      .....................
      .....................
      .....................

      Please help me where I am going wrong.

      Thanks in advance.

      Regards,
      Jayakumar.