部署Spring Boot Web应用程序的问题:没有错误,但应用程序仍然失败

问题描述 投票:0回答:1

我正在尝试在Heroku上运行Spring Boot应用程序。我已经按照他们的教程进行操作,并尝试部署我的应用程序,但是由于某些未知原因,该应用程序一直在失败。

2019-11-08T12:23:50.484165+00:00 app[web.1]:
2019-11-08T12:23:50.484215+00:00 app[web.1]: .   ____          _            __ _ _
2019-11-08T12:23:50.484401+00:00 app[web.1]: /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
2019-11-08T12:23:50.484501+00:00 app[web.1]: ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
2019-11-08T12:23:50.484593+00:00 app[web.1]: \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
2019-11-08T12:23:50.484680+00:00 app[web.1]: '  |____| .__|_| |_|_| |_\__, | / / / /
2019-11-08T12:23:50.484770+00:00 app[web.1]: =========|_|==============|___/=/_/_/_/
2019-11-08T12:23:50.486599+00:00 app[web.1]: :: Spring Boot ::        (v2.2.1.RELEASE)
2019-11-08T12:23:50.486673+00:00 app[web.1]:
2019-11-08T12:23:50.816454+00:00 app[web.1]: 2019-11-08 12:23:50.809  INFO 4 --- [           main] P.p.ProgresstrackerappApplication        : Starting ProgresstrackerappApplication v0.0.1-SNAPSHOT on 8f560338-e240-4b5d-afdf-be7d44992eb6 with PID 4 (/app/target/progresstrackerapp-0.0.1-SNAPSHOT.jar started by u28233 in /app)
2019-11-08T12:23:50.819527+00:00 app[web.1]: 2019-11-08 12:23:50.819  INFO 4 --- [           main] P.p.ProgresstrackerappApplication        : No active profile set, falling back to default profiles: default
2019-11-08T12:23:53.772610+00:00 app[web.1]: 2019-11-08 12:23:53.772  INFO 4 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2019-11-08T12:23:53.791185+00:00 app[web.1]: 2019-11-08 12:23:53.790  INFO 4 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2019-11-08T12:23:53.791563+00:00 app[web.1]: 2019-11-08 12:23:53.791  INFO 4 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.27]
2019-11-08T12:23:53.897317+00:00 app[web.1]: 2019-11-08 12:23:53.897  INFO 4 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2019-11-08T12:23:53.897452+00:00 app[web.1]: 2019-11-08 12:23:53.897  INFO 4 --- [           main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 2928 ms
2019-11-08T12:23:54.261713+00:00 app[web.1]: 2019-11-08 12:23:54.261  INFO 4 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
2019-11-08T12:23:54.413274+00:00 app[web.1]: 2019-11-08 12:23:54.412  INFO 4 --- [           main] o.s.b.a.w.s.WelcomePageHandlerMapping    : Adding welcome page template: index
2019-11-08T12:23:54.709609+00:00 app[web.1]: 2019-11-08 12:23:54.709  INFO 4 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2019-11-08T12:23:54.715140+00:00 app[web.1]: 2019-11-08 12:23:54.714  INFO 4 --- [           main] P.p.ProgresstrackerappApplication        : Started ProgresstrackerappApplication in 5.801 seconds (JVM running for 6.938)
2019-11-08T12:24:00.589583+00:00 heroku[router]: at=error code=H20 desc="App boot timeout" method=GET path="/" host=progresstrackerapp.herokuapp.com request_id=68c7754f-2c39-4cf8-b207-426af344f40c fwd="xxx.xxx.xxx.xxx" dyno= connect= service= status=503 bytes= protocol=https

我从文本中删除了我的IP。任何想法可能导致超时吗?

我正在尝试在Heroku上运行Spring Boot应用程序。我已按照他们的教程进行操作,并尝试部署我的应用程序,但由于某些未知原因,该应用程序始终会失败。 2019-11-08T12:23:50.484165 + 00:00 app [web.1]:...

java spring spring-boot heroku
1个回答
0
投票

这在Heroku的末端看来是个问题。根据官方文档,由于路由问题,发生错误代码为H20(应用程序启动超时)的错误。路由逻辑等待75秒,以使测功机启动。如果到那时没有动力,则Heroku给出此错误代码。您可以尝试heroku ps:restart重新启动测功机来摆脱此问题。

© www.soinside.com 2019 - 2024. All rights reserved.