ODK Collect giving error when downloading forms

1. What is the problem? Be very detailed.

Hi everyone,

I installed ODKAggregate on Ubuntu 18.04 and I was able to download forms from the server using ODK Collect without problems. I later installed ssl certificate issued by Digicert on the server. After installing ssl certificate, when i go to ODK Collect app and click the Get Blank Form button, am able to view or list all the blank forms. Now when i select the forms to download, i am receiving the error below:

Download Results

rsVisitSumm_live3 (Version::
2019051201 ID:rsVisirSumm_live3)
-Attempt to invoke virtual method
' int java.io.InputStream.read(byte)'
on a null object reference

2. What app or server are you using and on what device and operating system? Include version numbers.
Hardware

HP Proliant G9 DL380

Software

I am using Ubuntu Linux 18.04
ODK Collect v1.21.2
Tomcat 9.0.17
PostgreSQL 106
ODKAggregate

3. What you have you tried to fix the problem?

  1. Tried using ODK Collect v1.16 and ODK Collect v1.21 but they are all failing.
  2. Tried changing the security.properties file in the ODKAggregate-settings.jar folder as shown below
    a). changed the setting on security.server.hostname to be
    security.server.hostname= Fully Qualified Domain Name ( but i was still not able to download the forms
    b). changed the setting on security.server.hostname to be
    security.server.hostname= my ip address ( but i was still not able to download the forms

4. What steps can we take to reproduce the problem?
Install ODKaggregate on following setup:
-Linux ubuntu 18.04
-PostgreSQL 106
-Tomcat 9.0.17

Then install SSL certificate

5. Anything else we should know or have? If you have a test form or screenshots or logs, attach below.

1 Like

@Pat1 Welcome to the forum! When you get a chance, please introduce yourself here so we learn a little bit more about @Pat1 the person :slight_smile:

I think you are on the right track as far as troubleshooting. That is, if you can list forms but can't download them, the problem is security.server.hostname.

  1. What version of ODK Aggregate are you using? If you aren't using v2.0.3, can you try that?
  2. Can you look at the Tomcat logs and see if there is any useful information there about what is going wrong?
  3. How exactly did you unjar and rejar ODKAggregate-settings.jar. If that isn't done properly, I find that the fix doesn't actually work.

I am having this problem as well. I set up a GCP platform on 18.04LTS exactly as recommended in the online setup guide for Aggregate. Tried to load forms to a Galaxy S9+ and a cheap Huawei tablet using Collect 1.21.2. I will be following this topic closely. (my intro is from a few days ago, too!)

Neil.

Hey Yanokwa, thank you very much for the response.
We are running ODKaggregate version 2.0.2.
As for Jaring and Unjaring the ODKAggregate-settings.jar folder, we are using emacs app for editing the security-properties file. We have tried to change the host settings but with no lack.

We have also noted that when we access the ODKAggregate server web interface and export the form we can not download the file. The following error pops up:
"Bad Request
This combination of host and port requires TLS."

I initially ran into the same problem. Check in the Aggregate configuration you've set
Internet-visible IP address or DNS name simply to hostname.domain.com and not hostname.domain.com/yourprojectname

Matthew

Matthew, thanks for the guidance. Where/how do I check this? I can SSH into my GCP instance of the server, but I'm kinda lost at that point... :crazy_face:

Neil.

I'm afraid I'll have to defer on this one as I think the GCP setup is quite different from the Tomcat installation that I'm more familiar with.

If you were to do it in Tomcat, how would you proceed? That might give me sufficient insight!

So this will disappoint well into posterity. I solved the problem by completely wiping out the GCP instance and starting from scratch. Not sure what was done differently, sorry... But now it works!

1 Like

That's exactly what I didn't want to have to suggest you did. Great to hear it's now working.

It's very quick in GCP to kill a server and rebuild another one, only took me a few minutes. Still a bit frustrating for anyone else who runs into the same problem with GCP.