# ODK Collect giving error when downloading forms

**URL:** <https://forum.getodk.org/t/odk-collect-giving-error-when-downloading-forms/19923>\
**Category:** Support\
**Created:** [May 20, 2019, 2:13pm UTC](https://forum.getodk.org/t/odk-collect-giving-error-when-downloading-forms/19923 "2019-05-20T14:13:00Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pat1](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/pat1/32/7111_2.png) [@Pat1](https://forum.getodk.org/u/Pat1)\
**Post date:** [May 20, 2019, 2:13pm UTC](https://forum.getodk.org/t/odk-collect-giving-error-when-downloading-forms/19923/1 "2019-05-20T14:13:01Z")

</div>

**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
3. 

**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.**

---

<div class="post-metadata">

**Author:** ![yanokwa](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/yanokwa/32/1695_2.png) [@yanokwa](https://forum.getodk.org/u/yanokwa)\
**Post date:** [May 20, 2019, 4:50pm UTC](https://forum.getodk.org/t/odk-collect-giving-error-when-downloading-forms/19923/2 "2019-05-20T16:50:06Z")

</div>

@Pat1 Welcome to the forum! When you get a chance, please [introduce yourself here](https://forum.getodk.org/t/-/6671) so we learn a little bit more about @Pat1 the person 🙂

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.

---

<div class="post-metadata">

**Author:** ![Neil\_Moloney](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/neil_moloney/32/7090_2.png) [@Neil\_Moloney](https://forum.getodk.org/u/Neil_Moloney)\
**Post date:** [May 20, 2019, 10:18pm UTC](https://forum.getodk.org/t/odk-collect-giving-error-when-downloading-forms/19923/3 "2019-05-20T22:18:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Neil\_Moloney](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/neil_moloney/32/7090_2.png) [@Neil\_Moloney](https://forum.getodk.org/u/Neil_Moloney)\
**Post date:** [May 20, 2019, 10:41pm UTC](https://forum.getodk.org/t/odk-collect-giving-error-when-downloading-forms/19923/4 "2019-05-20T22:41:07Z")

</div>

![image](https://getodk.b-cdn.net/uploads/default/original/2X/6/633c9988e4b49438a5adf18a47d4df1294e03255.jpeg)

---

<div class="post-metadata">

**Author:** ![Pat1](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/pat1/32/7111_2.png) [@Pat1](https://forum.getodk.org/u/Pat1)\
**Post date:** [May 21, 2019, 10:47am UTC](https://forum.getodk.org/t/odk-collect-giving-error-when-downloading-forms/19923/5 "2019-05-21T10:47:44Z")

</div>

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."

---

<div class="post-metadata">

**Author:** ![MatthewMac](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/matthewmac/32/4204_2.png) [@MatthewMac](https://forum.getodk.org/u/MatthewMac)\
**Post date:** [May 22, 2019, 10:31am UTC](https://forum.getodk.org/t/odk-collect-giving-error-when-downloading-forms/19923/6 "2019-05-22T10:31:58Z")

</div>

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](http://hostname.domain.com) and not [hostname.domain.com/yourprojectname](http://hostname.domain.com/yourprojectname)

Matthew

---

<div class="post-metadata">

**Author:** ![Neil\_Moloney](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/neil_moloney/32/7090_2.png) [@Neil\_Moloney](https://forum.getodk.org/u/Neil_Moloney)\
**Post date:** [May 22, 2019, 1:23pm UTC](https://forum.getodk.org/t/odk-collect-giving-error-when-downloading-forms/19923/7 "2019-05-22T13:23:10Z")

</div>

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... 🤪

Neil.

---

<div class="post-metadata">

**Author:** ![MatthewMac](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/matthewmac/32/4204_2.png) [@MatthewMac](https://forum.getodk.org/u/MatthewMac)\
**Post date:** [May 22, 2019, 3:51pm UTC](https://forum.getodk.org/t/odk-collect-giving-error-when-downloading-forms/19923/8 "2019-05-22T15:51:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Neil\_Moloney](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/neil_moloney/32/7090_2.png) [@Neil\_Moloney](https://forum.getodk.org/u/Neil_Moloney)\
**Post date:** [May 22, 2019, 3:52pm UTC](https://forum.getodk.org/t/odk-collect-giving-error-when-downloading-forms/19923/9 "2019-05-22T15:52:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Neil\_Moloney](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/neil_moloney/32/7090_2.png) [@Neil\_Moloney](https://forum.getodk.org/u/Neil_Moloney)\
**Post date:** [May 23, 2019, 1:40am UTC](https://forum.getodk.org/t/odk-collect-giving-error-when-downloading-forms/19923/10 "2019-05-23T01:40:40Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![MatthewMac](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/matthewmac/32/4204_2.png) [@MatthewMac](https://forum.getodk.org/u/MatthewMac)\
**Post date:** [May 24, 2019, 1:12pm UTC](https://forum.getodk.org/t/odk-collect-giving-error-when-downloading-forms/19923/11 "2019-05-24T13:12:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Neil\_Moloney](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/neil_moloney/32/7090_2.png) [@Neil\_Moloney](https://forum.getodk.org/u/Neil_Moloney)\
**Post date:** [May 24, 2019, 1:24pm UTC](https://forum.getodk.org/t/odk-collect-giving-error-when-downloading-forms/19923/12 "2019-05-24T13:24:42Z")

</div>

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.
