Unable to access odk central using the URL

1. What is the problem? Be very detailed.
I am unable to access odk central via the URL I provided in the .env file. The URL central.smedigitalgh.com is supposed to load the odk central but instead loads another application on the server.
The other applications use nginx so I forwarded the docker-compose.yml file to look like this:
ports:
- "8081:80"
- "8082:443"
I am able to access the odk central using the IP. Because the URL is used in form submissions and other form operations, none of those work.

2. What app or server are you using and on what device and operating system? Include version numbers.
I am running ubuntu 18.04 on amazon ec2.
The server in nginx.
I have other applications running on the server

3. What you have you tried to fix the problem?

4. What steps can we take to reproduce the problem?
I tried changing the URL and the port number

5. Anything else we should know or have? If you have a test form or screenshots or logs, attach below.
The IP is https://18.184.20.6:8082
When I try to preview a form in the browser, I get an error in the image below

I restarted the process over and over and it's working with the domain now but unless I add the port to the url as central.smedigitalgh.com:8082

Now I need assistance connecting to our postgres server. The host is an IP and the port is 5354. I set that up following the instructions here https://docs.getodk.org/central-install-digital-ocean/#using-a-custom-database-server but login does not work. It says Something went wrong: the server returned an invalid error.

We expect Central to run on ports 80/443 and don't yet support other ports. We know folks want to run on other ports and have filed an issue to explore the possibility.

ODK Central with nonstandard port number and custom SSL: Cannot retrieve forms with Collect is a related topic that you might want to read for more information.

As to the custom DB server not working, run docker-compose logs --tail 50 and see what your logs say.

I finally got it to work.
The problem had to do with the custom ssl certificate.
I replaced the fullchain.pem file appropriately.
Then I stopped the docker compose service by running the command > docker-compose stop
Then I removed the stopped docker images with > docker rm $(docker ps -a -q)
Then docker-compose build
docker-compose up --no-start
docker-compose up -d
docker-compose ps

2 Likes

Dear @dohji ,
I am in reply asking for your further support beyond the solution you have posted as the solution hasn't worked for me mostly likely due to a small difference.

After updates to central 1.3.0 (on a digital ocean droplet server), central loads public access links successfully, but the link can not load the form successfully. After a while, the browser provides an error message similar to yours as below;

Indicates that could not connect with form server.
What could have gone wrong and how can it be sorted?

Appreciate.
Joseph