0

Currently i have an issue with my tomcat application where it always mentioned that port is being used. The thing is, this issue only happened sporadically and whenever this issue happened, i did run a netstat command and seems that the port is not being used. Could it possibly it is due to know bug or the tomcat failed to "release" itself from occupying the resource? Current version is 6.0.36

Sep 19, 2014 7:11:57 AM org.apache.coyote.http11.Http11Protocol init
SEVERE: Error initializing endpoint
java.net.BindException: Address already in use <null>:9080
    at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:549)
    at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:180)
    at org.apache.catalina.connector.Connector.initialize(Connector.java:1123)
    at org.apache.catalina.core.StandardService.initialize(StandardService.java:703)
    at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:838)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:538)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:562)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.net.BindException: Address already in use
    at java.net.PlainSocketImpl.socketBind(Native Method)
    at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365)
    at java.net.ServerSocket.bind(ServerSocket.java:319)
    at java.net.ServerSocket.<init>(ServerSocket.java:185)
    at java.net.ServerSocket.<init>(ServerSocket.java:141)
    at org.apache.tomcat.util.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:50)
    at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:538)
    ... 12 more
Sep 19, 2014 7:11:57 AM org.apache.catalina.core.StandardService initialize
SEVERE: Failed to initialize connector [Connector[HTTP/1.1-9080]]
LifecycleException:  Protocol handler initialization failed: java.net.BindException: Address already in use <null>:9080
    at org.apache.catalina.connector.Connector.initialize(Connector.java:1125)
    at org.apache.catalina.core.StandardService.initialize(StandardService.java:703)
    at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:838)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:538)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:562)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Sep 19, 2014 7:11:57 AM org.apache.catalina.startup.Catalina load
masegaloeh
  • 17,978
  • 9
  • 56
  • 104
  • Did you run `netstat -lnp` command when checking for open ports? – Tero Kilkanen Sep 25 '14 at 07:58
  • i did.. with some other netstat command.. so far the port is not being used.. or empty.. "Address already in use :9080" Do you why is it Null? or is it common? – Muhamad Shukri Muhamd Shukur Sep 25 '14 at 08:00
  • Are you 100% sure that the "some other command" showed listening ports and not only active connections? – Tero Kilkanen Sep 25 '14 at 08:23
  • well.. if you asked me to list them.. i could not remember as copied from mutiple resource.. and im sure i will try yours when this issue happen.. but i can tell you so far 100% the port is not being used.. – Muhamad Shukri Muhamd Shukur Sep 25 '14 at 08:30
  • did you check lsof output with port ? – Pratap Sep 25 '14 at 09:17
  • so far i did not check on the lsof. The problem is the issue happened with no specific time and the whenever i startup the process, it will stay there for unknown amount of time before it went down. Whenever i check (with delay due to time), all the process look "clean". We suspect the tomcat itself does not release the port on time or right after the issue happened. Could it be possible? – Muhamad Shukri Muhamd Shukur Sep 26 '14 at 00:45

0 Answers0