为什么不将Maven .war项目部署到AWS?

时间:2016-12-07 18:57:09

标签: java spring maven amazon-web-services tomcat

将.war项目部署到AWS(运行Tomcat 8 Java 8的64位Amazon Linux 2016.03 v2.2.0)时遇到问题。

这是使用Maven的Spring MVC项目,在我的本地Tomcat上一切正常,但当我尝试将其部署到AWS时,在部署AWS后显示“Health”OK,但是当试图打开时该网站,它显示“无法找到页面”,在日志中我有:

-------------------------------------
/var/log/tomcat8/catalina.2016-12-08.log
-------------------------------------
 com.google.maps.internal.RateLimitExecutorService.run(RateLimitExecutorService.java:88)
 java.lang.Thread.run(Thread.java:745)
08-Dec-2016 09:50:38.524 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
08-Dec-2016 09:50:38.526 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-8009"]
08-Dec-2016 09:50:38.526 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
08-Dec-2016 09:50:38.527 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-nio-8009"]
08-Dec-2016 09:50:42.157 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.0.36
08-Dec-2016 09:50:42.159 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Aug 12 2016 18:14:42 UTC
08-Dec-2016 09:50:42.159 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.0.36.0
08-Dec-2016 09:50:42.159 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux
08-Dec-2016 09:50:42.159 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            4.4.16-27.56.amzn1.x86_64
08-Dec-2016 09:50:42.160 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
08-Dec-2016 09:50:42.160 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.101-3.b13.24.amzn1.x86_64/jre
08-Dec-2016 09:50:42.160 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_101-b13
08-Dec-2016 09:50:42.160 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
08-Dec-2016 09:50:42.161 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /usr/share/tomcat8
08-Dec-2016 09:50:42.162 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /usr/share/tomcat8
<<<
08-Dec-2016 09:50:42.163 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -DAWS_SECRET_ACCESS_KEY=****************
08-Dec-2016 09:50:42.166 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -DMY_S3_REGION=eu-central-1
08-Dec-2016 09:50:42.170 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -DJDBC_CONNECTION_STRING=
08-Dec-2016 09:50:42.171 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:MaxPermSize=128m
08-Dec-2016 09:50:42.171 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx1024m
08-Dec-2016 09:50:42.171 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms1024m
08-Dec-2016 09:50:42.172 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/share/tomcat8
08-Dec-2016 09:50:42.172 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/share/tomcat8
08-Dec-2016 09:50:42.172 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.awt.headless=true
08-Dec-2016 09:50:42.173 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=
08-Dec-2016 09:50:42.173 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/var/cache/tomcat8/temp
08-Dec-2016 09:50:42.173 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/share/tomcat8/conf/logging.properties
08-Dec-2016 09:50:42.173 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
08-Dec-2016 09:50:42.173 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
08-Dec-2016 09:50:42.393 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
08-Dec-2016 09:50:42.430 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
08-Dec-2016 09:50:42.443 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
08-Dec-2016 09:50:42.448 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
08-Dec-2016 09:50:42.449 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1258 ms
08-Dec-2016 09:50:42.510 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
08-Dec-2016 09:50:42.510 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.36
08-Dec-2016 09:50:42.538 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /var/lib/tomcat8/webapps/ROOT
08-Dec-2016 09:51:42.386 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
08-Dec-2016 09:51:42.407 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
08-Dec-2016 09:51:42.423 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [ROOT] registered the JDBC driver [org.postgresql.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
08-Dec-2016 09:51:42.424 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [Thread-14] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 sun.misc.Unsafe.park(Native Method)
 java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
 java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
 com.google.maps.internal.RateLimitExecutorService.run(RateLimitExecutorService.java:88)
 java.lang.Thread.run(Thread.java:745)
08-Dec-2016 09:51:42.431 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /var/lib/tomcat8/webapps/ROOT has finished in 59,892 ms
08-Dec-2016 09:51:42.434 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
08-Dec-2016 09:51:42.439 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
08-Dec-2016 09:51:42.440 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 59991 ms
08-Dec-2016 09:52:18.911 INFO [main] org.apache.catalina.core.StandardServer.await A valid shutdown command was received via the shutdown port. Stopping the Server instance.
08-Dec-2016 09:52:18.911 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
08-Dec-2016 09:52:18.913 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8009"]
08-Dec-2016 09:52:18.913 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service Catalina
08-Dec-2016 09:52:18.919 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
08-Dec-2016 09:52:18.920 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-8009"]
08-Dec-2016 09:52:18.921 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
08-Dec-2016 09:52:18.922 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-nio-8009"]
08-Dec-2016 09:52:22.698 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.0.36
08-Dec-2016 09:52:22.708 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Aug 12 2016 18:14:42 UTC
08-Dec-2016 09:52:22.709 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.0.36.0
08-Dec-2016 09:52:22.709 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux
08-Dec-2016 09:52:22.709 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            4.4.16-27.56.amzn1.x86_64
08-Dec-2016 09:52:22.710 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
08-Dec-2016 09:52:22.711 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.101-3.b13.24.amzn1.x86_64/jre
08-Dec-2016 09:52:22.711 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_101-b13
08-Dec-2016 09:52:22.711 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
08-Dec-2016 09:52:22.712 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /usr/share/tomcat8
08-Dec-2016 09:52:22.712 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /usr/share/tomcat8
<<<
08-Dec-2016 09:52:22.713 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -DAWS_SECRET_ACCESS_KEY=***************
08-Dec-2016 09:52:22.713 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -DMY_S3_REGION=eu-central-1
08-Dec-2016 09:52:22.714 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -DJDBC_CONNECTION_STRING=
08-Dec-2016 09:52:22.714 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:MaxPermSize=128m
08-Dec-2016 09:52:22.714 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx1024m
08-Dec-2016 09:52:22.718 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms1024m
08-Dec-2016 09:52:22.719 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/share/tomcat8
08-Dec-2016 09:52:22.719 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/share/tomcat8
08-Dec-2016 09:52:22.719 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.awt.headless=true
08-Dec-2016 09:52:22.720 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=
08-Dec-2016 09:52:22.720 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/var/cache/tomcat8/temp
08-Dec-2016 09:52:22.721 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/share/tomcat8/conf/logging.properties
08-Dec-2016 09:52:22.722 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
08-Dec-2016 09:52:22.723 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
08-Dec-2016 09:52:22.959 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
08-Dec-2016 09:52:23.000 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
08-Dec-2016 09:52:23.015 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
08-Dec-2016 09:52:23.017 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
08-Dec-2016 09:52:23.018 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1306 ms
08-Dec-2016 09:52:23.080 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
08-Dec-2016 09:52:23.080 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.36
08-Dec-2016 09:52:23.106 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /var/lib/tomcat8/webapps/ROOT
08-Dec-2016 09:52:43.760 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /var/lib/tomcat8/webapps/ROOT has finished in 20,653 ms
08-Dec-2016 09:52:43.767 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
08-Dec-2016 09:52:43.775 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
08-Dec-2016 09:52:43.782 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 20764 ms

如果有人对罐头有经验,你能帮忙吗? 感谢

0 个答案:

没有答案