The postgres configuration was wrong -- apparently. This prevented the uwsgi server from running. Not knowing exactly what the problem is I deleted all references to the database from the docker-compose.yaml hoping it would default properly to sqlite. uwsgi came up and responded but this error occurred:
# docker exec 19ced2aa2c1d sh -c "cat /opt/mailman-web-data/logs/mailmanweb.log" ... sqlite3.OperationalError: no such table: django_site
So I reverted back the original postgres directives in the yaml hoping that my changes (setting the password is all I changed) were what caused the problem. But that simply reverted to the original failure to connect to postgres.
On Mon, Dec 21, 2020 at 4:12 PM <matthew@alberti.us> wrote:
You might have to add a '*' to the ALLOWED_HOSTS variable, or at least whatever the public facing IP is. I did this by creating 'settings_local.py' in /opt/mailman/web (the path for the mailman-web static files, etc.), and placing the below in there.
ALLOWED_HOSTS = [ '*' ]
I think there is a situation (perhaps apache specific) where the calls to the archiver end up coming from the pubic IP and not localhost, or the host IP from docker's perspective. I think the error you are seeing is reflecting this... but I can't quite recall 100% what the error was when I ran into it.
- Matt Alberti
-----Original Message----- From: James Bowery <jabowery@gmail.com> Sent: Monday, December 21, 2020 12:14 AM To: Abhilash Raj <maxking@asynchronous.in> Cc: matthew <matthew@alberti.us>; Mailman users < mailman-users@mailman3.org> Subject: [MM3-users] Re: Equivalent Apache2 Directives for Those From the Docker Nginx Documentation?
root@debian:~# docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' 805aee38f07c 172.19.199.3 root@debian:~# docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' 85657afa9a82 172.19.199.2 root@debian:~# docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' cd330ce8bb1f 172.19.199.4
On Sun, Dec 20, 2020 at 10:39 PM Abhilash Raj <maxking@asynchronous.in> wrote:
Can you get IP addresses each container is listening at and see if they match the expected IPs?
Try running:
docker inspect -f
'{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' container_name_or_id
For each of the containers listed.
Abhilash
On Mon, Dec 21, 2020, at 10:05 AM, James Bowery wrote:
root@debian:~# telnet 172.19.199.3 8000 Trying 172.19.199.3... telnet: Unable to connect to remote host: Connection refused root@debian:~# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 805aee38f07c maxking/mailman-web:0.3 "docker-entrypoint.s…" 7 hours ago Up 7 hours 8000/tcp, 8080/tcp mailman-web 85657afa9a82 maxking/mailman-core:0.3 "docker-entrypoint.s…" 7 hours ago Up 7 hours 8001/tcp, 8024/tcp mailman-core cd330ce8bb1f postgres:9.6-alpine "docker-entrypoint.s…" 7 hours ago Up 7 hours 5432/tcp docker-mailman_database_1 root@debian:~# docker exec 805aee38f07c netstat -nl Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 127.0.0.11:35793 0.0.0.0:* LISTEN udp 0 0 127.0.0.11:50586 0.0.0.0:* Active UNIX domain sockets (only servers) Proto RefCnt Flags Type State I-Node Path root@debian:~#
On Sun, Dec 20, 2020 at 10:16 PM Abhilash Raj <maxking@asynchronous.in> wrote:
On Mon, Dec 21, 2020, at 9:45 AM, Abhilash Raj wrote:
On Mon, Dec 21, 2020, at 4:20 AM, James Bowery wrote:
Thanks. That configuration worked for me -- at least to the point
that I
got this in my apache error log, which means the proxy pass was working:
[Sun Dec 20 22:45:02.548267 2020] [proxy:error] [pid 18049] (111)Connection refused: AH00957: uwsgi: attempt to connect to 172.19.199.3:8080 (172.19.199.3) failed [Sun Dec 20 22:45:02.548294 2020] [:error] [pid 18049] [client ....:59424] AH10101: failed to make connection to backend: 172.19.199.3:8080
Are you able to confirm that the Web container is running at 172.19.199.3? Perhaps, try connecting at port 800 via Curl or something
I meant, Port 8000.
and see if you get a valid HTML back?
On Mon, Dec 14, 2020 at 10:03 PM <matthew@alberti.us> wrote:
James, This is what I put in my apache2 conf for the mailman
#Mailman3 Web Configuration Alias /favicon.ico /opt/mailman/web/static/hyperkitty/img/favicon.ico
Alias /static /opt/mailman/web/static <Directory /opt/mailman/web/static> Require all granted </Directory>
ProxyPassMatch ^/static ! ProxyPassMatch ^/favicon.ico ! ProxyPass / uwsgi://172.19.199.3:8080/
I don't believe I did anything to uwsgi's conf. One
thing I
did
notice is that the '/' on the end of the 'ProxyPass' command (last
virtual host: line) is
relevant. I think it didn't work right without it.
I am interested to hear from others if that
configuration is complete. It works as far as I know.
- Matt Alberti
-----Original Message----- From: James Bowery <jabowery@gmail.com> Sent: Monday, December 14, 2020 8:27 PM To: mailman-users@mailman3.org Subject: [MM3-users] Equivalent Apache2 Directives for Those From the Docker Nginx Documentation?
The Docker documentation at:
https://asynchronous.in/docker-mailman/#dependencies
I've installed and enabled proxy_uwsgi for Apache and made a rough cut at a configuration for the lists.* subdomain in question but it's failing.
What follows are the document's Nginx directives for which I would greatly appreciate the Apache2 equivalents. I'm attempting to move a mailing list off of Yahoo groups onto my hosted server using an Apache2's virtual host on the 'lists' subdomain:
Setting up your web server:
# Nginx configuration. location / { # First attempt to serve request as file, then proxy_pass http://172.19.199.3:8000; include uwsgi_params; uwsgi_read_timeout 300; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $remote_addr; }
uwsgi:
# Nginx configuration. location / { # First attempt to serve request as file, then uwsgi_pass 172.19.199.3:8080; include uwsgi_params; uwsgi_read_timeout 300; }
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org
https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.o rg/
-- thanks, Abhilash Raj (maxking)
-- thanks, Abhilash Raj (maxking)
-- thanks, Abhilash Raj (maxking)
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/