0 Replies Latest reply on Jan 13, 2004 7:01 PM by nagulapati

    java.net.BindException: Address already in use

    nagulapati Newbie

      Hello Guys,

      I am having problems running my JBoss application server successfully. I am currently using JBoss 3.2.1 and configured it to use Axis 1.1 framework.

      When I try to launch the JBoss application server, it is throwing the following exception

      java.net.BindException: Address already in use

      Below is the output snippet from my server.log file.
      -------------------------------------------------------------

      2004-01-12 23:02:49,663 WARN [org.jboss.jbossweb] WARNING: Failed to start: AJP13Listener@0.0.0.0:8009
      2004-01-12 23:02:49,664 ERROR [org.jboss.jetty.JettyService] multiple exceptions...
      2004-01-12 23:02:49,691 ERROR [org.jboss.jetty.JettyService] exception
      java.net.BindException: Address already in use
      at java.net.PlainSocketImpl.socketBind(Native Method)
      at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:321)
      at java.net.ServerSocket.bind(ServerSocket.java:308)
      at java.net.ServerSocket.bind(ServerSocket.java:266)
      at java.net.ServerSocket.(ServerSocket.java:182)
      at org.mortbay.util.ThreadedServer.newServerSocket(ThreadedServer.java:317)
      at org.mortbay.util.ThreadedServer.start(ThreadedServer.java:389)
      at org.mortbay.http.ajp.AJP13Listener.start(AJP13Listener.java:128)
      at org.mortbay.http.HttpServer.start(HttpServer.java:655)
      at org.jboss.jetty.JettyService.startService(JettyService.java:175)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
      at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:966)
      at $Proxy11.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:392)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy6.deploy(Unknown Source)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:365)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:272)
      at org.jboss.Main.boot(Main.java:150)
      at org.jboss.Main$1.run(Main.java:388)
      at java.lang.Thread.run(Thread.java:536)

      -------------------------------------------------------------

      I can figure that the port for AJPListener is already binded to another service. But the fact is, I am not running any other services. Finally, as a last resort I tried launching the server from another port by specifying:

      "-Djetty.port" option

      But the exception is still persisting. Another question is, is it the right way to change the default port or do I need to change the jboss-service.xml configuration file. Can anyone point me to the right procedure of changing the default ports for JBoss 3.2.1

      According to the exception thrown, it has to do something with the AJPListener. How can I change the default port for AJPListener?

      Thanks in advance and any help is appreciated.
      Vivek