On 8/8/21 6:44 AM, rrosner5@gmail.com wrote:
I just installed Mailman3-full from debian stable repository (Mailman 3.2.1 to be precise). Mailman itself is working, also are all mailing lists imported from Mailman 2.1. But I just can not get the web interface of Postorius to work.
Please see <https://wiki.list.org/x/12812344>.
I did manage to get it running through apache2 after I figured out what I had to remove from the old site config and replace it with the stuff in the automatically created config. Upon loading the site, I was able to log in and verify the mail address, but it kept showing that it wasn't able to connect to the REST API.
I double and triple checked, that mailman-web.py and mailman-hyperkitty.cfg contain the same API key (api_key in hyperkitty and SECRET_KEY and MAILMAN_ARCHIVER_KEY in mailman web), but that didn't help.
Because those aren't the settings that matter for this.
What if anything are your settings in the mailman.cfg [webservice] section for
hostname: port: admin_user: admin_pass: use_https:
(defaults in our distribution are localhost, 8001, restadmin, restpass and no respectively - I don't know if Debian changes these).
These need to match the Django settings
MAILMAN_REST_API_URL = 'http://localhost:8001' MAILMAN_REST_API_USER = 'restadmin' MAILMAN_REST_API_PASS = 'restpass'
I also saw a recommendation, that it can cause problems, when the API key uses symbols like / so I switched it to _ in all three places, but that didn't help. The configuration for mailman, mailman-web and hyperkitty all are set to using https, switching them to http doesn't solve any of the problems.
Meanwhile, the site only shows "Internal Server Error" even though I did not change anything. But probably not that relevant while it can't be used either way. What I can provide on logs:
/usr/share/mailman3-web/manage.py mmclient Python 3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole)
client.system Traceback (most recent call last): File "/usr/lib/python3/dist-packages/mailmanclient/restbase/connection.py", line 95, in call response, content = Http().request(url, method, data_str, headers) File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1513, in request (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey) File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1263, in _request (response, content) = self._conn_request(conn, request_uri, method, body, headers) File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1186, in _conn_request conn.connect() File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1049, in connect raise socket_err File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1010, in connect sock.connect((self.host, self.port)) ConnectionRefusedError: [Errno 111] Connection refused
The REST API is apparently not listening on the host/port this is trying to connest to.
An excerpt from /var/log/mailman3/web/mailman-web.log: Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 364, in execute_from_
command_line utility.execute() File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 308, in execute settings.INSTALLED_APPS File "/usr/lib/python3/dist-packages/django/conf/__init__.py", line 56, in __getattr__ self._setup(name) File "/usr/lib/python3/dist-packages/django/conf/__init__.py", line 41, in _setup self._wrapped = Settings(settings_module) File "/usr/lib/python3/dist-packages/django/conf/__init__.py", line 110, in __init__ mod = importlib.import_module(self.SETTINGS_MODULE) File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1006, in _gcd_import File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 677, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 728, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/usr/share/mailman3-web/settings.py", line 486, in <module> from settings_local import * File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 677, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 724, in exec_module File "<frozen importlib._bootstrap_external>", line 859, in get_code File "<frozen importlib._bootstrap_external>", line 916, in get_data PermissionError: [Errno 13] Permission denied: '/usr/share/mailman3-web/settings_local.py' [uwsgi-daemons] throttling "python3 manage.py qcluster" for 25 secondsnot sure where the Permission denied comes from/what permissions should be. /usr/share/mailman3-web/settings_local.py is a symlink owned by root to /etc/mailman3/mailman-web.py owned by list:list with 640 permission.
What is executing the manage.py command to start Django. Is it user list?
The apache2 error log contains nothing from the last restart of mailman3 and mailman3-web and trying to load the web page, the only interesting lines to the end of the log are [Sun Aug 08 14:40:33.642119 2021] [proxy:error] [pid 2248:tid 140583379425024] (111)Connection refused: AH02454: uwsgi: attempt to connect to Unix domain socket /run/mailman3-web/uwsgi.sock (localhost) failed [Sun Aug 08 14:40:33.644627 2021] [:error] [pid 2248:tid 140583379425024] [client 134.61.97.39:11893] AH10101: failed to make connection to backend: httpd-UDS:0 [Sun Aug 08 14:54:22.555229 2021] [proxy:error] [pid 2248:tid 140583379425024] (111)Connection refused: AH02454: uwsgi: attempt to connect to Unix domain socket /run/mailman3-web/uwsgi.sock (localhost) failed [Sun Aug 08 14:54:22.555293 2021] [:error] [pid 2248:tid 140583379425024] [client 134.61.97.39:11913] AH10101: failed to make connection to backend: httpd-UDS:0 [Sun Aug 08 14:58:24.376278 2021] [mpm_event:notice] [pid 2247:tid 140583610946688] AH00492: caught SIGWINCH, shutting down gracefully [Sun Aug 08 14:58:34.534966 2021] [mpm_event:notice] [pid 3696:tid 140070763447424] AH00489: Apache/2.4.48 (Debian) OpenSSL/1.1.1d mod_wsgi/4.6.5 Python/3.7 configured -- resuming normal operations [Sun Aug 08 14:58:34.535159 2021] [core:notice] [pid 3696:tid 140070763447424] AH00094: Command line: '/usr/sbin/apache2'
I don't use uwsgi and know little about it so I don't know what the Unix domain socket /run/mailman3-web/uwsgi.sock connection is for, but this appears to be some miscunfiguration between apache and uwsgi.
Normally, in an apache/uwsgi configuration, apache proxies to uwsgi via tcp port 8000 and uwsgi is configured with
[uwsgi] uwsgi-socket = 0.0.0.0:8000
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan