Tomcat
SHUTDOWN & START (KILL PROCESS)
- Move Path - Apache Tomcat Home
cd app/apache-tomcat/bin
Shut Down
./shutdown.sh
2. Find Java/Tomcat Process
ps -ef|grep java
Verify whether all java processes are killed using the above pf –ef |grep java command
login_user 2130 1 0 Apr20 ? 01:15:14/var/jdk1.8.0_25//bin/java -Djava.util.logging.config.file=/home/neevlabs/app/apache-tomcat-8.0.17/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djavax.servlet.request.encoding=UTF-8 -Dfile.encoding=UTF-8 -server -Xms512m -Xmx512m -Xss256K -Djava.endorsed.dirs=/home/neevlabs/app/apache-tomcat-8.0.17/endorsed -classpath /home/neevlabs/app/apache-tomcat-8.0.17/bin/bootstrap.jar:/home/neevlabs/app/apache-tomcat-8.0.17/bin/tomcat-juli.jar -Dcatalina.base=/home/neevlabs/app/apache-tomcat-8.0.17 -Dcatalina.home=/home/neevlabs/app/apache-tomcat-8.0.17 -Djava.io.tmpdir=/home/neevlabs/app/apache-tomcat-8.0.17/temp org.apache.catalina.startup.Bootstrap start
If there is any process still running please kill it using the kill -9 command
Here the process id is 2130
3. Kill Process
kill -9 2130 (Kill all java processes explicitly)
4. Kill All Tomcat Process
pkill -9 -f tomcat
5. Check Again Process and Start Tomcat
ps -ef|grep java (Check again whether all processes are killed)
Start Server
./startup.sh
PERMISSIONS FOR EXECUTING & LOG WRITING
- Assign Permissions
Note : dev is directory for tomcat, files is for upload files and tomcat is user for apache tomcat
chown -R tomcat dev
root@Dev-PeerSquare:/home# chmod -R 777 dev
root@Dev-PeerSquare:/home# chown tomcat:tomcat /home/files
root@Dev-PeerSquare:/home# chmod u+wrx /home/dev
root@Dev-PeerSquare:/home# chmod u+wrx /home/files/
root@Dev-PeerSquare:/home# chmod u+wrx /home/files
root@Dev-PeerSquare:/home# chmod u+wrx /home/dev/
2. Check Status Of Tomcat
cd ../logs
open catalina.out file and ensure that all context paths are loaded and Tomcat is running properly.