Jetty 无法启动 - ContextHandler 已停止

Jetty cannot start - ContextHandler stopped

我试图找出根本原因,而当 运行 在 Jelastic 上时我的应用程序无法运行,而 运行 maven jetty:run 在本地它运行良好。

server.log

WARNING: System properties and/or JVM args set. Consider using --dry-run or --exec 2016-11-07 18:40:50.290:INFO::main: Logging initialized @1907ms 2016-11-07 18:40:50.605:WARN:oejs.HomeBaseWarning:main: This instance of Jetty is not running from a separate {jetty.base} directory, this is not recommended. See documentation at http://www.eclipse.org/jetty/documentation/current/startup.html 2016-11-07 18:40:51.001:WARN:oejx.XmlConfiguration:main: Property 'jetty.host' is deprecated, use 'jetty.http.host' instead 2016-11-07 18:40:51.001:WARN:oejx.XmlConfiguration:main: Property 'jetty.port' is deprecated, use 'jetty.http.port' instead 2016-11-07 18:40:51.489:INFO:oejs.Server:main: jetty-9.3.7.v20160115 2016-11-07 18:40:51.712:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:///opt/repo/versions/9.3.7/webapps/] at interval 1 2016-11-07 18:40:53.903:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@66d2e7d9{/,file:///tmp/jetty-0.0.0.0-8080-root.war-_-any-7083438667455820054.dir/webapp/,AVAILABLE}{/root.war} 2016-11-07 18:40:54.002:INFO:oejs.ServerConnector:main: Started ServerConnector@7f6c72a{HTTP/1.1,[http/1.1]}{0.0.0.0:8080} 2016-11-07 18:40:54.003:INFO:oejs.Server:main: Started @5619ms 2016-11-08 18:53:38.156:INFO:oejs.ServerConnector:Thread-1: Stopped ServerConnector@7f6c72a{HTTP/1.1,[http/1.1]}{0.0.0.0:8080} 2016-11-08 18:53:38.431:INFO:oejsh.ContextHandler:Thread-1: Stopped o.e.j.w.WebAppContext@66d2e7d9{/,null,UNAVAILABLE}{/root.war} WARNING: System properties and/or JVM args set. Consider using --dry-run or --exec 2016-11-08 18:53:43.393:INFO::main: Logging initialized @1992ms 2016-11-08 18:53:43.599:WARN:oejs.HomeBaseWarning:main: This instance of Jetty is not running from a separate {jetty.base} directory, this is not recommended. See documentation at http://www.eclipse.org/jetty/documentation/current/startup.html 2016-11-08 18:53:43.983:WARN:oejx.XmlConfiguration:main: Property 'jetty.host' is deprecated, use 'jetty.http.host' instead 2016-11-08 18:53:43.984:WARN:oejx.XmlConfiguration:main: Property 'jetty.port' is deprecated, use 'jetty.http.port' instead 2016-11-08 18:53:44.400:INFO:oejs.Server:main: jetty-9.3.7.v20160115 2016-11-08 18:53:44.691:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:///opt/repo/versions/9.3.7/webapps/] at interval 1 WARNING: System properties and/or JVM args set. Consider using --dry-run or --exec 2016-11-08 19:55:19.497:INFO::main: Logging initialized @2182ms 2016-11-08 19:55:19.700:WARN:oejs.HomeBaseWarning:main: This instance of Jetty is not running from a separate {jetty.base} directory, this is not recommended. See documentation at http://www.eclipse.org/jetty/documentation/current/startup.html 2016-11-08 19:55:20.086:WARN:oejx.XmlConfiguration:main: Property 'jetty.host' is deprecated, use 'jetty.http.host' instead 2016-11-08 19:55:20.086:WARN:oejx.XmlConfiguration:main: Property 'jetty.port' is deprecated, use 'jetty.http.port' instead 2016-11-08 19:55:20.504:INFO:oejs.Server:main: jetty-9.3.7.v20160115 2016-11-08 19:55:20.706:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:///opt/repo/versions/9.3.7/webapps/] at interval 1

Jetty 服务器上的这个应用无法启动的主要原因是什么? 有什么提示吗?

一些建议(来自输出):

WARN:oejs.HomeBaseWarning:main: This instance of Jetty is not running from a separate {jetty.base} directory, this is not recommended. See documentation at http://www.eclipse.org/jetty/documentation/current/startup.html

按照这些说明,设置正确的 ${jetty.base} 目录,不要更改、添加、删除、重命名或一般更改 ${jetty.home} 目录(也称为 jetty-distribution 目录)中的任何内容。/opt/repo/versions/9.3.7/ 在你的系统上)

首先,将 jetty-distribution 的新副本解压缩(或解压缩)到磁盘上的某个位置。然后按照有关创建 ${jetty.base} 目录的说明进行操作(这是 Jetty 的特定实例的配置,包括 webapps)