gpt4 book ai didi

spring - 为什么我的 spring boot 应用程序首先失败然后突然在 cloudfoundry 中启动?

转载 作者:行者123 更新时间:2023-11-28 21:51:43 25 4
gpt4 key购买 nike

我们刚刚将我们的四个应用程序迁移到 spring boot 1.4,并且三个运行良好。第 4 个是唯一一个带有 WAR 包装并包含 JSP 的。这个有一个非常奇怪的行为:我们推它,然后它自动启动失败两次,然后当它第三次被 CF 启动时它又工作了。有没有人听说过这个?我真的没主意了。

明确一点:我只推送应用程序,然后 cloudfoundry 会处理其他一切。它尝试启动应用程序四次,直到它突然成功。我不会以任何其他方式停止或启动该应用程序。此外,当我们通过 CF GUI 停止和启动应用程序时,也会发生同样的事情,之前没有进行推送...

2016-08-15T20:01:14.06+0200 [APP/0]      OUT 18:01:14.063 [Tomcat-startStop-1] ERROR o.apache.catalina.core.ContainerBase - A child container failed during start
2016-08-15T20:01:14.06+0200 [APP/0] OUT java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]]
2016-08-15T20:01:14.06+0200 [APP/0] OUT at java.util.concurrent.FutureTask.report(FutureTask.java:122)
2016-08-15T20:01:14.06+0200 [APP/0] OUT at java.util.concurrent.FutureTask.get(FutureTask.java:192)
2016-08-15T20:01:14.06+0200 [APP/0] OUT at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:911)
2016-08-15T20:01:14.06+0200 [APP/0] OUT at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:890)
2016-08-15T20:01:14.06+0200 [APP/0] OUT at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
2016-08-15T20:01:14.06+0200 [APP/0] OUT at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)
2016-08-15T20:01:14.06+0200 [APP/0] OUT at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
2016-08-15T20:01:14.06+0200 [APP/0] OUT at java.util.concurrent.FutureTask.run(FutureTask.java:266)
2016-08-15T20:01:14.06+0200 [APP/0] OUT at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
2016-08-15T20:01:14.06+0200 [APP/0] OUT at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
2016-08-15T20:01:14.06+0200 [APP/0] OUT at java.lang.Thread.run(Thread.java:745)
2016-08-15T20:01:14.06+0200 [APP/0] OUT Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]]
2016-08-15T20:01:14.06+0200 [APP/0] OUT at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:158)
2016-08-15T20:01:14.06+0200 [APP/0] OUT ... 6 common frames omitted
2016-08-15T20:01:14.06+0200 [APP/0] OUT Caused by: java.lang.NullPointerException: null
2016-08-15T20:01:14.06+0200 [APP/0] OUT at org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:325)
2016-08-15T20:01:14.06+0200 [APP/0] OUT at org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:182)
2016-08-15T20:01:14.06+0200 [APP/0] OUT at org.apache.jasper.servlet.TldScanner.scanJars(TldScanner.java:262)
2016-08-15T20:01:14.06+0200 [APP/0] OUT at org.apache.jasper.servlet.TldScanner.scan(TldScanner.java:104)
2016-08-15T20:01:14.06+0200 [APP/0] OUT at org.apache.jasper.servlet.JasperInitializer.onStartup(JasperInitializer.java:103)
2016-08-15T20:01:14.06+0200 [APP/0] OUT at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)
2016-08-15T20:01:14.06+0200 [APP/0] OUT at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
2016-08-15T20:01:14.06+0200 [APP/0] OUT ... 6 common frames omitted

完整日志请见:http://pastebin.com/6pqtbH7F

编辑:我刚刚使用 Spring Boot JSP 示例 (https://github.com/spring-projects/spring-boot/tree/master/spring-boot-samples/spring-boot-sample-tomcat-jsp) 进行了测试,它显示了完全相同的问题。

最佳答案

这是与 tomcat 8.5.4 的不兼容问题 https://github.com/spring-projects/spring-boot/issues/6657

关于spring - 为什么我的 spring boot 应用程序首先失败然后突然在 cloudfoundry 中启动?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38961177/

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