gpt4 book ai didi

tomcat - 在AWS Elastic Beanstalk上启动期间Grails 4 App停顿

转载 作者:行者123 更新时间:2023-12-02 14:39:04 28 4
gpt4 key购买 nike

我有一个Grails 4.0.1应用程序,可以在本地正常运行。我可以使用java -jar...运行WAR文件,但是我尝试将其部署到运行Java 8和Tomcat 8的AWS Elastic Beanstalk中,并且它在启动过程中停顿了,根本没有任何错误消息。

OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=64m; support was removed in 8.0
29-Jan-2020 11:49:38.574 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/8.5.50
29-Jan-2020 11:49:38.634 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Jan 6 2020 22:09:40 UTC
29-Jan-2020 11:49:38.634 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 8.5.50.0
29-Jan-2020 11:49:38.634 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
29-Jan-2020 11:49:38.634 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 4.14.158-101.185.amzn1.x86_64
29-Jan-2020 11:49:38.634 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
29-Jan-2020 11:49:38.634 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.232.b09-0.48.amzn1.x86_64/jre
29-Jan-2020 11:49:38.634 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_232-b09
29-Jan-2020 11:49:38.634 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
29-Jan-2020 11:49:38.634 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /usr/share/tomcat8
29-Jan-2020 11:49:38.634 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /usr/share/tomcat8
29-Jan-2020 11:49:38.635 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]
29-Jan-2020 11:49:39.218 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
29-Jan-2020 11:49:39.309 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
29-Jan-2020 11:49:39.328 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
29-Jan-2020 11:49:39.330 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
29-Jan-2020 11:49:39.331 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 2803 ms
29-Jan-2020 11:49:39.447 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
29-Jan-2020 11:49:39.448 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.50
29-Jan-2020 11:49:39.479 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/var/lib/tomcat8/webapps/ROOT]
29-Jan-2020 11:49:44.838 WARNING [localhost-startStop-1] org.apache.tomcat.util.descriptor.web.WebXml.setVersion Unknown version string [4.0]. Default version will be used.
2020-01-29 11:50:03.589 INFO --- [ost-startStop-1] us.cloudcard.api.ApplicationLoader : The following profiles are active: production

Configuring Spring Security Core ...
... finished configuring Spring Security Core


Configuring Spring Security REST 3.0.0.RC1...
... finished configuring Spring Security REST

... with GORM support
29-Jan-2020 11:50:09.141 WARNING [localhost-startStop-1] org.apache.tomcat.jdbc.pool.ConnectionPool.checkPoolConfiguration maxActive is smaller than 1, setting maxActive to: 100
2020-01-29 11:50:13.580 WARN --- [ost-startStop-1] o.s.b.GenericTypeAwarePropertyDescriptor : Invalid JavaBean property 'exceptionMappings' being accessed! Ambiguous write methods found next to actually used [public void grails.plugin.springsecurity.web.authentication.AjaxAwareAuthenticationFailureHandler.setExceptionMappings(java.util.List)]: [public void org.springframework.security.web.authentication.ExceptionMappingAuthenticationFailureHandler.setExceptionMappings(java.util.Map)]

最佳答案

原来我错过了两件事:

  • 我需要标记提供的Spring Boot Starter Tomcat Artifact ,因此它不会与外部Tomcat容器冲突。
  • dependencies {
    ...
    provided "org.springframework.boot:spring-boot-starter-tomcat"
    ...
    }
  • 我还需要增加容器的大小。我试图在t3.nano上运行,然后撞到了t3.micro。
  • 关于tomcat - 在AWS Elastic Beanstalk上启动期间Grails 4 App停顿,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59973878/

    28 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com