2016-01-27 116 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從檢查你的應用是否會來正確)

選擇這些選項的任何一個和你的應用程序將正確拿出你會期待。

相關問題