【问题标题】:heroku unable to access jarfile server/webapp-runner.jarheroku 无法访问 jarfile 服务器/webapp-runner.jar
【发布时间】:2013-06-02 14:36:06
【问题描述】:

我正在使用 heroku 来托管一个 grails 应用程序。我让应用程序启动并运行,只添加了一个新的控制器方法,然后重新部署。部署成功,没有错误或奇怪的警告消息,但现在应用程序失败了。

这里是日志:

heroku[slugc]: Slug compilation started
heroku[api]: Deploy 02ebfa1 by x@gmail.com
heroku[api]: Release v35 created by x@gmail.com
heroku[api]: Deploy 02ebfa1 by x@gmail.com
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

据我所知,webapp-runner.jar 是 heroku 从我的应用程序中创建的文件。它不存在或不可访问的事实表明该文件不存在或不正确。知道如何在 heroku 的上下文中诊断这个吗?

【问题讨论】:

    标签: grails heroku


    【解决方案1】:

    我已经将我的 Grails WAR 部署到 Heroku 几个星期了,没有出现任何问题,但今天遇到了这个问题。日志中没有太多调试信息,但是我注意到server/webapp-runner.jar看起来不太对(我认为它曾经是jetty-runner.jar)。所以我在我的项目的根目录中添加了我自己的 Procfile,正如它在下面链接的 Heroku 文档上的 Grails 入门中所说的那样。

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

    这是我添加到 Procfile 中的内容。

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

    这似乎已经为我解决了。

    【讨论】:

      【解决方案2】:

      我在这里玩游戏有点晚了,但我可以提供更多背景信息。这是使 Tomcat 成为 Grails 的默认容器的更改的一部分:https://devcenter.heroku.com/changelog-items/277

      您现在可以通过将 system.properties 文件添加到您的项目来将 Jetty 指定为您的容器。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2019-09-27
        • 2018-08-21
        • 2013-09-27
        • 2018-12-17
        • 2022-12-05
        • 2015-12-06
        相关资源
        最近更新 更多