2016-01-27 75 views
2

我想使用boxfuse在AWS上运行我的Spring启动应用程序。 我已经遵循了来自Spring的following教程(第54.4节)和Boxfuse的Get Started以及。错误:运行应用程序失败 - 春季启动+ Boxfuse/AWS

当我运行以下命令

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的免费计划上运行,这可能是问题吗?

回答

1

Boxfuse确保您的应用的正确版本保持正常运行,并且不会被糟糕的版本取代。只有当新版本通过Boxfuse的健康检查时,Boxfuse才会重新分配应用程序的弹性IP。一旦完成,Boxfuse将终止旧版本的实例。

要验证你的应用程序的新版本出现正确Boxfuse预计新版本的实例的运行状况检查路径返回HTTP 200

对于没有执行定期春季启动应用程序的默认运行状况检查路径是/。您的应用程序目前回答404存在的,而不是200

你有一些选项来解决这个问题:

  • 控制器添加到您的应用程序映射到/当你的应用程序正确地来了,返回HTTP 200。
  • 将Boxfuse的healthcheck.path更改为不同的路径,当您的应用程序正常运行时确实会回答HTTP 200。
  • 禁用Boxfuse的健康检查,通过设置healthcheckfalse(不推荐,因为这能有效地防止Boxfuse从检查你的应用是否会来正确)

选择这些选项的任何一个和你的应用程序将正确拿出你会期待。

相关问题