When starting tomcat under Linux, if the service fails to start, you can check the catalina.out log file in the logs folder. Cat my log file to get the following error message:
cat catalina.out Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 8101; nested exception is:
Recommended related video tutorials: linux video tutorial
Literally, my 8101 port was blocked occupied, so use the command:
netstat -anp
to check the status of each port occupied by the process. The output of this command includes the pid of the process. After getting the pid, use the command:
ps -ef|grep PID
to view Details of the process.
If you confirm that this process can be stopped, use the command:
kill pid
and then restart tomcat!
Recommended related articles and tutorials: linux tutorial
The above is the detailed content of tomcat cannot start under linux. For more information, please follow other related articles on the PHP Chinese website!