we are using ODK for a large river water quality sampling survey and set up our own ODK server including Enketo forms. Everything seems to work during tests with several different users and mobile devices.
1. What is the problem:
Testing phase is nearly over, but recently I received several reports from users not being able to connect from the ODK Collect app to our server. They receive an Error 400 - Bad Request. For some it happened - after having already a working setup - during submission of forms. For others, it happened on new installs when getting blank forms.
I was not able so far to reproduce their error. As only some users have this problem, I asked one to try to connect to a different test server (we also tested on appspot.com) and there she could connect. I put the same form there, she could get it and also submit it.
2. What app or server are you using and on what device and operating system?
We use ODK 1.7.1, Apache/2.4.18 (Ubuntu) and Tomcat 22.214.171.124.
Apache is configured as a proxy like this:
Allow from all
ProxyPass /odk ajp://localhost:8009/odk
ProxyPassReverse /odk http://jds4.icpdr.org/odk
3. What have you tried to fix the problem?
I tried to eliminate in the testing with users other possible causes (in form, client, network). So, I'm thinking that the problem might be in our server setup.
4. What steps can we take to reproduce the problem?
I don't know, that's part of the problem.
5. Anything else we should know or have?
I would appreciate very much any hints on how to further investigate or solve this issue!
Hi @alex.hoebart. When you get a chance, please introduce yourself here so we can learn more about you and your project!
I've seen this kind of problem when folks run into Apache or Aggregate or MySQL/PostgreSQL timeouts. This could be because you are on a slow (or high latency) connection or have large attachments or some combination of that. I'd start by looking at your logs and see if there are any hints of timeouts or post limits.
It'd be helpful to also know the following:
- Are your users trying to use HTTPS when the server (or submission_url in the form) is configured for HTTP (or vice versa)?
- Are your users in a network environment where there might be proxies or government firewalls?
- When users get the 400, what fixes it (e.g., reboot, change from WiFi to cell network)
- What version of ODK Collect are you using?
- Does it ever happen with Enketo?
thanks for your hints.
I haven't found any timeouts or similar warnings in tomcat and apache logs. I also just tried again sending our form with 4 attached photos of about 15MB - it took many seconds to upload, but it worked without problems.
I actually also cannot find those errors 400 in the logs for /odk/formList. I only see them on screenshot of ODK Collect from users.
I find regularly this in catalina.out:
WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
- We use https and any request to http is redirect to https - I tested both URLs in the ODK Collect config and it works for me with both http and https configured.
- I had reports of this error 400 from users in different neworkds - company, home and mobile.
- The only "fix" I got reported so far, was somebody installing the app GeoODK, using the same server config which succeeded - and after that, also ODK Collect started working again. It's quite unbelievable, I know.
- I have reports of the error 400 in ODK Collect v1.21.2, 1.22.2. and 1.22.3.
- Actually, those users having problems are currently using Enketo as a work-around.
I have now managed to reproduce the error described above and hope to get more hints for solving it.
- The error occurs only when ODK Collect user interface language is set to Czech or Slovene. I haven't tested with all but several other languages.
- The error on the screen is partly in Czech/Slovene, then follows: getXmlDocument failed while accessing https://domain/odk/formList with status code: 400
- This request and error is not showing up in the tomcat or apache logs of the server.
- This happens with ODK Aggregate v1.7.3 (just upgraded) and ODK Collect v1.22.4
- The error does not occur with the default demo server set in ODK Collect
I am happy that we can work around this problem by using English language. But still, I would appreciate any hints on the reason for this error.
Hi, I may be having the same issue:
- What is the problem: user in china not able to submit the form, yet another user in china with a mobile from Germany was able to submit the same form in her mobile. Form is in english.
- What app or server are you using and on what device and operating system?
ODK Aggregate 2.0.2 ODK collect V1.18.1
- What have you tried to fix the problem?
I reviewed the form, and tried to test and replicate the error from different mobiles but it seems that the mobile is not the issue but the language settings of the mobile.
- What steps can we take to reproduce the problem? Not sure, changing the phone settings here to spanish, portuguese and other known languages did not work.
- Anything else we should know or have? Is it chinese part of the problem?
Any help will be appreciated to further fix it.