ERROR: Running application failed - Spring boot + Boxfuse/AWS
ERROR: Running application failed - Spring boot + Boxfuse/AWS
我正在尝试使用 boxfuse 运行 我的 Spring 在 AWS 上启动应用程序。
我也关注了 Boxfuse 的 following tutorial from Spring (section 54.4) and the Get Started。
当我运行下面的命令
boxfuse run target\digigram-0.1.0.jar -env=prod
我得到以下几行
Waiting for AWS to boot Instance i-74fe7fc8 and Payload to start at http://52.28.94.159:8080/ ...
WARNING: Healthcheck (http://52.28.94.159:8080/) returned 404 instead of 200. Retrying for the next 120 seconds ...
Terminating instance i-74fe7fc8 ...
结尾是
Destroying Security Group sg-0ed6f667 ...
ERROR: Deployment of pantera160/digigram:0.0.0.1453900589995 failed in prod:Payload of Instance i-74fe7fc8 came up at http://52.28.94.159:8080/
with HTTP 404 (expected 200) => ensure your application responds with an HTTP 200 at http://52.28.94.159:8080/ or adjust the healthcheck configuration (healthcheck.path, healthcheck.timeout, ...) to fit your application
ERROR: Running pantera160/digigram:0.0.0.1453900589995 failed!
我不明白问题出在哪里。我是否必须在 AWS 或我的应用程序中更改某些内容或...
如有任何帮助,我们将不胜感激。
注意:
我正在 运行 购买 AWS 的免费计划,这可能是问题所在吗?
Boxfuse 确保您的应用程序的正确版本保持正常运行 运行,并且不会被错误版本取代。只有当新版本确实通过了 Boxfuse 的健康检查时,Boxfuse 才会为其重新分配应用程序的弹性 IP。完成后,Boxfuse 将终止旧版本的实例。
为了验证您的应用程序的新版本是否正确启动,Boxfuse 期望新版本实例的健康检查路径为 return HTTP 200。
没有执行器的常规 Spring 启动应用程序的默认健康检查路径是 /
。您的应用目前在那里回答 404 而不是 200。
您有多种选择来解决此问题:
- 将控制器添加到映射到
/
的控制器,当您的应用正确启动时 returns HTTP 200。
- 将 Boxfuse 的
healthcheck.path
更改为当您的应用程序正确启动时确实会响应 HTTP 200 的不同路径。
- 通过将
healthcheck
设置为 false
来禁用 Boxfuse 的健康检查(不推荐,因为这会有效地阻止 Boxfuse 检查您的应用程序是否正确启动)
选择其中一个选项,您的应用程序将如您所愿正确启动。
我正在尝试使用 boxfuse 运行 我的 Spring 在 AWS 上启动应用程序。 我也关注了 Boxfuse 的 following tutorial from Spring (section 54.4) and the Get Started。
当我运行下面的命令
boxfuse run target\digigram-0.1.0.jar -env=prod
我得到以下几行
Waiting for AWS to boot Instance i-74fe7fc8 and Payload to start at http://52.28.94.159:8080/ ...
WARNING: Healthcheck (http://52.28.94.159:8080/) returned 404 instead of 200. Retrying for the next 120 seconds ...
Terminating instance i-74fe7fc8 ...
结尾是
Destroying Security Group sg-0ed6f667 ...
ERROR: Deployment of pantera160/digigram:0.0.0.1453900589995 failed in prod:Payload of Instance i-74fe7fc8 came up at http://52.28.94.159:8080/
with HTTP 404 (expected 200) => ensure your application responds with an HTTP 200 at http://52.28.94.159:8080/ or adjust the healthcheck configuration (healthcheck.path, healthcheck.timeout, ...) to fit your application
ERROR: Running pantera160/digigram:0.0.0.1453900589995 failed!
我不明白问题出在哪里。我是否必须在 AWS 或我的应用程序中更改某些内容或...
如有任何帮助,我们将不胜感激。
注意:
我正在 运行 购买 AWS 的免费计划,这可能是问题所在吗?
Boxfuse 确保您的应用程序的正确版本保持正常运行 运行,并且不会被错误版本取代。只有当新版本确实通过了 Boxfuse 的健康检查时,Boxfuse 才会为其重新分配应用程序的弹性 IP。完成后,Boxfuse 将终止旧版本的实例。
为了验证您的应用程序的新版本是否正确启动,Boxfuse 期望新版本实例的健康检查路径为 return HTTP 200。
没有执行器的常规 Spring 启动应用程序的默认健康检查路径是 /
。您的应用目前在那里回答 404 而不是 200。
您有多种选择来解决此问题:
- 将控制器添加到映射到
/
的控制器,当您的应用正确启动时 returns HTTP 200。 - 将 Boxfuse 的
healthcheck.path
更改为当您的应用程序正确启动时确实会响应 HTTP 200 的不同路径。 - 通过将
healthcheck
设置为false
来禁用 Boxfuse 的健康检查(不推荐,因为这会有效地阻止 Boxfuse 检查您的应用程序是否正确启动)
选择其中一个选项,您的应用程序将如您所愿正确启动。