tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul <>
Subject Re: Address localhost:8080 already in use
Date Mon, 28 Mar 2005 01:54:53 GMT
I ran into this issue a while ago when I wrote a cronjob to check that 
tomcat is outputting something expected and if not, stopping & 
re-starting the service.  However, since my tomcat checking script (the 
cronjob) was running every minute, I did run into some occasions where 
the startup script would be called twice before tomcat was fully up and 
responding to requests.  Probably the same thing you're reporting.

If you only run one instance of tomcat, then you should be ok simply 
doing a "killall java".  However, if you are running multiple instances 
of tomcat, then you only want to kill the suspected instance of tomcat 
and not all of them.  If you're running all instances from the same 
install dir, then look for something unique in "ps -ef" or you can 
adjust your CATALINA_OPTS in so that you can tell which 
instance is which when you run "ps -ef" then only kill those processes.  
If you're running them from different install directories, then just 
grep the output of "ps -ef" see the ones running from that path.  A 
simple shell script can automate that for you.



Fredrik Liden wrote:

>Here is a big problem that I've run into so many times.
>I run start tomcat.
>And then by accident I start it again while it is running.
>After that I can't shut it down again. And if I try to run it it says
>the address is in use. Have someone found any solution to this problem?
>Any suggestions would be appreciated.
>To unsubscribe, e-mail:
>For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message