Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cloud foundry: ERR Timed out after 1m0s: health check never passed

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.

like image 878
Csepi Avatar asked Feb 07 '16 11:02

Csepi


3 Answers

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

like image 192
Yarix Avatar answered Sep 18 '22 13:09

Yarix


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:

  • You are not using the correct port. Cloud Foundry exposes the port it expects the application to be deployed using the 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.
  • Your application does not expose any API endpoints, and should be deployed with the --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?

like image 28
ipsi Avatar answered Sep 17 '22 13:09

ipsi


You can disable the health with the below command (Short term solution)

cf push app_name -p target/app.jar -u none
like image 45
Santosh Rachakonda Avatar answered Sep 16 '22 13:09

Santosh Rachakonda