ODK-X Sync Endpoint - Cannot access web-ui/login

Hi everyone,

1. What is the problem? Be very detailed.
I’ve been trying to setup ODK sync-endpoint on DigitalOcean using the Python script following this guide. The installation seemed to have worked correctly, all 7 services were running under syncldap and I’m able to access the ldap-service and create a sample user account. But trying to access http://[ip-address]/web-ui/login or http://[ip-address]/odktables/default/privilegesInfo in Chrome gives a connection refused error.

2. What app or server are you using and on what device and operating system? Include version numbers.
I used the Python script for DigitalOcean. Installed on Ubuntu 18.04.3.

3. What you have you tried to fix the problem?
I’ve tried a clean install using the same script on another droplet. I’ve tried a manual install using Docker on another DigitalOcean droplet. And I’ve tried installing it on my local machine. All ran into the same problem: able to access https://127.0.0.1:40000 but can’t access http://127.0.0.1 or web-ui. I’ve also tried disabling my local firewall.

Because the installation was very simple with very few steps, I’m not sure where I could’ve gone wrong. I’d really appreciate your help.

Thank you.

One thing to try is:

If you are unable to log in, you may need to take the docker stack down and bring it back up again. That can be done with the following commands below:
$ docker stack rm syncldap
$ docker stack deploy -c /root/sync-endpoint-default-setup/docker-compose.yml syncldap

It’s at the very end of the directions here:
https://docs.opendatakit.org/odk-x/sync-endpoint-setup/
And solved this problem for me last time it occurred.

Thank you for your response, @elmps2018

I forgot to mention that I did try taking the stack down and have tried it again after your suggestion but I’m still facing the same issue.

To be clear, I have not been able to reach the web-ui login page, so it’s not that I’m unable to log in, I’m unable to connect to the server at all with the exception of port 40000.

Thanks again for your suggestion.

Can your see if there is anything interesting in the logs from the container running the nginx server?
You can check it by finding the container id with
$ docker ps
and then type
$ docker logs [id of container running nginx]

Logs from the odk/sync-endpoint and odk/syn-web-ui containers might also contain useful information. If either of those container failed to start, the nginx container can only run in a degraded state.
If you can post the logs on here, it would be very helpful.

Hi @Emil and @linl33,

$ docker ps only lists 4 containers running odk/sync-endpoint, postgre, odk/phpldapadmin, and odk/openldap. So, I’m guessing the container running nginx and web-ui fail to start. Please see the log for the sync-endpoint container here: log.txt (43.2 KB)

Thank you guys for your help. I’m very excited to be learning more and playing around with ODK.

I ran in to this issue, I believe, as well. For me it was the issue of the web-ui maven repository no longer supporting http, but https.
I made a fork of the web-ui repo with https in the pom.xml and that fixed it right up for me.

My Fork GitHub - ojw713/sync-endpoint-web-ui: User interface module for the sync-endpoint

EDIT:
Was up late yesterday and thought it might be nice to be more thorough.

The command docker build --pull -t odk/sync-web-ui https://github.com/opendatakit/sync-endpoint-web-ui.git fails, but the setup scripts carry on.
In my case I was using an Azure setup, only noticed it because my dev Vagrant Ansible script was failing here.

[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.opendatakit:sync-endpoint-web-ui:1.0.0-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.5.10.RELEASE from/to central (http://repo.maven.apache.org/maven2): Transfer failed for http://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/1.5.10.RELEASE/spring-boot-starter-parent-1.5.10.RELEASE.pom 501 HTTPS Required and 'parent.relativePath' points at wrong local POM @ line 6, column 13
 @
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project org.opendatakit:sync-endpoint-web-ui:1.0.0-SNAPSHOT (/web-ui/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for org.opendatakit:sync-endpoint-web-ui:1.0.0-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.5.10.RELEASE from/to central (http://repo.maven.apache.org/maven2): Transfer failed for http://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/1.5.10.RELEASE/spring-boot-starter-parent-1.5.10.RELEASE.pom 501 HTTPS Required and 'parent.relativePath' points at wrong local POM @ line 6, column 13 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
The command '/bin/sh -c cd /web-ui/dependencies &&     . ./mvn_local_installs &&     cd /web-ui &&     mvn package -Dmaven.test.skip=true &&     mv target/sync-endpoint-web-ui-*.jar /sync-endpoint-web-ui.jar' returned a non-zero code: 1

If you watch the docker containers, the nginx container is running for several seconds, then crashes out.

2020/01/24 14:34:43 [emerg] 1#1: host not found in upstream "web-ui" in /etc/nginx/conf.d/default.conf:27
nginx: [emerg] host not found in upstream "web-ui" in /etc/nginx/conf.d/default.conf:27

Fixing the webui-ui container’s pom.xml file to address the 501 error.
Change the repro from
<url>http://repo.maven.apache.org/maven2</url>
to this
<url>https://repo.maven.apache.org/maven2</url>

Stop the swarm docker stack rm syncldap

Needing to use the updated pom.xml (until the opendatakit repo is fixed), replace the command
docker build --pull -t odk/sync-web-ui https://github.com/opendatakit/sync-endpoint-web-ui.git
with this one
docker build --pull -t odk/sync-web-ui https://github.com/ojw713/sync-endpoint-web-ui.git

Re-run the command
docker build --pull -t odk/sync-web-ui https://github.com/ojw713/sync-endpoint-web-ui.git
Then start the stack again
docker stack deploy -c sync-endpoint-default-setup/docker-compose.yml syncldap

Now the nginx container should be happy and stay running like it’s supposed to.

thank you :grinning:

Thank you so much @ojw713 for the detailed explanation!
I’m finally able to login. This is exciting!