aspose file tools*
The moose likes Tomcat and the fly likes Tomcat doesn't stop Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat doesn Watch "Tomcat doesn New topic
Author

Tomcat doesn't stop

John Eipe
Ranch Hand

Joined: May 23, 2008
Posts: 215
I start tomcat as below


I tried to stop as below but the localhost page is till up. And shutdown is unsuccessful.


Thanks.


www.cs-repository.info
John Eipe
Ranch Hand

Joined: May 23, 2008
Posts: 215
Please make it stop!!
Varun Chopra
Ranch Hand

Joined: Jul 10, 2008
Posts: 211
Check this:

http://ubuntuforums.org/showthread.php?t=1018063


-Varun -
(My Blog) - Online Certifications - Webner Solutions
John Eipe
Ranch Hand

Joined: May 23, 2008
Posts: 215


will make it stop. But I was concerned with the error that was thrown above.
Varun Chopra
Ranch Hand

Joined: Jul 10, 2008
Posts: 211
John Eipe wrote:

will make it stop. But I was concerned with the error that was thrown above.


I think it is permission problem.
Try this:

John Eipe
Ranch Hand

Joined: May 23, 2008
Posts: 215
same problem still :-(

I think the problem is with the location of server.xml file

java.io.FileNotFoundException: /usr/share/tomcat6/conf/server.xml

on my system it's in location

/usr/share/tomcat6/skel/conf/server.xml

Let me see how i could change that.
John Eipe
Ranch Hand

Joined: May 23, 2008
Posts: 215
Googling is not helping. Ideas anyone?
Varun Chopra
Ranch Hand

Joined: Jul 10, 2008
Posts: 211
John Eipe wrote:same problem still :-(

I think the problem is with the location of server.xml file

java.io.FileNotFoundException: /usr/share/tomcat6/conf/server.xml

on my system it's in location

/usr/share/tomcat6/skel/conf/server.xml

Let me see how i could change that.


It seems to me that startup and shutdown scripts are provided for private instances of tomcat, not to start/stop default instance, but I may be wrong. I am saying that because on some forums people have suggested to create new instance of tomcat with tomcat6-instance-create script before using those commands. There is not much information on this.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16250
    
  21

The standard Tomcat distribution is suitable for being run either as a private user process or as a system process. Normally, when you want to run as a private user, you keep a copy of the whole Tomcat server in one of your own private directories.

/usr/local is a place to put system-wide resources. Files and directories under it are normally owned by system users. Frequently, that user is "root", but some installs might have created a user named "tomcat" or something like that. The important thing, however, is that private users are not generally granted write access to resources under /usr/local.

In fact, in a "proper" world, /usr/local files are all read-only, but that's a convention that's often ignored. The RPM-based Tomcat installers get around that by replacing the writable parts of Tomcat with links to alternative locations such as /usr/local/tomcat/work -> /tmp/tomcat. Debian-style installers tend to be less elaborate, so you may or may not see that in Ubuntu, and, of course, if Tomcat was simply unzipped into /usr/local, the only way that will happen is if you do it yourself.

But regardless, if you run tomcat using sudo TOMCAT_HOME/catalina.sh or one of its friends (such as startup.sh), that is going to cause certain files to be created owned by the root user. Once you do that, you'll have problems starting/stopping Tomcat as a non-root user, whether it's as a non-sudo user command-line start/stop or via the system "service" command if the initscript is set up to run Tomcat as user "tomcat".

The fix is to sudo remove the root-owned writable files: "rm -rf TOMCAT_HOME/work/* TOMCAT_HOME/log/* TOMCAT_HOME/temp". You may need to change access rights on files in conf/Catalina/localhost as well.

Once you've done that, be consistent in how you start/stop tomcat.


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

Joined: May 23, 2008
Posts: 215
Thanks Tim.
 
 
subject: Tomcat doesn't stop