Linux Tomcat started.实际上没有启动成功

Linux Tomcat started.实际上没有启动成功

经验文章nimo972025-01-11 14:42:1612A+A-


大家好,我是「Bigder」~

1、Linux下启动Tomcat

「sh /root/apache-tomcat-8.5.78/bin/startup.sh」

2、尝试定位

查看启动日志:

「tail -f /root/apache-tomcat-8.5.78/logs/catalina.out」

出现提示:

/root/apache-tomcat-8.5.78/bin/catalina.sh: line 504: /root/jdk-18/jre/bin/java: No such file or directory


3、检查/root/jdk-18目录的确没有jre目录存在

4、解决方法

「vi /etc/profile」找到JRE_HOME=${JAVA_HOME}/jre去掉「/jre」生效配置「source profile」



5、再次启动


查看启动日志:

「tail -f /root/apache-tomcat-8.5.78/logs/catalina.out」


6、查看Tomcat占用的9090端口(默认是:8080端口,我改成了9090)

「netstat -an|grep 9090」


7、查看Tomcat的进程

「ps -ef|grep tomcat」


It's ok


Bigder

点击这里复制本文地址 以上内容由nimo97整理呈现,请务必在转载分享时注明本文地址!如对内容有疑问,请联系我们,谢谢!
qrcode

尼墨宝库 © All Rights Reserved.  蜀ICP备2024111239号-7