1. What is the problem? Be very detailed.
I set up ODK Central and uploaded a form.
Configured Collect via QR code.
In Collect, on page Get Blank Form a list of forms (present on Central) displays succesfully.
The actual download ('Get Selected') fails with the message:
Untitled Form (ID: testform) - Unable to resolve host "local": No address associated with hostname
This happens both for drafts and finalized forms. When two forms are selected for download, two error messages appear.
Curiously, while the successful Get Blank Form request is recorded in both docker's nginx and service logs, the failed Get Selected forms request isn't logged anywhere. It seems no request is sent at all? When I do an invalid request using the browser (for example one that triggers a HTTP 404 response), it is logged as usual.
2. What app or server are you using and on what device and operating system? Include version numbers.
ODK Collect 1.26.2.
ODK Central 0.8.0 was installed on a custom Debian 10 machine (not Digital Ocean) using Docker. Another web server that occupied ports 80 and 443 was running there already. There is also an existing Let's Encrypt certificate in use for the domain. I used port numbers 4480 and 4443 for ODK. During installation, i adhered to appropriate instructions with following deviations:
.env
, modified first two lines:
SSL_TYPE=customssl
DOMAIN=local
SYSADMIN_EMAIL=mail@example.com
docker-compose.yml
, modified the port numbers in the nginx chapter:
nginx:
container_name: nginx
build:
context: .
dockerfile: nginx.dockerfile
depends_on:
- service
environment:
- SSL_TYPE=${SSL_TYPE}
- DOMAIN=${DOMAIN}
- CERTBOT_EMAIL=${SYSADMIN_EMAIL}
ports:
- "4480:80" # modified
- "4443:443" # modified
healthcheck:
test: [ "CMD-SHELL", "nc -z localhost 443 || exit 1" ]
Copied fullchain.pem
and privkey.pem
from the /etc/letsencrypt/live/directory/my.example.com/
as specified in instructions.
A separate question: I am concerned this manual coping of certificates will bite me back when the certificate will be renewed, won't it? Would creating a symbolic link to the original files work? The best thing would be if the builder skipped certbot altogether and nginx used the existing Let's Encrypt certificate natively, but I don't know how to instruct the installer to do so. It would rule out one possible source of the problem.
Only after these modifications of the standard procedure the installation of Central finished properly and Central started successfully. Until I started testing the uploaded form, I encountered no problems.
3. What you have you tried to fix the problem?
My problem was similar to this question: https://forum.getodk.org/t/25084, however changing the domain in .env
file from DOMAIN=local
to the real domain name DOMAIN=my.example.com
resulted in an unsuccesful instalation and nginx failed to start with:
nginx: [emerg] BIO_new_file("/etc/customssl/live/my.example.com/fullchain.pem") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/customssl/live/my.example.com/fullchain.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)
Building and running with SSL_TYPE=letsencrypt
in .env
terminates with certbot error AuthorizationError: Some challenges have failed.
4. What steps can we take to reproduce the problem?
Build Central on a non-standard port with a SSL certificate already present using the configuration mentioned above. Then try to retrieve an uploaded form.
I didn't have an another machine to try to reproduce the error.