After I deployed my app into cloud foundry got the following error message:
ERR Timed out after 1m0s: health check never passed.
Of course on my local machine works perfectly.
You should change your health check type.
if the application does not expose a Web interface you need to change the healthcheck
type to process
.
Valid values are port
, process
, and http
.
To configure a health check while creating or updating an application, use the cf push command:
$ cf push YOUR-APP -u process
See the Health Check doc for more information: https://docs.cloudfoundry.org/devguide/deploy-apps/healthchecks.html
Based on the discussion in the comments and my own testing of the actual application you are deploying, it appears that this particular app takes an age to start. Possibly related to individual Java service timeouts (as you have not bound any CF services to the application).
Anyway, while I'm not sure what the actual problem is (possibly an issue with PWS itself), this can be sort-of worked around by specifying the -t
option when doing a push, or adding the timeout: <int>
attribute to the manifest (see the manifest
documentation.
OLD ANSWER
Need more details to be sure, but I imagine one of two things are happening:
PORT
(or, pre-Diego, VCAP_APP_PORT
) environment variable. This defaults to 8080
, so if your application is not listening on 8080
(or is bound to 127.0.0.1
instead of 0.0.0.0
), then the health check will fail.--no-route
option on CF, and (starting with Diego) needs to have cf set-health-check [app-name]
executed against it. This should only be done if your application genuinely does not need a health check.Some build packs can take care of the first automatically for you. Which build pack are you using? Or, alternatively, which language are you using?
You can disable the health with the below command (Short term solution)
cf push app_name -p target/app.jar -u none
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With