1. 程式人生 > >Linux下tomcat啟動不了的解決方法

Linux下tomcat啟動不了的解決方法

 linux下啟動tomcat的時候,如果服務啟動不成功,可以到檢視logs資料夾下的catalina.out  日誌檔案,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 useFeb 27, 2011 3:25:39 PM org.apache.catalina.loader.WebappClassLoader loadClassINFO: 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了!


http://www.thinksaas.cn/topics/0/326/326027.html
http://blog.sina.com.cn/s/blog_7f9e5387010129vb.html