dokku: dokku ps:restore fails due to CHECKS file
Description of problem:
For me it seems a CHECKS
prevents dokku ps:restore
from restoring the applications/instances. I noticed it because suddenly the my services didn’t come back after system reboots Whenever i published an app containing a CHECKS
file none of my applications were started after reboot (ps:restore). (Even there were some without a CHECKS
file as well.) May they were started and terminated after a few seconds. May it’s just my fault? Did i miss something? Any idea?
My CHECKS
file looked like this:
WAIT=2
ATTEMPTS=5
/
My upstart/dokku-redeploy.log
looked like this when it went wrong (with CHECKS
file) for the particular app:
Restoring app PROJECT_NAME ...
-----> Releasing PROJECT_NAME (dokku/PROJECT_NAME:latest)...
-----> Deploying PROJECT_NAME (dokku/PROJECT_NAME:latest)...
-----> DOKKU_SCALE file found (/home/dokku/PROJECT_NAME/DOKKU_SCALE)
=====> web=1
-----> Running pre-flight checks
-----> Attempt 1/5 Waiting for 2 seconds ...
CHECKS expected result:
http://localhost/ => ""
!
curl: (7) Failed to connect to 172.17.0.3 port 5000: Connection refused
! Check attempt 1/5 failed.
-----> Attempt 2/5 Waiting for 2 seconds ...
CHECKS expected result:
http://localhost/ => ""
!
curl: (7) Failed to connect to 172.17.0.3 port 5000: Connection refused
! Check attempt 2/5 failed.
-----> Attempt 3/5 Waiting for 2 seconds ...
CHECKS expected result:
http://localhost/ => ""
!
curl: (7) Failed to connect to 172.17.0.3 port 5000: Connection refused
! Check attempt 3/5 failed.
-----> Attempt 4/5 Waiting for 2 seconds ...
CHECKS expected result:
http://localhost/ => ""
!
curl: (7) Failed to connect to 172.17.0.3 port 5000: Connection refused
! Check attempt 4/5 failed.
-----> Attempt 5/5 Waiting for 2 seconds ...
CHECKS expected result:
http://localhost/ => ""
!
curl: (7) Failed to connect to 172.17.0.3 port 5000: Connection refused
! Check attempt 5/5 failed.
Could not start due to 1 failed checks.
=====> PROJECT_NAME container output:
=====> end PROJECT_NAME container output
Failed to kill container (99ffe4a50feaf10dc61b1713e755af45a13079227e5c5b1566032c6094441933): Error response from daemon: Cannot kill container 99ffe4a50feaf10dc61b1713e755af45a13079227e5c5b1566032c6094441933: Container 99ffe4a50feaf10dc61b1713e755af45a13079227e5c5b1566032c6094441933 is not running
Removing the CHECKS file helped. Afterwards it starts just fine:
Restoring app PROJECT_NAME ...
-----> Releasing PROJECT_NAME (dokku/PROJECT_NAME:latest)...
-----> Deploying PROJECT_NAME (dokku/PROJECT_NAME:latest)...
-----> DOKKU_SCALE file found (/home/dokku/PROJECT_NAME/DOKKU_SCALE)
=====> web=1
-----> Running pre-flight checks
For more efficient zero downtime deployments, create a file CHECKS.
See http://dokku.viewdocs.io/dokku/checks-examples.md for examples
CHECKS file not found in container: Running simple container check...
-----> Waiting for 10 seconds ...
-----> Default container check successful!
=====> PROJECT_NAME container output:
=====> end PROJECT_NAME container output
-----> Running post-deploy
-----> Found previous container(s) (3ae6e2f3da64) named PROJECT_NAME.web.1
=====> renaming container (3ae6e2f3da64) PROJECT_NAME.web.1 to PROJECT_NAME.web.1.1456405107
=====> renaming container (aa05a9783e98) prickly_goldberg to PROJECT_NAME.web.1
-----> Configuring PROJECT_NAME.something.tld...(using /var/lib/dokku/plugins/available/nginx-vhosts/templates/nginx.conf.template)
-----> Creating http nginx.conf
-----> Running nginx-pre-reload
Reloading nginx
-----> Setting config vars
DOKKU_APP_RESTORE: 1
-----> Shutting down old containers in 60 seconds
=====> 3ae6e2f3da642b49692b44d1dd0a0741526aef3d9aca44620366432a2672370e
=====> Application deployed:
http://PROJECT_NAME.something.tld
Output of the following commands
uname -a
: Linux app 3.19.0-51-generic #57~14.04.1-Ubuntu SMP Fri Feb 19 14:36:55 UTC 2016 x86_64 x86_64 x86_64 GNU/Linuxdocker version
: 1.10.2docker run -ti gliderlabs/herokuish:latest herokuish version
: 0.3.8dokku version
: 0.4.14
My app is just a simple node application using the default builtsteps with a Procfile containing
web: node server.js
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 20 (14 by maintainers)
Upgrading is not advised on running apps. You’ll want to stop everything first.
I’ll push a release of that out tonight.