Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to start, shutdown and restart tomcat as non-root user. I have tomcat5.x installed on ubuntu machine(usr/share/tomcat). The tomcat directory has full permissions. When I shutdown(/usr/share/tomcat/bin/ or startup(/usr/share/tomcat/ tomcat as normal user, it starts & shuts down normally as if it is executed as root user but I could not access webpage even after starting tomcat as non-root user.

user1@station2:/usr/share/tomcat/webapps$ ../bin/

Using CATALINA_BASE: /usr/share/tomcat

Using CATALINA_HOME: /usr/share/tomcat

Using CATALINA_TMPDIR: /usr/share/tomcat/temp

Using JRE_HOME: /usr

4 Oct, 2010 6:41:11 PM org.apache.catalina.startup.Catalina stopServer

SEVERE: Catalina.stop: Connection refused at Method)









at org.apache.catalina.startup.Catalina.stopServer(

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(

at sun.reflect.DelegatingMethodAccessorImpl.invoke(

at java.lang.reflect.Method.invoke(

at org.apache.catalina.startup.Bootstrap.stopServer(

at org.apache.catalina.startup.Bootstrap.main(
share|improve this question
Do the logs show that the server has started and listening on some port ? – JoseK Oct 4 '10 at 8:54
up vote 1 down vote accepted

Tomcat on ubuntu stores configuration under /etc/tomcat*. Normal users may not have read access to all configuration files (e.g. /etc/tomcat6/tomcat-users.xml). If you'd like to run tomcat as a normal user for testing/development I'd recommend just download tomcat binary distribution and untar/unzip to some directory under your $HOME. Then run bin/ and you're done. This also saves you the hassle of running sudo for each tomcat configuration change.

BTW, if you don't have specific requirements for Tomcat5 I'd recommend using a more recent version (Tomcat6/Tomcat7).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.