Unable to test a form on odk central

Can you see previews or test forms for any other forms on your server?

As @Grzesiek2010 says, if other forms work, it would be helpful to see this specific form. If it's not sensitive, you can attach it to this post. If it is sensitive, you could direct message it to a member of the core team such as me or @Grzesiek2010. We would only use it to troubleshoot the error and then discard it.

Alternately, sharing the link to the draft page that shows the error message would be helpful. It should start with https://mlw.mw/-/. What I'd like to look at is whether there are any errors in the JavaScript console that could give us hints. You can also try this yourself -- on most browsers you can right click on the screen, select Inspect at the bottom of the menu and then find the Console tab.

Problem was with the odk central server installation, Am now able to preview the form after re-installation.
Thank you @LN and @Grzesiek2010

1 Like

Glad it's now working! If anyone else experiences this error, please share either the link to a failing draft page or errors in the JavaScript console. It seems like Enketo was not able to make successful requests to Central.

I am facing the same issue and the console for enketo give me the Failed to load resource: the server responded with a status of 504 (Gateway Time-out) on /-/transform/xform/. This is URL for preview - https://central-mp.samagra.io/-/preview/qxYXm716zkFrFSDuEIkFhoyuZVMeHil

I have upgraded the Central from an older version (Dec 2019) to the new one by building the docker image and docker-compose up --no-start

Thanks for sharing this information, @Chakshu_Gautam. Are you able to view other previews on that server? Does that form have a lot of logic?

The 504 error makes me think that the web form transformer is not able to process the form in a timely manner. You might be able to address this by increasing the CPU and RAM on your server. It's possible that a server restart would temporarily help because it would reset resource usage. However, that is likely not a long term solution.

These are the steps I followed post your suggestion. Increased the virtual cores from 1-4 and RAM from 2-8 GB. Docker restarts auto due to the service that central adds so didn't restart manually. The form that I am using is off the shelf - Survey on Household Characteristics.

On the docker logs, the Nginx logs show that it waits for quite some time before giving a 504.

Would it be possible for you to share the form? You can either attach it to a response here or if it's sensitive, you can send me a private message. Have you tried a small form with minimal logic? The most likely explanation is that there's something in the form structure that the preview engine (Enketo) cannot process in a timely manner. Unfortunately, you may not be able to use web previews with this form for now. Have you tried it on ODK Collect? You can use the testing tab to scan a temporary barcode and make test submissions.

Yes. ODK Collect is still able to submit responses. I am sharing the form here.
g2h1.xml (4.4 KB)

Hey @LN, we've recently setup ODK Central. While ODK forms are working fine on a mobile app, web-forms through Enketo are not working. Attaching the form and sharing a screenshot of the error. Any solution around this?

Link for the form - https://odk.adapt-odisha.com/-/preview/87Xeo5jsZLf4s463SMfppci1bDsnGou

Attendance_Marker.xml (3.5 KB)

Hey @LN, any solution around this?

Remove or set firewall
Screenshot_2021-03-19-22-06-38-695_com.android.chrome

Thanks for this, @Sandeep_Prabhu1! Did you experience this same issue and fix it by making sure your host doesn't have a firewall? Given how small the forms @Chakshu_Gautam and @Aayush_Kedia have shared are, an internal networking issue does seem a lot more likely than a true form transformation issue. Did you both follow the instructions @Sandeep_Prabhu1 references here? Are you on a host other than Digital Ocean that could have some other kind of internal firewall?

Hey @LN, It's on Digital ocean only and we have used default docker installation steps from the site.
Additionally, there are no firewalls whatsoever.

Hey @LN, following up to check if you were able to see this?

@Aayush_Kedia I have tested your form on a new server and install and it's working great there, so the issue is with your server.

  1. Did you deviate from the instructions at https://docs.getodk.org/central-install-digital-ocean?
  2. What Docker version did you deploy?
  3. What size of machine did you use?
  4. What happens when you run ufw status on the command line?
  5. Does a reboot help?
  6. Do the steps at https://docs.getodk.org/central-troubleshooting/#preview-could-not-connect-with-server help?
1 Like

A post was split to a new topic: Form transformation failing due to timeout

I am using a form on a self-hosted Central Server, which is very large. Online XML conversion of this form fails. However, we have used the "pyxform" offline converter and easily managed to bypass the issue. The form works perfectly on the "ODK Collect" app.
However, when opening on the web with the "Enketo" it is failing with Gateway time out error. and a message like "Unexpected token < in JSON at position 0" (Screenshot attached at the bottom).

Observations:

  1. The form could be opened on the "Enketo" a week back when it was slightly smaller(just 2-3 lines less from the present size)
  2. I am on Digitalocean and have scaled the droplet to "CPU optimised 32vCPUs and 64GB RAM" to check if the timeout stops occurring. It does not. I "htop"ed to see only one core out of 32 really works to open the form in Enketo and timeout occurs exactly at 60 sec
  3. The self-hosted central server works fine while handing other forms which are smaller

I suspect the timeout is due to NGINX 60sec default timeout. Is there a way to change the 60sec timeout setting?

Requesting the community to come up with some solution/workaround.

The XML is too large to attach here. Therefore providing a google docs link for the same:

The dependent .csv media files are attached here.
auditor_ip.csv (9.5 KB)
avi.csv (21.9 KB)
kishgrid.csv (920 Bytes)

Hi

Please i have the same error 504 error and I can’t upload my form

Any suggestions please

Is it a problem with one particular form? If so please attach it here so that we can take a lokk.

Hi:
I have the same problem with all the forms with the latest version of ODK Central in OS Ubuntu 22.04 (I tried with the Ubuntu 20.04 too) and docker version 23.0.3. The virtual machine works with the following characteristics:

  • Processor: 2 cores
  • RAM: 5 Gb
  • HD: 100 Gb

All the forms I tried Works in ODK Collect

URL: https://gnss.frutosamazonicos.org.bo/-/preview/GiVmF5whuciBjI2MrK05eGb40eGaYyM