• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

cant shutdown tomcat

 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
JavaMonitor Support
Posts: 251
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Saloon Keeper
Posts: 28489
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When i start tomcat it is fine


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

 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Look on lines 24 and 25.

The bind exception is not for port 80 or 8080


It's 8089
 
The airline is called "Virgin"? Don't you want a plane to go all the way? This tiny ad will go all the way:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic