2. What steps can we take to reproduce this issue?
.env file content
# Use fully qualified domain names. Set to DOMAIN=local if SSL_TYPE=selfsign.
DOMAIN=localhost
# Used for Let's Encrypt expiration emails and Enketo technical support emails
SYSADMIN_EMAIL=myemail@yahoo.com
# Options: letsencrypt, customssl, upstream, selfsign
SSL_TYPE=upstream
# Do not change if using SSL_TYPE=letsencrypt
HTTP_PORT=9000
HTTPS_PORT=9443
Error: getaddrinfo EAI_AGAIN postgres14
*** Error starting ODK! ***
After attempting to automatically migrate the database, we have detected unapplied migrations, which suggests a problem with the database migration step. Please look in the console above this message for any errors and post what you find in the forum: https://forum.getodk.org/
wait-for-it: waiting 15 seconds for postgres14:5432
But logs of central-postgres14-1 seems ok
pat@pat-pc ~/d/c/central (master)> podman logs central-postgres14-1
Tue Dec 3 01:21:50 PM GMT 2024 [start-postgres.sh] Starting postgres...
PostgreSQL Database directory appears to contain a database; Skipping initialization
2024-12-03 13:21:50.325 UTC [1] LOG: starting PostgreSQL 14.10 (Debian 14.10-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
2024-12-03 13:21:50.326 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2024-12-03 13:21:50.326 UTC [1] LOG: listening on IPv6 address "::", port 5432
2024-12-03 13:21:50.327 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2024-12-03 13:21:50.329 UTC [24] LOG: database system was shut down at 2024-12-03 13:21:03 UTC
2024-12-03 13:21:50.333 UTC [1] LOG: database system is ready to accept connections
For me, the containers can run with DOMAIN=localhost, and one can access the Central interface with it.
Then I attempted to use ODKCollect with that setup. Getting it to contact Central using a QR code works (with an Android device with ADB enabled - use adb reverse tcp:yourCentralport tcp:yourCentralport to tunnel from the Android device localhost interface).
But the XML in the formList OpenRosa endpoint contains URLs such as https://localhost:8443/..., so in the end, without further tinkering, it'll break on that.
Your problem seems (for now) unrelated to these settings; for you the problem seems to be that central-enketo-1 keeps crashing (and restarting) because on bootup it tries to make a connection to enketo_redis_cache, which cannot be resolved, which can have a number of causes, one of which is that that service itself can keep crashing (which, in turn, can have a number of causes), which results in the docker/podman DNS server not registering that hostname. This happened to me, and one of the causes I found I've filed here.
I hope that helps you a bit further along in your efforts!
I was wondering if you were able to use Enketo (for form previews) when hosted ODK Central (using docker, not the development environment) locally? I tried the same and I am stuck @ form server could not be found (also here: Could not connect with Form Server Preview). Also, I am not sure if I am correct but it seems like the http (non SSL) access to Central no more works with the latest release and is blocked via server block in nginx?! Then how come did the localhost thing work with "upstream"?!
Indeed, the Enketo preview is not working but I usually use https://getodk.org/xlsform/ to validate my forms.
And for your second question, I'm not sure to understand. ODK central should run locally on your computer. The tricky part now it to be able to view and submit forms from your smartphone. For that, you must run ODK central on the IP address provided by the WiFi you're connected on with your SmartPhone. So .env file must define a certain IP address for the DOMAIN ie: DOMAIN=10.15.99.87. For now, I did not succeed... But I just wanted to see ODK central website look and how it works with projects.
Hmm, I see. Thank you very much for the clarification.
Nevertheless, I guess, I am aware of a workaround to use an internal static IP (like DOMAIN=10.15.99.87) to let ODK Collect connect to the ODK Central server over localhost. I haven't tested it yet, just an idea, but I believe that if we make Central (hosted over localhost) run behind a reverse proxy and disable the firewall, we can bypass that "Central needs a qualified domain name to function" restriction and pair the same with ODK Collect using an IP over the same network (using http and not https). But, we must use Central version less than or equal to v2024.2.1 to achieve the same.
Anyways, if you ever stumble upon a solution to make Enketo work with this setup, please let me know. I really don't wanna dive into it's documentation by myself.
Si, puede, pero no es facil. Eso modo es suelo para development y testing.
Segue el documentacion para development local y despues utiliza adb forward para projectar el puerte TCP port de tu server a través de un cable USB dentro de la tableta. De modo que, puede utilizar el codo QR para configurarlo.