ODK Aggregate points to inaccessible localhost address

What is the problem? Please be detailed.
I am trying to run an ODK aggregate server through the VM. When I import and run the VM through VMware Fusion Pro 11 everything resolves fine. When I get to the Welcome to ODK Aggregate VM v2.0.0 screen the address displayed is http://localhost:8080. I cannot access this address on my Mac (Mojave). If I change the network type from NAT to bridged in VMware nothing changes (even after several restarts of system/VM), which is odd as it should replace the localhost address with the new address within the network.

I also tried ODK Aggregate VM 1.7.1, the problem is exactly the same.

The area I will work in has no internet access so setting it up through a cloud server is not possible (I would also be hesitant regarding privacy issues). I want to use the VM to have a cable-free way to put new versions of the survey on tablets running ODK collect, and to take the data off.

What ODK tool and version are you using? And on what device and operating system version?
ODK Aggregate VM 2.0.0 / ODK Aggregate VM 1.7.1
macOS Mojave
VMware Fusion Pro 11.0.2

What steps can we take to reproduce the problem?
I think this will be difficult to reproduce, as the problem is likely in my network setup.

What you have you tried to fix the problem?
Switching to a different version of the ODK aggregate VM, several reboots.

Thanks a lot for any help!

Paul Hofman

When you switch to bridged, our assumption is that your host machine (your Mac) is on an a network that can assign you an IP via DHCP. Is that assumption true in your case?

What happens if you switch to bridged, log into the VM, and run ip address. Do you the same kind of IP address as on your Mac?

Thanks so much Yaw!

My Mac is on a university network, which I assume would have no problem assigning IPs (although the VM does not have my instutional login, so perhaps not). I have also repeated all steps when my mac is connected to a small router we plan to use in-field, and that definitely has DHCP running.

When I run the ip address command I get a number of lines as output, but the important one (I think) is inet 127.0.0.1/8 scope host lo. This is not the IP address my mac gets assigned, I think it basically means localhost as well. The output is the same if I run the VM in bridged mode or NAT.

I also tried Virtualbox. When I import the VM there I get the error Failed to import appliance, with Result code: NS_ERROR_INVALID_ARG (0x80070057)

My next step is to try this on a mac with an older operating system (Sierra).

I've played around with this some more. On my own machine I also tried Parallels (after converting it with ovftool (as here: https://kb.parallels.com/eu/122835). This led to the exact same results.

I then tried Virtualbox on a different mac running Sierra. I was able to import the 2.0.0 VM succesfully here, and could also run it. I was even able to connect to the web interface using the localhost address (not the alternative IP address that was provided). However, when I switched to bridged networking on Virtualbox I did not get another IP address, not on my institution's wifi or on a separate router, so I would still not be able to access the server from a tablet connected to the same Wifi.

I'll play with this mac on Sierra some more, and then try yet another mac running Mojave to see if the problem might be Mojave-related

Hi, @Hofmanpaul,

This is strange: a recent VirtualBox should import the OVA file without giving any errors.

In any case, it looks like you've been able to link it to your Mac's macOS version, right?

When you switch to bridge mode, you need to run a command to change the configuration of the software running on the VM. Did you run aggregate-config in the command line of your VM?

Hi Guillermo,

So virtualbox did throw an error on my mac running Mojave, but it worked without problem's on two of my colleague's macs (one running Sierra, the other also running Mojave) so that appears to be an error on my end.

I was following this guide (https://docs.opendatakit.org/aggregate-vm/), that under "Connecting to the VM from external apps" indeed states that I should run the aggregate-config command. However, first in step 3 the VM should give me an IP address, that then feeds into the aggregate-config command. The IP address never changes on my end, it remains stuck at http://localhost:10080.

After some more playing I managed to get Virtualbox working. I think the problem might have been that I installed it through Homebrew (a package manager for mac). Before installing Virtualbox I also ran the Virtualbox deinstall tool that is provided by the installer.

When I ran the 2.0.0 VM in Virtualbox in bridged mode it assigned it a separate IP, and I was able to connect to it with ODK collect (after running the aggregate-config command). So it looks like this is fixed!

I'm unsure what the problem was. I'm currently on my home Wifi connection, so the issue might be in DHCP as Yaw suspected. However, VMware Fusion still won't assign a separate IP when running the VM even on my home connection, so the problem might also be in VMWare Fusion. It might even be both.

1 Like

Glad it's working! We don't test with VMWare or Parallels because they aren't free. VirtualBox is free and does a reasonable enough job on every OS.

The VM can probably be made to work on VMWare and we'd welcome contributions to the codebase to make that happen.

1 Like