cloudfoundry健康检查失败。你是怎么成功的?如果你有必要的信息,请告诉我。
HEALTH/0 ERR未能向端口8080上的'/‘发出HTTP请求:在2ms中接收到状态代码404
单元格/0错误超时后1ms:健康检查从未通过.
发布于 2019-11-13 19:45:42
健康检查试图在分配的端口8080上与应用程序建立HTTP连接,并使用默认的健康检查路径/。在您的例子中,它收到了一个404响应,它不是一个有效的响应。您需要返回一个200确定的测试才能通过。
如果应用程序不返回端点/的任何内容,则可以通过为应用程序运行cf set-health-check来更改健康检查所使用的路径。
$ cf set-health-check -h
NAME:
set-health-check - Change type of health check performed on an app
USAGE:
cf set-health-check APP_NAME (process | port | http [--endpoint PATH])
TIP: 'none' has been deprecated but is accepted for 'process'.
EXAMPLES:
cf set-health-check worker-app process
cf set-health-check my-web-app http --endpoint /foo
OPTIONS:
--endpoint Path on the app (Default: /)示例:
cf set-health-check my-cool-app http --endpoint /healthhttps://stackoverflow.com/questions/58817972
复制相似问题