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

I'm trying to set up ODK Central on Digital Ocean Droplet. When I run the command " docker-compose ps", it returns " unhealthy" instead of " up( healthy) as instruction. Pls kindly advice what should i do next

on its first run the system takes some time to generate some keys and obtain an SSL certificate. try letting it run for 5-10 minutes and see if it starts working? usually it only takes 2-3 but it is random chance.

1 Like

Hi @issa
Thank you for your reply. I've checked again today, after 12hours. It's still "unhealthy". Do i need to check something more?

okay. i suspect this is the same problem as this other report, which has also been reported on github, but just to verify, would you mind running the following under the central/ dir?

docker-compose logs nginx

and see if the output you see looks like those other reports?

1 Like

Hi @issa,
This morning I tried to destroy my Droplet and set up all again, surprisingly, the result it 's OK right the first time, no more "unhealthy" as yesterday.Now, I can't take the log as your guidance.
Thank you for your nice support.

excellent! i'm glad it's working for you now. if it fails again, please let me know!

ok @issa, i'll let you know.
By the way, when I run docker-compose logs nginx, it report a long list of text, how can I scroll up and copy these text.

if you use docker-compose logs nginx | less, then:

  • you can use the pageup and pagedown keys to scroll a full page at a time.
  • or u and d to scroll half a page at a time.
  • or k and j to scroll a line at a time.
  • and you can press q to quit.

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