Issue Downloading Forms - No address associated with hostnameCopying media files failed

1. What is the problem? Be very detailed.
I'm setting up a new system for a new survey. I've used ODK a year back, so I know my way around. I've followed everything from the official documentation, and setup the aggregate server with a custom domain. I can access the aggregate server and upload forms. I even downloaded an old form for a sanity test. It was working fine. I deleted the test forms, and went and updated my new form. I uploaded it, and I cannot download the form. I thought something might be wrong with the new form, so went and tested with the same file that worked before. It isn't working anymore.

The Error reads:
"{Form Name} (Version: xyx) - Unable to resolve host "xyz": No address associated with hostnameCopying media files failed.

I have no media files. And again, the form that was working a moment earlier isn't working anymore. I could still download the test files from the default (when I just install the app).

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

Aggregate server is hosted in Google Compute Engine with a custom DNS server (followed from official documentation). The aggregate version is v2.0.3.

The ODK Collect version is v1.22.1.

3. What you have you tried to fix the problem?
Re-installed ODK Collect. I can download the default forms. I put in the credentials for my server, I can see the forms but it fails to download. My custom server name works with http, but not with https.

I have downloaded test forms (Odk - github). I cannot download these forms too. The crazy thing is I had downloaded it half an hour ago and nothing has been changed on the server (unless Google would fiddle around - which I'm pretty sure is not the case).

4. What steps can we take to reproduce the problem?
Um, I'm not so sure about this. I don't have any sensitive data on the server, so I could set up a test user and pass along the credentials, if someone's willing to take a peek at it. But I don't want to share it in the forum for everyone, only to those who are willing to have a look.

5. Anything else we should know or have? If you have a test form or screenshots or logs, attach below.
Pretty sure the form is correct. I've tested with a form that has gone through everything and been closed last year. It's running fine on Enketo too. I think it has to do something with the server setup.

Seeing forms but not being able to download them is typically because you don't have the correct fully qualified domain name in Aggregate.

Let's focus on getting HTTPS working first. Can you share the output of the certbot command at https://docs.opendatakit.org/aggregate-google-cloud/#enable-https. It will have the URL to your server, but typically isn't sensitive.

Here is the output of the commands.

xyz@xyz:~$ sudo certbot run --nginx --non-interactive
--agree-tos -m xyz@gmail.com --redirect -d xyz.mooo.
com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
Cert not yet due for renewal
Keeping the existing certificate
Could not automatically find a matching server block for xyz.mooo.
com. Set the server_name directive to use the Nginx installer.
IMPORTANT NOTES
-Unable to install the certificate
-Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/xyz/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/xyz/privkey.pem
Your cert will expire on 2019-09-05. To obtain a new or tweaked
version of this certificate in the future, simply run certbot again
with the "certonly" option. To non-interactively renew all of
your certificates, run "certbot renew"

I could not access the log at /var/log/letsencrypt/letsencrypt.log. It reads: Permissions denied, even when I use sudo.

UPDATE :

I started from scratch. I am successful in getting the forms now.

I think the problem was during setting up the ComputeEngine instance, in the hostname I hadn't pointed to the right hostname. The instructions at https://docs.opendatakit.org/aggregate-google-cloud/ could be updated to avoid confusions on this part. The instructions for setting up the a freeDNS server is slightly misplaced. For someone following the setup tutorial step-by-step, there could be a pointer to prepare yourself for the hostname prior to creating the instance. I know that we have to place the static IP address later but caution users to visit the freeDNS server and have a hostname that they will use.

I recently decided to use the recommended digitalocean instead of app engine (mainly due to th inability to predict the costs). However, I am getting the same error as @anz. I followed the steps at https://docs.opendatakit.org/aggregate-digital-ocean/
However, I created the droplet even before I had a domain (hence what I entered in the field "Choose a hostname" is different from the domain I eventually created and on which the aggregate server is now installed). Right now, I am not able to download the forms I uploaded to aggregate even though I can see them. I keep getting the same error as above. Any tips on how to resolve the issue? As ever, thanks for the support

I managed to sort the problem out. Like @anz, I started from scratch. I deleted the old droplet and created a new one and this time round, in the section "Choose a hostname", I put the domain name. Everything now works great. I agree that the instruction at https://docs.opendatakit.org/aggregate-digital-ocean/#Create your Droplet are somewhat confusing to novice users. Anyways, thanks

What specifically was confusing? Any ideas on how we could make those instructions less confusing?

Hi, yaw, am of the view that you could clearly specify the domain needs to have been created already (pre-existing) and not in use by another website. Perhaps, am the one who didn't understand the instructions, but somehow I thought that I could just enter my desired domain which I would then create. I think that's where the confusion is especially for non-developers or if one is just new to these things. Good thing is that support from members on the forum often comes in quite quickly

A post was split to a new topic: Central: illegal character in path when getting blank form

Hi All, adding to this thread because I was recently struggling with the same error.

Initially I chose to deploy on Google Cloud, because I had used Google App Engine a few years ago for Aggregate and it seemed pretty straightforward. After struggling with the above form downloading error and not being able to resolve it after a few starts from scratch, I decided to have a go with Digital Ocean.

The Digital Ocean setup was definitely more straightforward, and I was able to get Aggregate deployed AND download forms to my phone! The key piece that is missing that the above commenters also mention is that when you go to create your Droplet/instance, you need to already have your free DNS domain name secured so that you can add that same specific name for the Droplet you are creating.

Adding a screenshot below to help illustrate to Yaw (who asked) and any others who might be interested in how to improve the step-by-step process. :slight_smile: