linux启动tomcat失败
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux启动tomcat失败相关的知识,希望对你有一定的参考价值。
Using CATALINA_BASE: /root/webhr/apache-tomcat-6.0.36
Using CATALINA_HOME: /root/webhr/apache-tomcat-6.0.36
Using CATALINA_TMPDIR: /root/webhr/apache-tomcat-6.0.36/temp
Using JRE_HOME: /usr/java/jre1.8.0_60
Using CLASSPATH: /root/webhr/apache-tomcat-6.0.36/bin/bootstrap.jar
Usage: catalina.sh ( commands ... )
commands:
debug Start Catalina in a debugger
debug -security Debug Catalina with a security manager
jpda start Start Catalina under JPDA debugger
run Start Catalina in the current window
run -security Start in the current window with security manager
start Start Catalina in a separate window
start -security Start in a separate window with security manager
stop Stop Catalina, waiting up to 5 seconds for the process to end
stop n Stop Catalina, waiting up to n seconds for the process to end
stop -force Stop Catalina, wait up to 5 seconds and then use kill -KILL if still running
stop n -force Stop Catalina, wait up to n seconds and then use kill -KILL if still running
version What version of tomcat are you running?
Note: Waiting for the process to end and use of the -force option require that $CATALINA_PID is defined
日志文件,cat我的日志文件可得到如下的错误信息:
cat catalina.out
Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 8101; nested exception is:
java.net.BindException: Address already in use
Feb 27, 2011 3:25:39 PM org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already. Could not load com.funambol.server.tools.directorymonitor.FileChangeEvent. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
从字面上来看,是我的8101端口被占用了,应该是rmi需要用到这个端口,于是使用
netstat -anp
命令来查看各端口被进程占用的情况,这个命令输出包括进程的pid,得到这个pid之后,使用命令:
ps -ef|grep PID
即可查看进程的详细情况。
如果确认此进程可停止的话,
kill pid
重启tomcat就OK了! 参考技术A 1、确定Java是否安装
2、配置Java+Tomcat的环境变量
3、给tomcat中bin目录下运行.sh脚本的权限(chmod 777 /*.sh)
完成以上三个步骤,就没啥问题了吧! 参考技术B 看看启动时报什么错了,环境变量都设了吗?
检查一下logs文件夹下catalina.out,看看有没有错误信息输出。 参考技术C http://jingyan.baidu.com/article/f79b7cb3a25d759144023ee6.html,你可参考这个,希望能帮到你
以上是关于linux启动tomcat失败的主要内容,如果未能解决你的问题,请参考以下文章
Linux下,Tomcat启动成功,发现ip:8080访问失败
Linux下tomcat的启动,关闭,以及shutdown失败杀死进程的方法
当几乎相同的应用程序在同一个 Tomcat 实例中启动时,为啥 Tomcat webapp 会失败?