• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat6 on Ubuntu

 
Pavan bhagavatula
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Need help from Tomcat and Ubuntu user group..

I have the following script to start / stop / restart my tomcat server on ubuntu OS. Start is working fine but when i try to stop i am getting syntax syntax error below..

export JAVA_HOME=/usr/lib/jvm/jdk1.7.0

case $1 in
start)
sh /usr/local/tomcat/bin/startup.sh
;;
stop)
sh /usr/local/tomcat/bin/shutdown.sh
;;
restart)
sh /usr/local/tomcat/bin/shutdown.sh
sh /usr/local/tomcat/bin/startup.sh
;;
esac
exit 0

Here is the error..
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /usr/lib/jvm/jdk1.7.0
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar
/usr/lib/jvm/jdk1.7.0/bin/java: 1: Syntax error: "(" unexpected
pavan@pavan-Vostro-220-Series:/etc/init.d$ ^C


 
Tim Holloway
Saloon Keeper
Pie
Posts: 17989
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Best I can figure out is that maybe your shutdown.sh script has been damaged.

Try this shutdown command instead and see what happens:

sh /usr/local/tomcat/bin/catalina.sh stop
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic