Jetty Web 服务器在 EC2 上非常频繁地自动关闭

Jetty web server is automatically shutting down very frequently on EC2

寻求帮助。 Jetty 8.1.14.v20131031 在 EC2 Ubuntu 12.04 上 运行。开机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
SelectChannelConnector@0.0.0.0:8080

闲着。中间没有登录

3小时后自动停止-

2016-11-28 21:11:27.567:INFO:oejs.Server:Graceful shutdown SelectChannelConnector@0.0.0.0: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

Note: Jetty 8 is EOL (End of Life), consider upgrading.

这个问题不太适合Whosebug,因为它不是编程问题。

这个问题更适合 serverfault's amazon-web-services tag

2016-11-28 21:11:27.567:INFO:oejs.Server:Graceful shutdown 表示有人(或 Jetty 之外的某个进程)明确告诉它关闭。

那不是意外,也不是 Jetty 决定自行关闭,请在 Jetty 之外寻找答案。 (服务配置、cron、aws 配置、其他用户等)

我开始在 jetty 上忽略挂断信号,这个变通方法目前似乎有效。我用这个命令 [nohup java -jar start.jar &] 启动了 jetty。但是关闭信号的根本原因仍然远离我的视线。