java - 正在运行的 Heroku Java WAR 应用程序现在失败 : "Unable to access jarfile webapp-runner-7.0.40.0.jar"

标签 java heroku war

我们的 Java WAR 应用程序(只是一个无状态 Java Web 服务)在过去 3 年里一直在 Heroku 上运行良好,但在周五可能由 Heroku 发起的一些 Activity 之后:

heroku-postgresql: Update HEROKU_POSTGRESQL_RED by heroku-postgresql

应用程序现在会在 dyno 重新启动时记录此错误:

2017-08-14T19:37:10.491690+00:00 heroku[web.1]: Starting process with command `${PRE_JAVA}java ${JAVA_OPTS} -jar webapp-runner-7.0.40.0.jar --port ${PORT} ${WEBAPP_RUNNER_OPTS} cv-services-1.0.0.war`
2017-08-14T19:37:12.584664+00:00 heroku[web.1]: State changed from starting to crashed
2017-08-14T19:37:12.585526+00:00 heroku[web.1]: State changed from crashed to starting
2017-08-14T19:37:12.575166+00:00 heroku[web.1]: Process exited with status 1
2017-08-14T19:37:12.503570+00:00 app[web.1]: Unable to access jarfile webapp-runner-7.0.40.0.jar

并返回 503(服务不可用)错误。

Heroku 支持说出问题:

falls outside the nature of the Heroku Support policy

如果您经历过并解决了此类问题(尤其是最近)或有见解,请回答。

PS

heroku 信息输出:

Addons:         heroku-postgresql:dev
Auto Cert Mgmt: false
Dynos:          web: 1
Git URL:        https://git.heroku.com/xxxxxx.git
Owner:          xxxxxx@xxxxxx.com
Region:         eu
Repo Size:      0 B
Slug Size:      0 B
Stack:          cedar
Web URL:        https://xxxxxx.herokuapp.com/

最佳答案

我不确定到底是什么问题,但 Heroku cedar 堆栈(又名 Cedar-10)是 shutdown 2 years ago 。您可以按照以下步骤更新您的应用程序,但我认为您最好创建一个新应用程序,可以使用以下命令来执行此操作:

$ heroku create
$ heroku plugins:install heroku-cli-deploy
$ heroku deploy:war cv-services-1.0.0.war

这假设您拥有 cv-services-1.0.0.war 文件的副本。 deploy:war 命令会将其部署在最新的 (heroku-16) 堆栈上,其中包含最新的 Java (8) 和最新的 Tomcat (8.5)。

关于java - 正在运行的 Heroku Java WAR 应用程序现在失败 : "Unable to access jarfile webapp-runner-7.0.40.0.jar",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45682001/

相关文章:

java - 如果没有键盘输入如何生成随机数

node.js - MERN 应用程序在部署到 Heroku 时无法运行 "heroku-postbuild"脚本

java - 在运行时更改 jar/war 文件中的 config.properties 文件并热部署更改?

ruby - 无法通过 bundler 和 heroku push 安装 gems 被拒绝

Tomcat 7 上的 java.lang.OutOfMemoryError : Java heap space deploying . war

grails - 从Config.groovy和Datasource.groovy访问war文件名

java - Spring 中的丰富 HTML 电子邮件与 Thymeleaf

java - java 中的 setsotimeout

java - Observable-订阅两种方法

ios - 解析到Heroku迁移:解析服务器云代码不起作用