Java / Spring应用程序:Tomcat突然无法再部署了

时间:2018-03-26 18:03:32

标签: java spring tomcat tomcat7

在注意到我的Web应用程序不再在生产服务器上运行后,我查看了tomcat日志( catalina.out ):

Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Listening for transport dt_socket at address: 8000
Mar 26, 2018 7:53:26 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Mar 26, 2018 7:53:26 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 4624 ms
Mar 26, 2018 7:53:26 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Mar 26, 2018 7:53:26 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.52 (Ubuntu)
Mar 26, 2018 7:53:26 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /var/lib/tomcat7/webapps/ROOT
Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Listening for transport dt_socket at address: 8000
Mar 26, 2018 7:54:26 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Mar 26, 2018 7:54:26 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2108 ms
Mar 26, 2018 7:54:26 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Mar 26, 2018 7:54:26 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.52 (Ubuntu)
Mar 26, 2018 7:54:27 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /var/lib/tomcat7/webapps/ROOT
Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Listening for transport dt_socket at address: 8000
Mar 26, 2018 7:55:31 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Mar 26, 2018 7:55:32 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2428 ms
Mar 26, 2018 7:55:32 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Mar 26, 2018 7:55:32 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.52 (Ubuntu)
Mar 26, 2018 7:55:32 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /var/lib/tomcat7/webapps/ROOT
Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Listening for transport dt_socket at address: 8000
Mar 26, 2018 7:56:36 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Mar 26, 2018 7:56:36 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1873 ms
Mar 26, 2018 7:56:36 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Mar 26, 2018 7:56:36 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.52 (Ubuntu)
Mar 26, 2018 7:56:36 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /var/lib/tomcat7/webapps/ROOT
Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Listening for transport dt_socket at address: 8000
Mar 26, 2018 7:57:42 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Mar 26, 2018 7:57:42 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2534 ms
Mar 26, 2018 7:57:42 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Mar 26, 2018 7:57:42 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.52 (Ubuntu)
Mar 26, 2018 7:57:42 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /var/lib/tomcat7/webapps/ROOT

部署“循环”以以下消息开头:

Mar 26, 2018 5:00:45 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-8080"]
Mar 26, 2018 5:00:46 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina

我尝试多次重启Tomcat和整个服务器但没有成功。 你能想象这里出了什么问题吗?

2 个答案:

答案 0 :(得分:0)

已报告类似案例,解释为Memory Leak

关于此提示忽略 PermGen 的警告,为什么不使用正确的选项?这可能解释了导致问题的内存不足。

Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0

如果使用正确的选项(XX:MaxMetaspaceSize)后仍然存在此问题,请尝试为其提供更多内存。尝试了解更改了什么,然后您的应用程序无法再运行(数据库中的数据已更改?如何?)。如果您仍然要说服自己,请删除该应用程序并启动Tomcat而不使用任何Web应用程序。

答案 1 :(得分:0)

...奇怪 你能用其他服务器运行你的应用吗?如玻璃鱼或码头? 我知道它没有回答你的问题,但是如果应用程序与上面提到的服务器一起工作,那么你的tomcat会遇到一些问题,但如果不能正常工作,那么你的代码就会遇到一些问题。