aspose file tools*
The moose likes Tomcat and the fly likes cant shutdown tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "cant shutdown tomcat" Watch "cant shutdown tomcat" New topic
Author

cant shutdown tomcat

Yewint Ko
Ranch Hand

Joined: Aug 02, 2009
Posts: 90
Hi geeks,
I am running tomcat6 on my Ubuntu9.10 server. everythings fine while starting tomcat, but i
cant shut it down. it seems like hang when i run shutdown.sh, the command doesnt finish. And also i cant access and run war files from remote client.Anyone help me please .... I have reinstalled the tomcat but nothings different. Anyone here have met a problem like this?
Kees Jan Koster
JavaMonitor Support
Rancher

Joined: Mar 31, 2009
Posts: 251
    
    5
Dear Yewint,

Ubuntu? Is this a real tomcat, or that broken Debian package?

Try downloading a normal Tomcat and see if that fixes the problem. If it does, talk to the packager about what he changed to make this not work for you.

Kees Jan


Java-monitor, JVM monitoring made easy <- right here on Java Ranch
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16305
    
  21

I don't know anything about a specific Ubuntu Tomcat packaging, but Tomcat won't shut down as long as any of the threads of any of the applications under Tomcat are still running.

While you should never spawn threads in servlets*, JSPs, or EJBs (or in code called by them), it is sometimes useful to spawn offline processor threads - *which can be safely in in a servlet's init() method - and otherwise use thread-spawning facilities such as Quartz.

If you do spawn threads in a webapp, you must terminate them when a Tomcat shutdown is initiated or Tomcat will hang.

The problem with accessing apps from other machines is probably just the standard firewall problem.


Customer surveys are for companies who didn't pay proper attention to begin with.
Yewint Ko
Ranch Hand

Joined: Aug 02, 2009
Posts: 90
i even shutdown the server machine , but after restarting the server and tomcat, i am not able to access the wep app under webapps dir of tomcat. and i cant still shut it down . Really strange things ....

all are happening on Ubuntu server , everything is fine on ubuntu desktop.
Yewint Ko
Ranch Hand

Joined: Aug 02, 2009
Posts: 90
When i start tomcat it is fine


when shut it down ... it got this error .

Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

You might have a port conflict on your shutdown port.
Look in server.xml to see which port Tomcat is using for this.
Here it is in a copy of Tomcat downloaded from the Apache site:


Once you know which port it's trying to use.
Run netstat to see if something else is using this port.
If so, change the port number in server.xml to something that's not being used.

Then startup tomcat and see if you can shut it down.



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

Joined: Aug 02, 2009
Posts: 90
i found no port conflict. when i run " netstat -anlpt|grep :80" , 8080 is not opening. I use 8080 for connector port and 8089 for shutdown. here is the line from server.xml for defining shutdown port

the following is the logs from $CATALINA_HOME/logs/catalina.out
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Look on lines 24 and 25.

The bind exception is not for port 80 or 8080


It's 8089
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: cant shutdown tomcat