• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

cant shutdown tomcat

 
Yewint Ko
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 251
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18098
50
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Yewint Ko
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When i start tomcat it is fine


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

 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.


 
Yewint Ko
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look on lines 24 and 25.

The bind exception is not for port 80 or 8080


It's 8089
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic