Tomcat意外地关闭,没有任何痕迹

时间:2017-05-10 12:19:53

标签: java apache tomcat

首先,我必须说我已经审核了所有相关的帖子,但无法找到有效的解决方案。

我在Centos 7上运行Tomcat 8.5.6。

我有一个在Tomcat(8080,8009,8443)上运行的API,它运行了很长时间没有打嗝。上周我不得不创建一个新的API并开始出现问题:Tomcat意外关闭,不留任何痕迹。我尝试使用端口8007(转发到端口8443)用于新api。两个apis都工作但是Tomcat一直在关闭。我尝试使用8081,但无法在其上创建连接。

最后我决定在端口8081上安装一个新的Tomcat实例,但是无法在新的Tomcat(端口8081,8007和8444)上使用新的api。

我已经为运行第一个api的Tomcat禁用了关闭端口(-1)并停止了第二个Tomcat(所以我现在只运行了一个Tomcat)并且已经回滚了我所做的每一个更改但是Tomcat一直在关闭下。

从Catalina.out日志中我无法说清楚(它没有关于关闭的任何内容)。它刚刚结束了启动和随后的重启(每当我意识到它已经关闭时我必须订购):

Configuring Spring Security Core ...
... finished configuring Spring Security Core


Configuring Spring Security REST 2.0.0.M2...
... finished configuring Spring Security REST


Configuring Spring Security UI ...
... finished configuring Spring Security UI

09-May-2017 22:44:01.315 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive /opt/tomcat/tomcat-8.5.6/webapps/myapi-api.war has finished in 40,056 ms

09-May-2017 22:44:01.316 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/tomcat/tomcat-8.5.6/webapps/manager

09-May-2017 22:44:01.363 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/tomcat/tomcat-8.5.6/webapps/manager has finished in 47 ms

09-May-2017 22:44:01.363 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/tomcat/tomcat-8.5.6/webapps/ROOT_

09-May-2017 22:44:01.385 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/tomcat/tomcat-8.5.6/webapps/ROOT_ has finished in 22 ms

09-May-2017 22:44:01.385 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/tomcat/tomcat-8.5.6/webapps/ROOT

09-May-2017 22:44:01.395 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/tomcat/tomcat-8.5.6/webapps/ROOT has finished in 10 ms

09-May-2017 22:44:01.403 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [http-nio-8080]

09-May-2017 22:44:01.409 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [ajp-nio-8009]

09-May-2017 22:44:01.410 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 40230 ms



10-May-2017 08:22:08.631 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        My App Server

10-May-2017 08:22:08.662 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Nov 1 2016 00:00:00 UTC

10-May-2017 08:22:08.662 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         1.0.0.0

10-May-2017 08:22:08.663 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux

10-May-2017 08:22:08.663 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            3.10.0-514.10.2.el7.x86_64

10-May-2017 08:22:08.663 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64

10-May-2017 08:22:08.663 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /usr/java/jdk1.8.0_112/jre

10-May-2017 08:22:08.664 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_112-b15

10-May-2017 08:22:08.664 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation

10-May-2017 08:22:08.664 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /opt/tomcat/tomcat-8.5.6

10-May-2017 08:22:08.664 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /opt/tomcat/tomcat-8.5.6

10-May-2017 08:22:08.665 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/opt/tomcat/tomcat-8.5.6/conf/logging.properties

10-May-2017 08:22:08.665 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager

10-May-2017 08:22:08.665 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048

10-May-2017 08:22:08.665 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources

10-May-2017 08:22:08.665 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/opt/tomcat/tomcat-8.5.6

10-May-2017 08:22:08.666 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/opt/tomcat/tomcat-8.5.6

10-May-2017 08:22:08.666 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/opt/tomcat/tomcat-8.5.6/temp

10-May-2017 08:22:08.666 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib

10-May-2017 08:22:08.991 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]

10-May-2017 08:22:09.022 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read

10-May-2017 08:22:09.024 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]

10-May-2017 08:22:09.026 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
10-May-2017 08:22:09.026 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1112 ms

10-May-2017 08:22:09.061 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina

10-May-2017 08:22:09.062 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: My App Server

10-May-2017 08:22:09.096 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive /opt/tomcat/tomcat-8.5.6/webapps/myapi-api.war

我是Tomcat和Centos的新手,但是我一直在努力解决这个问题很多天没有运气,我对于为什么在部署新api时遇到问题一无所知。

我不确定此信息是否足以进行分析,但我将不胜感激。

感谢。

1 个答案:

答案 0 :(得分:0)

感谢大家的意见。我不知道为什么但是有几个Tomcat进程打开了。我重新启动了服务器,启动了Tomcat,现在只需要一个Tomcat进程就可以正常工作了。

再次感谢!