For the past months we’ve been struggling to get specify7 up and running in a new server environment using docker. The servers run RHEL8. We’re using the just-specify setup. The database and asset server run on separate servers. All necessary ports have been opened for and between the servers.
We’ve gotten the webserver up and running several times, but somehow, and this is a recurrent issue, whenever all docker containers are restarted, it gives a 502 Bad Gateway error.
Looking at the containers shows the following:
[root@specifyweb01fl specify]# docker compose ps
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
specify-nginx-1 docker.io/nginx "/docker-entrypoint.…" nginx 3 hours ago Up 3 hours 0.0.0.0:80->80/tcp, :::80->80/tcp
specify-redis-1 docker.io/redis:6.0 "docker-entrypoint.s…" redis 3 hours ago Up 3 hours 6379/tcp
specify-report-runner-1 docker.io/specifyconsortium/report-runner "/docker-entrypoint.…" report-runner 3 hours ago Up 3 hours 8080/tcp
specify-specify7-1 docker.io/specifyconsortium/specify7-service:v7 "/opt/specify7/docke…" specify7 3 hours ago Up 3 hours 8000/tcp
specify-specify7-worker-1 docker.io/specifyconsortium/specify7-service:v7 "/opt/specify7/docke…" specify7-worker 3 hours ago Restarting (1) 42 seconds ago
For some reason, the specify7-worker keeps on wanting to restart. I am not sure why and if that is a problem…
Here follow the logs I picked out from the containers:
specify-specify7-1.log.2.txt (62.8 KB)
specify-redis-1.log.2.txt (1.4 KB)
specify-specify7-worker-1.log.2.txt (69.1 KB)
specify-report-runner-1.log.2.txt (15.4 KB)
specify-nginx-1.log.2.txt (2.4 KB)
There are errors reported in the logs for specify7-worker-1 and specify-specify7-1 that basically come down to the same thing:
requests.exceptions.ConnectionError: HTTPConnectionPool(host='specifyapp01fl.unicph.domain', port=8080)
So there is no connection to the web asset server on port 8080, which is strange, because the firewall should not be blocking this port and the site has worked before without us changing this condition. Also, checking on the web asset server itself we can the service is listening to port 8080 is up and running:
[root@specifyapp01fl specify]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ca2758643207 nginx:alpine "/docker-entrypoint.…" 13 days ago Up 13 days 0.0.0.0:80->80/tcp, :::80->80/tcp specify-nginx-1
929897907b78 specifyconsortium/specify-asset-service "/bin/sh -c 've/bin/…" 13 days ago Up 13 days 8080/tcp specify-asset-server-1
This is the web asset server docker.compose.yml:
specifyapp01fl.docker-compose.yml (1.3 KB)
From the command line, I can also connect to the web asset server with no problems:
[root@specifyweb01fl specify]# curl http://specifyapp01fl.unicph.domain/web_asset_store.xml
<?xml version="1.0" encoding="UTF-8"?>
<urls>
<url type="read"><![CDATA[http://specifyapp01fl.unicph.domain:8080/fileget]]></url>
<url type="write"><![CDATA[http://specifyapp01fl.unicph.domain:8080/fileupload]]></url>
<url type="delete"><![CDATA[http://specifyapp01fl.unicph.domain:8080/filedelete]]></url>
<url type="getmetadata"><![CDATA[http://specifyapp01fl.unicph.domain:8080/getmetadata]]></url>
<url type="testkey">http://specifyapp01fl.unicph.domain:8080/testkey</url>
</urls>
But we cannot actually connect to the web asset server via port 8080:
[root@specifyweb01fl specify]# curl http://specifyapp01fl.unicph.domain:8080/testkey
curl: (7) Failed to connect to specifyapp01fl.unicph.domain port 8080: Connection refused
But why is the specify7 server trying to do that anyway? Isn’t the web asset server itself only supposed to access port 8080 or also specify7?
Anyways, I’ve asked our IT department to make sure that this port is open between these servers (from web01fl to app01fl)