I am unable to access an odk installation after following the <a https://docs.getodk.org/central-install-digital-ocean>guide.
I got a freeDNS domain name and waited for more than three days - still no access after setting it up as described.
I tried different combinations of settings, even got a new subdomain name and retried but I still have the same problem.
So looking at the running docker images on my Debian VM with
docker ps -a
It returns:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d5ff1f7389e4 central-nginx "/bin/bash /scripts/…" 11 days ago Up 4 days (healthy) 0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp central-nginx-1
1baa90bbbabb central-service "docker-entrypoint.s…" 11 days ago Up 4 days 8383/tcp central-service-1
ed505cf1263e central-enketo "docker-entrypoint.s…" 11 days ago Up 4 days 8005/tcp central-enketo-1
34eafdbc47a1 central-secrets "docker-entrypoint.s…" 11 days ago Exited (0) 11 days ago central-secrets-1
b019b4b00500 ghcr.io/getodk/pyxform-http:v2.0.3 "gunicorn --bind 0.0…" 11 days ago Up 4 days central-pyxform-1
83c180df34ab redis:7.2 "docker-entrypoint.s…" 11 days ago Up 4 days 6379/tcp central-enketo_redis_cache-1
07f59149352d redis:7.2 "docker-entrypoint.s…" 11 days ago Up 4 days 6379/tcp central-enketo_redis_main-1
b02000ac590a central-postgres14 "start-postgres.sh" 11 days ago Up 4 days 5432/tcp central-postgres14-1
d94b5a69bb6d central-postgres "/bin/sh -c upgrade-…" 11 days ago Exited (0) 11 days ago central-postgres-1
376c0576d493 ixdotai/smtp:v0.5.2 "/bin/entrypoint.sh …" 11 days ago Up 4 days 25/tcp central-mail-1
5471b0eaa17d hello-world "/hello" 11 days ago Exited (0) 11 days ago brave_poincare
It seems central-secrets-1 and central-postgres were exited just after installation?
I got no error messages after installation and assumed everything installed fine and was up and running.
Could this be the reason I can't access central? Please help!
2024/05/15 18:10:39 [emerg] 800249#800249: bind() to 0.0.0.0:80 failed (98: Address already in use)
2024/05/15 18:10:39 [emerg] 800249#800249: bind() to [::]:80 failed (98: Address already in use)
I have no firewalls up - ufw not even installed.
It says address already in use... which address? Subdomain name?
What could be an issue is that I installed an RStudio and Rshiny servers on the same droplet (not as docker images) while waiting/troubleshooting this issue with ODK. Both working fine. Could this be an issue?
The docker service logs gives me this (last few lines):
npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-05-12T06_47_52_029Z-debug-0.log
wait-for-it: waiting 15 seconds for postgres14:5432
wait-for-it: postgres14:5432 is available after 0 seconds
generating local service configuration..
running migrations..
checking migration success..
starting cron..
cat: /sys/fs/cgroup/memory/memory.limit_in_bytes: No such file or directory
/usr/odk/start-odk.sh: line 34: [: : integer expression expected
using 1 worker(s) based on available memory ()..
starting server.
2024-05-16T18:23:37: PM2 log: Launching in no daemon mode
2024-05-16T18:23:37: PM2 log: App [service:0] starting in -cluster mode-
2024-05-16T18:23:37: PM2 log: App [service:0] online
{"sent":false,"message":"Config not set"}
"Forms purged: 0"
{"sent":false,"message":"Config not set"}
"Forms purged: 0"
{"sent":false,"message":"Config not set"}
"Forms purged: 0"
npm error ?
Can't find the file referred to here - neither does the directory /root/.npm/ exists...
This is the docker nginx logs (last few lines):
118.193.47.212 - - [19/May/2024:09:53:34 +0000] "GET / HTTP/1.1" 301 169 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0" "-"
118.193.47.212 - - [19/May/2024:09:53:53 +0000] "GET /favicon.ico HTTP/1.1" 301 169 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_0) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11" "-"
118.193.47.212 - - [19/May/2024:09:53:54 +0000] "GET /robots.txt HTTP/1.1" 301 169 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_0) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11" "-"
118.193.47.212 - - [19/May/2024:09:53:55 +0000] "GET /sitemap.xml HTTP/1.1" 301 169 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_0) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11" "-"
80.66.83.49 - - [19/May/2024:10:29:47 +0000] "\x04\x01\x00PPBS1\x00" 400 157 "-" "-" "-"
80.66.83.49 - - [19/May/2024:10:29:47 +0000] "\x05\x01\x00" 400 157 "-" "-" "-"
80.66.83.49 - - [19/May/2024:10:29:47 +0000] "CONNECT 80.66.83.49:80 HTTP/1.1" 400 157 "-" "-" "-"
34.77.126.178 - - [19/May/2024:10:35:47 +0000] "GET / HTTP/1.1" 301 169 "-" "python-requests/2.31.0" "-"
94.156.67.234 - - [19/May/2024:10:53:47 +0000] "GET /.aws/credentials HTTP/1.1" 301 169 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.80 Safari/537.36" "-"
185.191.126.213 - - [19/May/2024:11:08:56 +0000] "GET / HTTP/1.1" 301 169 "-" "-" "-"
Both these other services listen on other ports (not 80 or 443).
Checking both port 80 and port 443 with lsof -i it shows both ports being used by docker processes. The only docker processes running on my VM that I am aware of is ODK central.
Any chance you have multiple versions of Docker installed? Try whereis docker to check. It should return this: docker: /usr/bin/docker /etc/docker /usr/libexec/docker /usr/share/man/man1/docker.1.gz
Many thanks for the help - I managed to solve the issue.
Apparently I had another nginx server running on my VM which I did not know about.
I disabled it and rebuilt the docker container and it worked.
The R studio and R shiny servers are also running fine with this setup.