This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes why tomcat taking long to realest the shutdown port Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "why tomcat taking long to realest the shutdown port " Watch "why tomcat taking long to realest the shutdown port " New topic
Author

why tomcat taking long to realest the shutdown port

Meir Yan
Ranch Hand

Joined: Apr 27, 2006
Posts: 597
Hello all
im running tomcat 5.5 on HP , when im trying to stop it after im invoking the $CATALINA_HOME/bin/catalina.sh stop
i defined the port 9627 to be the <Server port="9627" shutdown="SHUTDOWN">
im notice when doing
for more 50 sec , so total is 1:30 - 2:00 min to tomcat shotdown .

now if i try to start tomcat right after the stopping it im getting :

but the server is up , i can browse to ROOT .

my question is why is this ? what im doing wrong here ?
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Is your application spawning any non-daemon threads?
If so, Tomcat might we waiting for those threads to finish before shutting down.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Meir Yan
Ranch Hand

Joined: Apr 27, 2006
Posts: 597
can you explain please in simpler words?
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Are you creating new threads in your application?

Simple test.
Try starting and stopping tomcat without your application.
If it shuts right down, without your application running, then the problem is in your application.
Meir Yan
Ranch Hand

Joined: Apr 27, 2006
Posts: 597
hi

ok i did as you suggest and removed the war files of my application

but still im getting this massage when im starting tomcat , what else can i do to intercept thi error ?

Thanks all
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
what else can i do to intercept thi error ?


You can't "intercept" - this problem means that the existing instance is still trying to shutdown and still has the command socket open.

Simply don't try to start an new instance when the old one is still running. On windows I would be watching the Task Manager list of running processes.

Bill
Meir Yan
Ranch Hand

Joined: Apr 27, 2006
Posts: 597
well i need to know what it the reason for that
this application needs to installed and its can't just be like that
using HP by the way
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

I haven't seen this problem in either Windows or Linux.

In fact, for Linux, I have an alias that combines the shutdown and startup in one call.



and.. this never has a problem.
Meir Yan
Ranch Hand

Joined: Apr 27, 2006
Posts: 597
well now that you say that when i use the startup.sh
i dont get this erorr ...
well i guess i will use this
thanks guys
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

How have you ben starting it?
Meir Yan
Ranch Hand

Joined: Apr 27, 2006
Posts: 597
catalina.sh start
 
jQuery in Action, 2nd edition
 
subject: why tomcat taking long to realest the shutdown port
 
Similar Threads
Catalina.stop: java.net.ConnectException: Connection refused: connect
how to set up JMX Remoting?
Another shutting down problem
Error while Shutting down Tomcat 4.1
connection refused on tomcat web server