ODK Aggregate on Amazon Web Services EC2 and Windows Server

The platform:
• Amazon Web Services EC2 2GB t2.small Windows Server 2016 instance
• Installed Java SE Runtime Environment 8u192 (64-bit)
• Installed Tomcat 8.5.37 (64-bit), port 8080; ‘localhost:8080’ respond with Tomcat home page
• Enabled port 8080 via Inbound Rules on Windows Firewall (also enabled through AWS Security Group): Tomcat now responds on remote computer via :8080
• Installed PostgreSQL 10 and enabled its remote port (5432). It can be accessed successfully from a remote computer.
• Ran the ‘ODK-Aggregate-v1.7.1 Windows.exe’ Aggregate configurator. Pertinent screen that seems to be causing problems (‘Apache Tomcat Port Configuration):
o HTTP/1/1 Connection Port: 8080
o Internet-visible IP address or DNS name: <my EC2 IP address, e.g., ’12.34..56.78’>
• At the conclusion of the ODK configuration, the ODKAggregate.war file was copied over to the C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps folder, and renamed ‘ROOT.war’.
• Tomcat was re-started, and C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\ROOT folder now has various ‘aggregate…’ folders and files extracted from the ROOT.war archive.
• HOWEVER—‘localhost:8080’ now says “No webpage found for the web address: http://localhost:8080/”. Ditto trying to access it from a remote computer using ‘:8080’.

At one point in my flailings, I did manage to get a redirect message from localhost:8080 saying that ‘aggregate.html’ was not found.

The message from the HTML instructions page is obviously in error, as it advises to use the Internet-visible IP address to access the ODK Aggregate app—this address of course doesn’t work on the EC2 local server.

Can anyone spot what I may have left out? I’m fairly experienced using EC2 instances, and have working remote access links to programs like PostgreSQL and GeoServer. ODK Aggregate… not so much.

Thanks to anyone who can help. I’ll post the final working configuration documentation in a link once I get it going.

Rudy Stricklan

I answered my own question finally. Very dumb mistake, actually. In an initial run of the ODK-Aggregate-v1.7.1-Windows.exe configurator I specified the PostgreSQL database name to be 'odk'. When I started having difficulties, I re-ran the configurator using the default database name of 'odk-prod' (what difference could this have, right?-- the PostgreSQL database is already set up). Well, in checking with the Tomcat logs, I saw that there was an error complain about database 'odk-prod' not present. So having the correct database parameters specified in any subsequent run of the configurator is critical to developing a correct Tomcat .war archive file.

I'll post an Amazon EC2-Windows-PostgreSQL Aggregate setup as soon as possible.