Denise
Denise

Reputation: 2015

heroku unable to access jarfile server/webapp-runner.jar

I'm using heroku to host a grails app. I had the app up and running, added only a new controller method, and redeployed. The deployment succeeded with no errors or strange looking warning messages, but now the application fails.

Here are the logs:

heroku[slugc]: Slug compilation started
heroku[api]: Deploy 02ebfa1 by [email protected]
heroku[api]: Release v35 created by [email protected]
heroku[api]: Deploy 02ebfa1 by [email protected]
heroku[web.1]: State changed from crashed to starting
heroku[slugc]: Slug compilation finished
heroku[web.1]: Starting process with command `java -Xmx384m -Xss512k -XX:+UseCompressedOops -jar server/webapp-runner.jar --port 49719 target/*.war`
app[web.1]: Unable to access jarfile server/webapp-runner.jar
heroku[web.1]: Process exited with status 1
heroku[web.1]: State changed from starting to crashed

As far as I've been able to determine, webapp-runner.jar is the file heroku creates out of my application. The fact that it doesn't exist or isn't accessible suggests that the file doesn't exist or is incorrect. Any idea how to diagnose this within the context of heroku?

Upvotes: 3

Views: 4261

Answers (2)

j_simone
j_simone

Reputation: 558

I'm a little late to the game here, but I can provide some more background. This was part of a change to make Tomcat the default container for Grails: https://devcenter.heroku.com/changelog-items/277

You can now specify Jetty as your container by adding a system.properties file to your project.

Upvotes: 2

Justin
Justin

Reputation: 186

I've been deploying my Grails WAR to Heroku for weeks without a problem, but just ran into this issue today. There's not much debugging information in the log, but I noticed that server/webapp-runner.jar didn't look right (I think it used to be jetty-runner.jar). So I added my own Procfile in the root directory of my project as it says to do in the Getting Started with Grails on Heroku documentation linked below.

https://devcenter.heroku.com/articles/grails#optional-declare-process-types-with-procfile

Here's what I added to the Procfile.

web: java $JAVA_OPTS -jar server/jetty-runner.jar --port $PORT target/*.war

That seems to have fixed it for me.

Upvotes: 4

Related Questions