Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Cannot shut down Apache Tomcat 6.0(The shut down process hangs after )
Cannot shut down Apache Tomcat 6.0 [message #683702] Tue, 14 June 2011 09:21 Go to next message
Matei Missing name is currently offline Matei Missing nameFriend
Messages: 14
Registered: September 2010
Junior Member
I am using Eclipse Helios SR1 and Apache Tomcat 6.0.32.

Tomcat starts just fine, but when I try to stop it / shut it down it creates a new console which terminates its execution quickly in which it doesn't display anything.

Meanwhile Tomcat's console displays the shutdown procedure messages and when it is all done it just hangs, the process isn't killed.

The last lines are usually:

Jun 1, 2011 12:54:56 PM org.apache.coyote.http11.Http11AprProtocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
Jun 1, 2011 12:54:56 PM org.apache.coyote.ajp.AjpAprProtocol destroy
INFO: Stopping Coyote AJP/1.3 on ajp-8009

After these Tomcat should have shut down, but it just hangs.

Can anybody please give a solution, or at least a suggestion? And why is the second console created ?

Thank you!
Re: Cannot shut down Apache Tomcat 6.0 [message #683920 is a reply to message #683702] Tue, 14 June 2011 16:29 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
On 6/14/2011 5:21 AM, Matei wrote:
> I am using Eclipse Helios SR1 and Apache Tomcat 6.0.32.
>
> Tomcat starts just fine, but when I try to stop it / shut it down it
> creates a new console which terminates its execution quickly in which it
> doesn't display anything.
>
> Meanwhile Tomcat's console displays the shutdown procedure messages and
> when it is all done it just hangs, the process isn't killed.
>
> The last lines are usually:
>
> Jun 1, 2011 12:54:56 PM org.apache.coyote.http11.Http11AprProtocol destroy
> INFO: Stopping Coyote HTTP/1.1 on http-8080
> Jun 1, 2011 12:54:56 PM org.apache.coyote.ajp.AjpAprProtocol destroy
> INFO: Stopping Coyote AJP/1.3 on ajp-8009
>
> After these Tomcat should have shut down, but it just hangs.
>
> Can anybody please give a solution, or at least a suggestion? And why is
> the second console created ?
>
> Thank you!

The second console is to send a "shutdown" request to the shutdown port
of the Tomcat server. This allows Tomcat to perform an controlled
shutdown. However, it is a known behavior of Tomcat that it will wait
*forever* for all webapps to "clean up" before exiting.

Usually this situation occurs when a webapp starts a non-daemon thread
which it fails to terminate when shutdown. It can also occur if the
webapp uses RMI and fails to free all the remote objects at shutdown.
Typically you can see threads are the problem by running in debug mode
and checking the Debug window after shutdown to see what threads are
still running. You may need to pull down the Debug window's "View Menu"
(the one next to Minimize and Maximize icons) and select Java -> Show
System Threads to see the threads that are the cause of the problem.

Normally, after the specified shutdown period, a dialog should appear
asking if you want to terminate the Tomcat server. I don't know why
this would not appear for you.

Cheers,
Larry
Re: Cannot shut down Apache Tomcat 6.0 [message #684183 is a reply to message #683702] Wed, 15 June 2011 07:39 Go to previous messageGo to next message
Matei Missing name is currently offline Matei Missing nameFriend
Messages: 14
Registered: September 2010
Junior Member
Thank you for your comprehensive reply!

That is true, the web application still has threads that cannot be stopped, and Tomcat warns me about possible memory leaks. The force shutdown dialog still appears but after some time, because I set the shutdown timeout to a long period of time.
Re: Cannot shut down Apache Tomcat 6.0 [message #684187 is a reply to message #683702] Wed, 15 June 2011 07:47 Go to previous messageGo to next message
Matei Missing name is currently offline Matei Missing nameFriend
Messages: 14
Registered: September 2010
Junior Member
btw, the shutdown signal is sent to the Tomcat admin port ? (default: 8005?)
Thanks!
Re: Cannot shut down Apache Tomcat 6.0 [message #684363 is a reply to message #684187] Wed, 15 June 2011 13:22 Go to previous message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
On 6/15/2011 3:47 AM, Matei wrote:
> btw, the shutdown signal is sent to the Tomcat admin port ? (default:
> 8005?)
> Thanks!

Correct. Specifically, it's the port specified in the <Server> element
in server.xml.

Cheers,
Larry
Previous Topic:Using jflex to generate the xml grammars
Next Topic:Formatting XML StructuredDocuments
Goto Forum:
  


Current Time: Fri Apr 19 15:00:40 GMT 2024

Powered by FUDForum. Page generated in 0.02291 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top