How to solve the problem of Tomcat startup failure in CentOS

angryTom
Release: 2020-03-17 17:11:28
Original
4198 people have browsed it

The Tomcat service deployed on the Linux server usually needs to be restarted when the project is updated, but Tomcat may fail to start due to various reasons. This article will use the Linux distribution centOS 7 system as an example to introduce two types of Tomcat startup failures. troubleshooting ideas.

How to solve the problem of Tomcat startup failure in CentOS

How to solve the problem of Tomcat startup failure in CentOS

Usually there are two reasons for Tomcat startup failure in CentOS:

1. Insufficient disk space

2. Tomcat port is occupied

The specific solution is as follows:

1. Check the overall disk of the server Usage (recommended learning: Linux Video Tutorial)

df -h
Copy after login

If the server does not have other large file storage, the high disk usage may be caused by too many log files, and you can delete some appropriately log file, and then restart Tomcat

Tomcat log file location: In the logs directory under the Tomcat installation directory

Command to check the space occupied by the Tomcat log file (enter the Tomcat directory first)

For example

du -sh /usr/tomcat8/logs
Copy after login

2. The Tomcat port is occupied

Check the port occupancy of Tomcat

ps -ef |grep tomcat
Copy after login

Check the process number such as 1333

ps aux |grep  1333
Copy after login

ls -l /proc/1333This command can find the absolute path of the running program

If Tomcat fails to start because the port is occupied, just close the corresponding program/process

Close the process

kill -9 1333
Copy after login

1333 is the process id (pid)

After the process is killed, restart Tomcat

This article comes from PHP Chinese website,CentOS Use the Tutorial column, please pay attention to this column for more related tutorials!

The above is the detailed content of How to solve the problem of Tomcat startup failure in CentOS. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template