Error when installing ODK Sync Endpoint on Digital Ocean droplet

Hello. Following the guide, I could install successfully ODK Sync Endpoint on localhost.
I then tried to do the same on a Digital Ocean droplet with Docker preinstalled (Docker version 18.06.1 on Ubuntu 18.04). However step 4 of the guide (mvn clean install) fails, and the log message says that the postgres-test fails (see full log attached). However I am unable to understand what the problem is. Could you please help me?
log.txt (53.0 KB)

postgres-test is only used for testing.

You could try “mvn -pl sync-endpoint-docker-swarm clean install” as you only need the sync-endpoint-docker-swarm image to be available for the rest of the setup to work. The other parts are simply testing to ensure no new bugs are introduced in development.

the -pl switch on maven lets you specify which subproject you want to build.

Thank you so much, executing the command you gave me indeed allowed to complete the installation.
However, on Step 10, are we supposed to create the field security.server.hostname in the file sync-endpoint-default-setup/config/sync-endpoint/security.properties, since it doesn’t exist?

Basically after following the instructions, what worked on localhost does not work in the Digital Ocean droplet. I get a 502 bad gateway error when trying to access the server. What am I doing wrong?

Hi,

Step 10 and step 11 are optional. You could manually supply the hostname and the ports but they get picked up automatically from the HTTP request header.

Hello, thanks for your reply. The problem is that even if I skip steps 10 and 11, I still end up with a 502 bad gateway error when trying to access the server. Any idea what could have gone wrong?

502 usually means that Sync Endpoint or Sync Endpoint Web UI is still starting up.

Do you mean I should just wait longer? I honestly don’t think this is the problem because after several hours there was still no progress.

A docker container not successfully booting can point you at the problem. If a docker container dies during boot the swarm will restart it.

Use the command “docker ps” to see how the long the containers have been running.

You can use “docker logs” to see why a container is failing (if that is the problem). Here is the documentation on docker logs: docker logs | Docker Documentation