I have a Scala app (http4s with Jetty) that I want to deploy to Heroku. I followed the instructions on https://devcenter.heroku.com/articles/getting-started-with-scala and has this as my Procfile:
web: target/universal/stage/bin/myappname
I build the app using sbt with sbt-native-packager and run sbt compile stage
. On my local machine when I run target/universal/stage/bin/myappname
I can start the Jetty server successfully with the following logs:
Starting on port 4000
[main] INFO org.eclipse.jetty.util.log - Logging initialized @285ms
[main] INFO org.eclipse.jetty.server.Server - jetty-9.2.3.v20140905
[main] INFO org.eclipse.jetty.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler@45c5082a{/,null,AVAILABLE}
[main] INFO org.eclipse.jetty.server.ServerConnector - Started ServerConnector@30ec6243{HTTP/1.1}{127.0.0.1:4000}
[main] INFO org.eclipse.jetty.server.Server - Started @421ms
On Heroku I also get the log that the Jetty server started but also an additional timeout line after:
2014-11-22T19:27:53.648838+00:00 heroku[web.1]: Starting process with command `target/universal/stage/bin/myappname`
2014-11-22T19:27:54.967288+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS: -Xmx384m -Djava.rmi.server.useCodebaseOnly=true
2014-11-22T19:27:55.495116+00:00 app[web.1]: Starting on port 36115
2014-11-22T19:27:55.761411+00:00 app[web.1]: [main] INFO org.eclipse.jetty.util.log - Logging initialized @645ms
2014-11-22T19:27:56.032766+00:00 app[web.1]: [main] INFO org.eclipse.jetty.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler@397f0e73{/,null,AVAILABLE}
2014-11-22T19:27:55.962916+00:00 app[web.1]: [main] INFO org.eclipse.jetty.server.Server - jetty-9.2.3.v20140905
2014-11-22T19:27:56.055280+00:00 app[web.1]: [main] INFO org.eclipse.jetty.server.Server - Started @967ms
2014-11-22T19:27:56.055064+00:00 app[web.1]: [main] INFO org.eclipse.jetty.server.ServerConnector - Started ServerConnector@1df3b191{HTTP/1.1}{127.0.0.1:36115}
2014-11-22T19:28:07.147193+00:00 heroku[router]: at=error code=H20 desc="App boot timeout" method=GET path="/" host=myappname.herokuapp.com request_id=c05b5bf6-6268-4c37-8525-4e58c1bda496 fwd="24.4.136.119" dyno= connect= service= status=503 bytes=
What is the reason that my app started yet Heroku says App boot timeout? Thanks in advance.