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

时间:2016-12-08 23:09:17

标签: ubuntu amazon-ec2 jetty ubuntu-12.04 jetty-8

寻求帮助。 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

2 个答案:

答案 0 :(得分:0)

  

注意:Jetty 8 is EOL (End of Life),请考虑升级。

这个问题并不适合Stackoverflow,因为它不是编程问题。

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

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

那不是意外,也不是Jetty决定自己关闭,看看Jetty外面找到你的答案。 (服务配置,cron,aws配置,其他用户等)

答案 1 :(得分:0)

我开始码头忽略了挂断信号,这项工作现在似乎正在起作用。我用这个命令启动了jetty [nohup java -jar start.jar&]。但关闭信号的根本原因仍然远离我的视线。