Unable to connect to ODK server

Hello everyone,
I already installed odk-x endpoint on a VM a few weeks ago and everything was working normally. Wednesday I tried to synchronize my phone with the server but nothing. I noticed that I could no longer connect to the ODK server and that even when using the correct credentials, there is always the incorrect password or username error. I restarted Docker several times but still nothing. So I decided to do a new installation because we did not yet have any data on the server.
While reinstalling, I noticed that when I got to the mvn clean install step, it took hours to complete and even after that, it ended with an error saying either that the name of the database container was already taken, or there was a problem connecting to the database. I did several installations and each time I got these errors.
Finally I was able to finish the installation by putting mvn clean install -DskipTests instead of mvn clean install. But after creating a user with gid 503, I still do not have access to the ODK-X server. I wanted to know what could have caused this because I didn’t have this problem during my first installation a few weeks ago.

It is hard to figure this out with the current information. My first guess is did the VM run out of disk space?

There is still 470G of space on the disk. What information can I provide you?

You should look if all the docker containers are running or if one keeps restarting. If it does look at the logs to see why the container is having issues.

The containers have been running for two days and none of them have restarted since. In syslog, there is this line that repeats itself odk dockerd[37816]: time="2024-03-03T18:39:09.405828558Z" level=info msg="NetworkDB stats odk(17fc83815fbd) - netID:03hprri8m8yt0zbq5hevwa4i3 leaving:false netPeers:1 entries:7 Queue qLen:0 netMsg/s:0"

That is informational logging. You want to look for an error.

At this point, can you explain the problem behavior in detail. I am not sure what the issue is.

I will reproduce the error and take a screenshot of it.

This is what the mvn clean install command return during the database test

Ahh, yes, that is a known issue and fixed in the next release. I thought you were talking about issues once it’s running. You should always have -DskipTests at this point until the release.

Here is the command our scripts use to build which should be even faster:

The script will be updated with the next release.

I used the command and everything was installed without any problem but still cannot connect to the ODK-X server. I looked at the database container logs and found this

PostgreSQL Database directory appears to contain a database; Skipping initialization

LOG:  database system was shut down at 2024-03-03 21:30:32 UTC
LOG:  MultiXact member wraparound protections are now enabled
LOG:  autovacuum launcher started
LOG:  database system is ready to accept connections
FATAL:  password authentication failed for user "odk"
DETAIL:  Role "odk" does not exist.
        Connection matched pg_hba.conf line 95: "host all all all md5"
LOG:  incomplete startup packet

Is it a problem ?

The fact that “odk” does not exist is a problem. Not sure why it’s skipping database initialization. Check the volumes in docker. We use the same name of docker volumes to easily recover.

This is the result of the docker volume ls
Capture d'Ă©cran 2024-03-04 170344

For some reason that i don’t know, the ODK-X server is now working poperly. I can now login to the server and see the tables. Thanks for your help and time

2 Likes