dcsimg
"FATAL:java.net.BindException: Address in use:" - shutting TOmcat down does not release ports 8080 and 8007
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Eamonn_Maher
Posted On:   Monday, August 13, 2001 01:50 AM

Occasionally I get this error when I shut down Tomcat and start it again....... "FATAL: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:397) at java.net.ServerSocket. (ServerSocket.java:170) at java.net.ServerSocket. (ServerSocket.java:121) at org.apache.tomcat.net.DefaultServerSocketFactory.createSocket(Default ServerSocketFactory.java:97) at org.apache.tomcat.service.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoi nt.java:239) at org.apache.tomcat.service.PoolTcpConnector.start(PoolTcpConnector.jav    More>>

Occasionally I get this error when I shut down Tomcat and start it again.......


"FATAL: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:397)
at java.net.ServerSocket. (ServerSocket.java:170)
at java.net.ServerSocket. (ServerSocket.java:121)
at org.apache.tomcat.net.DefaultServerSocketFactory.createSocket(Default
ServerSocketFactory.java:97)
at org.apache.tomcat.service.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoi
nt.java:239)
at org.apache.tomcat.service.PoolTcpConnector.start(PoolTcpConnector.jav
a:188)
at org.apache.tomcat.core.ContextManager.start(ContextManager.java:527)
at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:202)
at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)"




fport reveals that the ports 8080 and 8007 are still in use even though the Tomcat java process has been closed.


"2 System -> 8007 TCP


2 System -> 8080 TCP"


The setup is as follows


Tomcat 3.2.2. on WinNT SP 6 running as a standalone servlet container.


Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)


Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode).


Anybody ever see something like this before? - Eamonn

   <<Less

Re: "FATAL:java.net.BindException: Address in use:" - shutting TOmcat down does not release ports 8080 and 8007

Posted By:   Dermot_Hennessy  
Posted On:   Monday, August 13, 2001 06:21 AM

Hi Eamonn,

Often the problem can be that another process is still attempting to maintain a connection with the TomCat Java process. I have not used TomCat personally, but I have seen a couple of things with Apache and with Java processes generally in WinNT which might be of use to you:
  • Check that there are no other JRE processes running when the problem arises. You might find that there are processes keeping the port open because they have not shut down their socket connection or it has not timed out yet.
  • I know that Apache spawns multiple processes to handle incoming requests, so it may not be cleanly going away. Again the solution may be to check to see if there are any other JRE processes hanging around after you have shut the server down.

In both cases the task manager should help you to see what's going on.

Hope this helps,

Dermot

About | Sitemap | Contact