Jetty Web 服务器在 EC2 上自动关闭

Jetty Web 服务器在 EC2 上自动关闭

我在 EC2 Ubuntu 12.04 上运行 Jetty 8.1.14.v20131031。它在启动后大约 3 小时自动关闭。为了确认这不是我的代码的问题,我从服务器中删除了 war 文件,并使用默认的 [spdy.war 和 test.war] 启动,但结果相同。它在 3 小时后关闭。Jetty 没有在日志中记录任何错误。需要说明的是,这个问题始于一个月前,在此之前它运行良好。

日志 -

Web 服务器已启动-

2016-11-28 18:00:30.694:INFO:oejs.Server:jetty-8.1.14.v20131031 2016-11-28     18:00:30.712:INFO:oejdp.ScanningAppProvider:Deployment monitor   /opt/jetty/webapps at interval 1 2016-11-28
18:00:30.718:INFO:oejd.DeploymentManager:Deployable added:  /opt/jetty/webapps/test.war 2016-11-28 18:00:30.748:INFO:oejw.WebInfConfiguration:Extract jar:file:/opt/jetty/webapps/test.war!/ to
/mnt/tmp/tmp/jetty-0.0.0.0-8080-test.war-_test-any-/webapp 2016-11-28 18:00:31.594:INFO:oejs.TransparentProxy:TransparentProxy @ /test/javadoc-proxy to http://download.eclipse.org/jetty/stable-
8/apidocs 2016-11-28 18:00:31.594:INFO:oejd.DeploymentManager:Deployable added: /opt/jetty/webapps/spdy.war 2016-11-28 18:00:31.596:INFO:oejw.WebInfConfiguration:Extract
jar:file:/opt/jetty/webapps/spdy.war!/ to /mnt/tmp/tmp/jetty-0.0.0.0-8080-spdy.war-_spdy-any-/webapp 2016-11-28 18:00:31.677:INFO:oejdp.ScanningAppProvider:Deployment monitor /opt/jetty/contexts at
interval 1 2016-11-28 18:00:31.678:INFO:oejd.DeploymentManager:Deployable added: /opt/jetty/contexts/javadoc.xml 2016-11-28 18:00:31.709:INFO:oejs.AbstractConnector:Started
[email protected]:8080

只是闲置。中间无需登录

3小时后自动停止-

2016-11-28 21:11:27.567:INFO:oejs.Server:Graceful shutdown [email protected]:8080 2016-11-28 21:11:27.567:INFO:oejs.Server:Graceful shutdown o.e.j.w.WebAppContext
{/test,file:/mnt/tmp/tmp/jetty-0.0.0.0-8080-test.war-_test-any-/webapp/},/opt/jetty/webapps/test.war 2016-11-28 21:11:27.568:INFO:oejs.Server:Graceful shutdown o.e.j.w.WebAppContext
{/spdy,file:/mnt/tmp/tmp/jetty-0.0.0.0-8080-spdy.war-_spdy-any-/webapp/},/opt/jetty/webapps/spdy.war 2016-11-28 21:11:27.568:INFO:oejs.Server:Graceful shutdown o.e.j.s.h.ContextHandler
{/javadoc,file:/opt/jetty/javadoc/} 2016-11-28 21:11:28.589:INFO:oejsh.ContextHandler:stopped o.e.j.s.h.ContextHandler{/javadoc,file:/opt/jetty/javadoc/} 2016-11-28
21:11:28.601:INFO:oejsl.ELContextCleaner:javax.el.BeanELResolver purged 2016-11-28 21:11:28.601:INFO:oejsh.ContextHandler:stopped o.e.j.w.WebAppContext{/spdy,file:/mnt/tmp/tmp/jetty-0.0.0.0-8080-
spdy.war-_spdy-any-/webapp/},/opt/jetty/webapps/spdy.war 2016-11-28 21:11:28.664:INFO:oejsl.ELContextCleaner:javax.el.BeanELResolver purged 2016-11-28 21:11:28.665:INFO:oejsh.ContextHandler:stopped
o.e.j.w.WebAppContext{/test,file:/mnt/tmp/tmp/jetty-0.0.0.0-8080-test.war-_test-any-/webapp/},/opt/jetty/webapps/test.war

答案1

我忽略挂断信号启动了 Jetty,目前看来这个解决方法有效。我使用这个命令 [nohup java -jar start.jar &] 启动了 Jetty。但关闭信号的根本原因仍然不在我的视线范围内。

相关内容