Nabe
Nabe

Reputation: 95

To check status of Tomcat server in Linux

I need to know whether Tomcat 7.0.2.3 is on or not.

I got an error page that shows this message:

HTTP Status 404 - /cas/login

type Status report

 message /cas/login

description The requested resource (/cas/login) is not available.
 Apache Tomcat/7.0.23

I need to check the status and start the service of Tomcat in Linux. I have tried:

#/bin/startup.sh
#rctomcat7 start

But all these are not working.

Upvotes: 4

Views: 48860

Answers (2)

souser
souser

Reputation: 6120

Like others have pointed out, if you are receiving an HTTP standard response code of 404 then it means that Tomcat is up.

But to answer your question, you can try

 #rctomcat7 status

Upvotes: 1

chetan parmar
chetan parmar

Reputation: 21

I have used below script. This script check tomcat post and process is running up or not,if not then start the tomcat.

Tomcat Start script
if netstat -tulpen | grep 18880 && ps -ef | grep tomcat | grep java

then

    echo "Tomcat Running"

else

    echo "Tomcat Stopped"

    /bin/sh /tomcat/bin/startup.sh

fi

Upvotes: 0

Related Questions