ODK Central v0.4 setup- Run command "docker-compose ps" return " Unhealthy"

Hi @issa,
Today I try to power off the Console and turn it on again, run systemctl start docker-compose@central,
and then see Active: active (running) when run systemctl status docker-compose@central
but get the status " unhealthy" when run docker-compose ps
the screen shot when run docker-compose logs nginx is as below:

The reason I power off the console is I'm trying to take its snapshot after fail to set up a auto backup Central to Google Drive.

1/ For some situation, how can I turn off/on Central safety
2/ How to diagnose the reason why the backup to Google Drive failed. I did follow exactly the instruction https://docs.opendatakit.org/central-backup/
Pls kindly patient with me.

to turn off Central safely, you can run systemctl stop docker-compose@central on the server. shutting off the machine through normal procedures should be fine as well. i should add these instructions to the user documentation.

the google drive issue is more challenging, because that information is stored on your server but we haven't yet had time to actually expose it through the web interface. if you are willing to run some commands, we might be able to get those details out.

cd ~/central
docker-compose exec postgres psql -U odk -W odk

here you'll get a password prompt; type odk and press enter. you'll be shown something that looks like this:

psql (9.6.10)
Type "help" for help.


from here, run this query: select details from audits where action='backup';

there should be a bunch of output; copy and paste as much of it as seems relevant and we can try to figure it out.

Hi @issa,
This is out put when i run select details from audits where action='backup';

And how to navigate back to "central" folder. My current command line is odk=#

you can type \q or press ctrl+d to back out of the odk=# prompt.

as for the failure messages, are you sure you are running the latest version of the software?

Hi @issa
I use the ODK Central v0.4 Beta as screenshot. 3 days ago, I installed it follow the instruction and did run git submodule update -i. anyway, I'll upgrade it and inform you ASAP.

Update: It is not the same as when first time I install. After run git pull

The central upgrade stop as screen shoot when I run git submodule update -i and then docker-compose build

looks like your server's overloaded. try stopping the server (systemctl stop docker-compose@central) and then doing the build, and then starting it again afterwards? (replace stop with start)

Hi @issa,
Success to update as your advice ( finished 18/18 step) but the central now become "unhealthy"

okay. i'm sorry this is taking so long. what does it say when you do docker-compose logs nginx

Hi @issa,
pls see the screen shot. It's just a part of out put but I can't roll up

okay, there was genuinely something wrong with the infrastructure itself, but i still don't understand why exactly. either way, i have patched it and you should be up and running again.

Hi @issa,

It's still " unhealthy". What I did is:
1/ git pull
2/ git submodule update -i
3/ docker-compose build
4/ systemctl restart docker-compose@central
And output when I run docker-compose logs nginx.

ahhhhh no i had it working for you! the patch that resolves the issue isn't released yet, so by doing the update procedure you have undone the fix. :frowning:

i shall fix it for you again.

1 Like

Thank you in advance. Pls inform when you done

i did it about five minutes after my previous post.

Sorry Clint,
It's still not OK.
I've also tried to reinstall new Central, the set up success but whenever I do upgrade it become "unhealthy".

And, my new Central still fail to back up to Google Drive. Here is the message when I run the query : _select details from audits where action='backup';_

{"success":false,"message":"Cannot read property 'getRoot' of undefined","stack":"TypeError:
Cannot read property 'getRoot' of undefined\n at create (/usr/odk/node_modules/googleapis
/build/src/apis/drive/v3.js:472:31)\n at create (internal/util.js:230:26)\n at drive.ap
i.files.list.then (/usr/odk/lib/task/google.js:47:45)\n at \n at process._ti
ckCallback (internal/process/next_tick.js:188:7)"}
(1 row)

yes; if you tried to install a new one or do an upgrade, it will definitely have broken.

but hopefully not anymore; i just pushed the updates so if you try again hopefully it'll stop being unhealthy. do remember to let it think for 3-5 minutes before deciding whether it's really unhealthy or not.

Hi. I am facing a similar issue. I am trying to install the latest version of ODK Central using the DigitalOcean installation guide and when I run docker-compose ps, my nginx server says it is unhealthy. Moreover, when I look into the logs, it says that the "certbot encountered an error." Although I changed the .env document to reflect the changes in the DigitalOcean guide. Please advise.

hey @dlederer, please take a look at the patch instructions given here. let me know if they aren't clear enough.

Thanks @issa will let you know how it goes.

Dear All i have run ODK central the log file is not complete should i wait