Form Loading Error when using Enketo on ODK Central

1. What is the issue? Please be detailed.
We are trying to upload and publish a questionnaire that can be filled out online.
We are able to upload the questionnaire without generating errors, but when we try to preview the questionnaire as a draft or fill out an ODK form online (once we publish it), we receive the following error message:

2. What steps can we take to reproduce this issue?
We can trigger the issue by trying to preview or fill out (either as an ODK central user or a web user) any questionnaire online, both in draft or published form. We are using a self-hosted instance of ODK with the following specifications:
Server: Ubuntu 22.04.4, 64 GB RAM, 1 TB storage (11% used)
ODK Version: v2024.1.0-1-g42d83f

3. What have you tried to fix the issue?
Things we’ve ruled out
a. The questionnaire itself: We used the exact same questionnaire and preload files on a different instance of ODK central and it works.
b. Resource constraints: The server has way more RAM and storage than required.
c. Bad HTTP requests: We looked at the docker logs as suggested here when reproducing this error and didn’t see any 5XX errors corresponding to anything weird from the server. The process terminated with code 200.
d. The server is able to connect with the ODK connect app on a phone/tablet, users are able to fill out and submit questionnaires via the app, and the data is successfully sent back to the server.

Attempts at finding/solving the issue

a. The Enketo container can't reach the Nginx container over the Internet. We ran this command which returned 0, as proposed in this thread:
docker exec -it central-enketo-1 curl https://$(grep "^DOMAIN=" ~/central/.env | cut -d = -f 2) | grep -c getodk.org

b. The ODK host doesn’t seem to be able to reach the ODK central website. The following commands both time out, which was part of the first step as outlined in this procedure:

cd ~/central
curl  -i domain.name
ping domain.name

When we try nslookup domain.name, we do get the public IP address though.

c. The /etc/docker/daemon.json file on the HOST was completely blank, and we filled it in with 8.8.8.8 following step 2 of the same procedure above. This didn’t fix the problem.
We also tried adding the public IP and website name to the etc/hosts file in the continuation of step 2 of the same procedure and as recommended by the ODK documentation, and this didn’t work either.

d. We looked at the .env and the docker-compose.yml files, they looked correct, with the ports matching what was required for encryption via Let’s Encrypt, the right host names, etc.

Load the web form in a browser. Look at the browser's inspector. Any errors there?

Manually run the following commands to check what's happening inside the Enketo container.

# connect to enketo container
cd ~/central
docker exec -it central-enketo-1 bash

# install curl
apt update
apt install curl --assume-yes

# run curl. make sure to use your own domain. 1 means everything is working. 
curl --silent --insecure https://your.central.domain | grep --count getodk.org

# clean up
apt remove curl --assume-yes
apt autoremove --assume-yes
3 Likes

Hi Yaw, thanks so much for your response.

When we inspected this process using Firefox, we found a 504 error on the last POST request.

We also tried the curl procedure, which unfortunately returned 0.

Can you confirm you replaced https://myodk.local.net with the correct URL? What is the output, if any, when you run the following. Note I am not including the grep.

curl --silent --insecure https://yourdomain.com

The inspector screenshot has an error in the upper right. Click to the console tab. Does it show you what the error is?