Problem with deployment of Spring Boot Web app: No errors but app still fails

Smoke HHH :

I am trying to run a Spring Boot app on Heroku. I have followed their tutorials and tried to deploy my app but for some unknown reason it keeps failing.

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

I edited out my IP from the text. Any idea what might cause the timeout?

EDIT 1: Some things i did: I added the Procfile by myself in the root directory of the app since without it my app would crash

web java -jar target/progresstrackerapp-0.0.1-SNAPSHOT.jar

Also for the commands I did :

git add .
git commit -m "s1"
git push heroku master

Build of the app was fine and no problem appeared there

heroku ps:scale:1 // this resulted in the problem

EDIT 2:

I found the problem.It seems that I needed to specify an environment variable PATH. Heroku needs this variable to be able to deploy on it since it is the developer's job to include it. That is what fixed it for me.

codefinger :

Make sure you’re binding to the correct port by passing -Dserver.port=$PORT to your Procfile command

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=356838&siteId=1