1 Reply Latest reply on Feb 18, 2004 2:01 AM by Chris Malan

    java.net.BindException: Address already in use

    Chris Malan Novice

      That is of course just the essence of the error message. Here is some more:

      03:00:35,334 INFO [OILServerILService] JBossMQ OIL service available at : 0.0.0.0/0.0.0.0:5005
      03:00:35,352 INFO [OILServerILService] Started
      03:00:35,353 INFO [UILServerILService] Starting
      03:00:35,354 INFO [UILServerILService] JBossMQ UIL service available at : 0.0.0.0/0.0.0.0:5006
      03:00:35,370 INFO [UILServerILService] Started
      03:00:35,371 INFO [OIL2ServerILService] Starting
      03:00:35,378 ERROR [OIL2ServerILService] Starting failed
      java.net.BindException: Address already in use
      at java.net.PlainSocketImpl.socketBind(Native Method)
      at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:331)
      at java.net.ServerSocket.bind(ServerSocket.java:318)
      at java.net.ServerSocket.(ServerSocket.java:185)

      etc. etc.

      03:00:35,381 WARN [ServiceController] Problem starting service jboss.mq:service=InvocationLayer,type=OIL2
      java.net.BindException: Address already in use
      at java.net.PlainSocketImpl.socketBind(Native Method)
      at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:331)
      etc. etc.
      03:00:35,392 WARN [ServiceController] Problem starting service jboss.mq:service=InvocationLayer,type=UIL2
      java.net.BindException: Address already in use
      at java.net.PlainSocketImpl.socketBind(Native Method)
      at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:331)
      at java.net.ServerSocket.bind(ServerSocket.java:318)
      etc. etc.
      MBeans waiting for other MBeans:
      [ObjectName: jboss.mq:service=InvocationLayer,type=OIL2
      state: FAILED
      I Depend On: jboss.mq:service=Invoker

      Depends On Me: java.net.BindException: Address already in use, ObjectName: jboss.mq:service=InvocationLayer,type=UIL2
      state: FAILED
      I Depend On: jboss.mq:service=Invoker

      Depends On Me: java.net.BindException: Address already in use]

      I found a message dealing with just this problem posted in December 2003. According to the responses one should change ports in uil2-service.xml, oil2-service.xml and oil-service.xml All these are supposed to be found in .../deploy/jms. Not only does the relevant JBoss-3.2.0 not have that directory, but a file search of all of JBOSS_HOME could not find one of those files.

      This is one of x instances of JBoss running on a commercial server. Each user has his own instance of JBoss inside his own context.

      Which files contain the ports that have to be changed, if that is the correct answer? Thanks very much.

      Chris

        • 1. Re: java.net.BindException: Address already in use
          Chris Malan Novice

          Found it!

          The file is jbossmq-service.xml and it is in .../server/default/deploy.

          I found two unused ports and changed the ports on the offending Oil2ServerILService and the UilServerILService in the above file to these unused ports. That did the trick. No more exceptions, a beautilful clean start. It may be my imagination, but the application seems faster. Most likely just less Net traffic.

          Chris