Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have setup Apache Tomcat on my CentOS machine and it seems to work as a charm initially and a service tomcat start leaves me with output as such
Using CATALINA_BASE: /usr/share/apache-tomcat
Using CATALINA_HOME: /usr/share/apache-tomcat
Using CATALINA_TMPDIR: /usr/share/apache-tomcat/temp
Using JRE_HOME: /usr
Using CLASSPATH: /usr/share/apache-tomcat/bin/bootstrap.jar:/usr/share/apache-tomcat/bin/tomcat-juli.jar
Further, I deployed the apache roller webapp and it works well and as soon as I deploy another instance of Apache roller the container crashes I wonder why ?
A restart now leaves me with this :
Using CATALINA_BASE: /usr/share/apache-tomcat
Using CATALINA_HOME: /usr/share/apache-tomcat
Using CATALINA_TMPDIR: /usr/share/apache-tomcat/temp
Using JRE_HOME: /usr
Using CLASSPATH: /usr/share/apache-tomcat/bin/bootstrap.jar:/usr/share/apache-tomcat/bin/tomcat-juli.jar
Oct 09, 2012 6:40:05 AM org.apache.catalina.startup.Catalina stopServer
SEVERE: Catalina.stop:
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:337)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:198)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at java.net.Socket.<init>(Socket.java:425)
at java.net.Socket.<init>(Socket.java:208)
at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:490)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:371)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:453)
Using CATALINA_BASE: /usr/share/apache-tomcat
Using CATALINA_HOME: /usr/share/apache-tomcat
Using CATALINA_TMPDIR: /usr/share/apache-tomcat/temp
Using JRE_HOME: /usr
Using CLASSPATH: /usr/share/apache-tomcat/bin/bootstrap.jar:/usr/share/apache-tomcat/bin/tomcat-juli.jar
I am unable to deploy more than one webapp
Here is my /etc/init.d/tomcat script
#!/bin/bash
# description: Tomcat Start Stop Restart
# processname: tomcat
# chkconfig: 234 20 80
JAVA_HOME=/usr/java/jdk1.7.0_01
export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
export PATH
CATALINA_HOME=/usr/share/apache-tomcat
RETVAL=0
status() {
SHUTDOWN_PORT=$(netstat -vtnl|grep 8005|wc -l)
if [ $SHUTDOWN_PORT -eq 0 ]; then
echo "tomcat is not running..."
RETVAL=1
exit $RETVAL
else
echo "tomcat is running..."
RETVAL=0
exit $RETVAL
fi
}
case $1 in
start)
su - admin -c $CATALINA_HOME/bin/startup.sh
;;
stop)
su - admin -c $CATALINA_HOME/bin/shutdown.sh
;;
restart)
su - admin -c $CATALINA_HOME/bin/shutdown.sh
su - admin -c $CATALINA_HOME/bin/startup.sh
;;
status)
status
;;
*)
echo $"Usage: tomcat {start|stop|restart|status}"
exit 1
esac
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.