Hi, I made the script as told by you. Now I can run it. But it ends up with following error: ---------------------------- pwd is /sw/tomcat55 Using CATALINA_BASE: /sw/tomcat55 Using CATALINA_HOME: /sw/tomcat55 Using CATALINA_TMPDIR: /sw/tomcat55/temp Using JRE_HOME: /sw/jdk1.5.0_16 23 Jul, 2008 11:10:37 PM org.apache.catalina.startup.Catalina stopServer SEVERE: Catalina.stop: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:520) at java.net.Socket.connect(Socket.java:470) at java.net.Socket.<init>(Socket.java:367) at java.net.Socket.<init>(Socket.java:180) at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:395) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:344) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:435)
---------------------------------------------------------- Why the Connection refused error is here? Any idea? I am running the service by root user and trying to stop it also as a root user. Thank you. -suman On Mon, Jul 21, 2008 at 11:22 PM, Deepak Mishra <[EMAIL PROTECTED]> wrote: > Any idea wht's going wrong here. Please let me know how to start and stop >> this server like we do for other daemons. e.g >> /etc/init.d/httpd start >> /etc/init.d/httpd stop >> etc. >> >> Any help is appreciated. >> Thank you. >> -suman >> > > if you installed tomcat through the repositories , you should have got a > start-stop script as /etc/init.d/tomcat5.5 > if you have compiled and installed tomcat, you can make the above file like > this :(this is for java1.6 and tomcat6,adjust the parameters). > > export JAVA_HOME=/usr/lib/jvm/java-6-sun > case $1 in > start) > sh /usr/local/apache-tomcat-6.0.14/bin/startup.sh;; > stop) > sh /usr/local/apache-tomcat-6.0.14/bin/shutdown.sh;; > restart) > sh /usr/local/apache-tomcat-6.0.14/bin/shutdown.sh&& sleep 5 && sh > /usr/local/apache-tomcat-6.0.14/bin/startup.sh;; > esac > exit 0 > > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >