SSL error? docker compose and init works flawlessly but cannot connect to RDM home page even with wget locally #57
Replies: 10 comments 10 replies
-
@ivanbishop caddy is picky about ports 80 and 443 as it uses them to automatically generate SSL certificates using letsencrypt, or his own thing if it is localhost (which letsencrypt doesn't support). The InvenioRDM project uses https even when running locally. So this Docker Compose conflicts with your Apache server running locally. For a setup running in AWS caddy might not be the best option as SSL termination is provided by the AWS Application Load Balancer. |
Beta Was this translation helpful? Give feedback.
-
You can also put this at the top (outside of
|
Beta Was this translation helpful? Give feedback.
-
Still, in an AWS setup you wouldn't really need Caddy. I also don't use it in production (where I use fly.io). |
Beta Was this translation helpful? Give feedback.
-
nginx is obviously fine and many people prefer it over caddy, but the configuration is more complicated for running Docker Compose. And invenio-rdm-starter has to be opinionated, I can't support the multiple options for everything out there. You can use the docker compose and nginx configuration provided by |
Beta Was this translation helpful? Give feedback.
-
Agreed too many irons in the fire otherwise Martin, I'll persevere with Caddy as your builds are excellent. Once I figure out how to install a commercial cert I'll document it here if that's OK. Others may find it useful (when letsencrypt isn't viable for reputational reasons). |
Beta Was this translation helpful? Give feedback.
-
That sounds good. I like Caddy but have to better understand how to configure/reuse certs. Installing a commercial cert is certainly supported. |
Beta Was this translation helpful? Give feedback.
-
hello martin, what admin username/pass do you use in your Postgres setup in your docker runs? thanks |
Beta Was this translation helpful? Give feedback.
-
db: sorry... :0 |
Beta Was this translation helpful? Give feedback.
-
hello Martin, I hope you have a little time to look over the attached log (log.txt) file from a compose up (with no -d) and let me know if there any blindingly terminal/obvious errors. Attaching the Caddyfile , docker-compose and log out from from "compose up" Trying to get some attention from the team at Caddy but no takers yet Caddyfile.txt Many thanks |
Beta Was this translation helpful? Give feedback.
-
Please close out this discussion Martin. I'll open a new one NOW I have commercial certs and NON 80/443 ports working with Caddy (after a lot of help from them) I see some errors from the invenio side that I know you will be able to help with IF you have time |
Beta Was this translation helpful? Give feedback.
-
My docker ps -a looks like
(invenio) root@lxxxxxx:~# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2e156ece7e28 ghcr.io/front-matter/invenio-rdm-starter:latest "gunicorn invenio_ap…" 10 minutes ago Up 10 minutes 5000/tcp invenio-rdm-starter-web-1
063c1ad53dfa ghcr.io/front-matter/invenio-rdm-starter:latest "celery -A invenio_a…" 19 minutes ago Up 10 minutes 5000/tcp invenio-rdm-starter-worker-1
2c997284a211 postgres:16.4-bookworm "docker-entrypoint.s…" 19 minutes ago Up 10 minutes 0.0.0.0:5432->5432/tcp, :::5432->5432/tcp invenio-rdm-starter-db-1
847dec28a7dc caddy:2.8.1 "caddy run --config …" 19 minutes ago Up 10 minutes 80/tcp, 443/tcp, 0.0.0.0:1443->1443/tcp, :::1443->1443/tcp, 2019/tcp, 443/udp, 0.0.0.0:7080->7080/tcp, :::7080->7080/tcp invenio-rdm-starter-proxy-1
4ccc03e56a7a opensearchproject/opensearch:2.9.0 "./opensearch-docker…" 19 minutes ago Up 10 minutes 0.0.0.0:9200->9200/tcp, :::9200->9200/tcp, 9300/tcp, 0.0.0.0:9600->9600/tcp, :::9600->9600/tcp, 9650/tcp invenio-rdm-starter-search-1
572bcbd0154b valkey/valkey:7.2.5-bookworm "docker-entrypoint.s…" 19 minutes ago Up 10 minutes 0.0.0.0:6379->6379/tcp, :::6379->6379/tcp invenio-rdm-starter-cache-1
LSOF of ports looks like (I have apache on 80 and 443 by default)
I've mapped Invenio to 7080 and 1443
(invenio) root@lxxxx:~# lsof -i:80
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
apache2 831 root 4u IPv6 7282 0t0 TCP *:http (LISTEN)
apache2 1130640 www-data 4u IPv6 7282 0t0 TCP *:http (LISTEN)
apache2 1186290 www-data 4u IPv6 7282 0t0 TCP *:http (LISTEN)
apache2 1186294 www-data 4u IPv6 7282 0t0 TCP *:http (LISTEN)
apache2 1193477 www-data 4u IPv6 7282 0t0 TCP *:http (LISTEN)
apache2 1195474 www-data 4u IPv6 7282 0t0 TCP *:http (LISTEN)
apache2 1204241 www-data 4u IPv6 7282 0t0 TCP *:http (LISTEN)
apache2 1205876 www-data 4u IPv6 7282 0t0 TCP *:http (LISTEN)
apache2 1216045 www-data 4u IPv6 7282 0t0 TCP *:http (LISTEN)
apache2 1258163 www-data 4u IPv6 7282 0t0 TCP *:http (LISTEN)
apache2 1258244 www-data 4u IPv6 7282 0t0 TCP *:http (LISTEN)
(invenio) root@lxxxxxx:~# lsof -i:443
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
apache2 831 root 8u IPv6 7290 0t0 TCP *:https (LISTEN)
ssm-agent 1329 root 14u IPv4 2290878 0t0 TCP ip-172-31-38-35.eu-central-1.compute.internal:37586->52.94.141.25:https (ESTABLISHED)
apache2 1130640 www-data 8u IPv6 7290 0t0 TCP *:https (LISTEN)
apache2 1186290 www-data 8u IPv6 7290 0t0 TCP *:https (LISTEN)
apache2 1186294 www-data 8u IPv6 7290 0t0 TCP *:https (LISTEN)
apache2 1193477 www-data 8u IPv6 7290 0t0 TCP *:https (LISTEN)
apache2 1195474 www-data 8u IPv6 7290 0t0 TCP *:https (LISTEN)
apache2 1204241 www-data 8u IPv6 7290 0t0 TCP *:https (LISTEN)
apache2 1205876 www-data 8u IPv6 7290 0t0 TCP *:https (LISTEN)
apache2 1216045 www-data 8u IPv6 7290 0t0 TCP *:https (LISTEN)
apache2 1258163 www-data 8u IPv6 7290 0t0 TCP *:https (LISTEN)
apache2 1258244 www-data 8u IPv6 7290 0t0 TCP *:https (LISTEN)
(invenio) root@lxxxxx:~# lsof -i:7080
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
docker-pr 1273293 root 4u IPv4 2470714 0t0 TCP *:7080 (LISTEN)
docker-pr 1273316 root 4u IPv6 2470723 0t0 TCP *:7080 (LISTEN)
(invenio) root@lxxxxx:~# lsof -i:1443
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
docker-pr 1273270 root 4u IPv4 2472966 0t0 TCP *:1443 (LISTEN)
docker-pr 1273281 root 4u IPv6 2472116 0t0 TCP *:1443 (LISTEN)
wget https://0.0.0.0:1443
curl -v -k --proto '=https' --tlsv1.2 https://0.0.0.0:1443
openssl version -a
I have altered docker compose to maker caddy listen at 7080 and 1443
If I browse from the internet I see BI-DIRECTIONAL traffic to /from port 7080(http) or 1443 (https) but just get NO connection
HOSTS ALLOW looks like
docker-compose.yml: - INVENIO_APP_ALLOWED_HOSTS=${INVENIO_APP_ALLOWED_HOSTS:-['172.31.38.35','AWS.EIP-address','0.0.0.0', 'localhost', '127.0.0.1','FQDN']}
Any ideas?
Anything to do with openssl/openssl#24810
Beta Was this translation helpful? Give feedback.
All reactions