On May 10, 2021, at 8:11 PM, Stephen J. Turnbull <turnbull.stephen.fw@u.tsukuba.ac.jp> wrote:
Michela via Mailman-users writes:
The log file, /opt/mailman/web/logs/uwsgi-error.log, contains the following stack trace, however. Note the bit toward the bottom: "ModuleNotFoundError: No module named 'settings'"
Given that you can run the applications from the command line as systemd services, this almost certainly localizes the problem to uwsgi itself. Note that uwsgi has been problematic lately. I don't recall the details. I think there's a preference for gunicorn as the SGI provider among the Mailman 3 developers (and it's what core uses internally to provide the REST interface) so uwsgi may not get "beta" testing in production from us.
Specifically, is this line
pythonpath = /etc/mailman3/
present, correct, and not commented out in uswgi.ini?
My configuration files outside of the Mailman virtual environment are in /etc/mailman/:
Is it possible you have /etc/mailman/ instead of /etc/mailman3/ in uwsgi.ini as in the above quote? (I am pretty sure that's a typo in the post, but gotta check everything.) On the other hand, maybe we did a typo, and there should be no trailing slash on /etc/mailman3 in this statement. (Usually trailing slashes aren't a problem, applications mostly ignore them, but there is no trailing slash on any directory in my sys.path, so it's worth a try.)
Yeah, it would be good to share the full contents of /etc/mailman3/uwsgi.ini, for some reason what is listed in the docs1 is working on one of my test servers. Although, given that there are more than one reports of the same error, it is possible something is wrong or missing in the docs.
The trailing slashes in this case isn’t really a problem I think.
If you can share some initial parts of your uwsgi-error.log part where uwsgi initializes that would be useful too. I am looking something that looks like this:
*** Starting uWSGI 2.0.19.1 (64bit) on [Thu Jan 21 08:49:16 2021] ***
compiled with version: 9.3.0 on 21 January 2021 08:40:15
os: Linux-5.4.0-1036-azure #38-Ubuntu SMP Wed Jan 6 18:26:25 UTC 2021
nodename: mailman
machine: x86_64
clock source: unix
detected number of CPU cores: 2
current working directory: /opt/mailman3
detected binary path: /opt/mailman3/venv/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
your processes number limit is 15571
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to TCP address 127.0.0.1:8000 fd 8
Python version: 3.8.5 (default, Jul 28 2020, 12:59:40) [GCC 9.3.0]
PEP 405 virtualenv detected: /opt/mailman3/venv/
Set PythonHome to /opt/mailman3/venv/
Python main interpreter initialized at 0x56002ba3aed0
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 166688 bytes (162 KB) for 2 cores
*** Operational MODE: threaded ***
added /etc/mailman3/ to pythonpath.
WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x56002ba3aed0 pid: 715893 (default app)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 715893)
spawned uWSGI worker 1 (pid: 715897, cores: 2)
[uwsgi-daemons] spawning "mailman-web qcluster" (uid: 1001 gid: 1001)
08:49:18 [Q] INFO Q Cluster december-nebraska-helium-montana starting.
08:49:18 [Q] INFO Process-1:1 ready for work at 715904
08:49:18 [Q] INFO Process-1:2 ready for work at 715905
Please ignore that the paths in my logs are /opt/mailman3/*
, I have
multiple installations on my test server, the docs say it should be /opt/mailman/*
. It
doesn’t really matter as long as they are consistent in all places.
Also, what happens if you run the command "/opt/mailman/venv/bin/mailman-web qcluster” as a “mailman” user on your machine? Do you see the traceback like above or does it start a process like this?
mailman@mailman:~$ /opt/mailman3/venv/bin/mailman-web qcluster
05:05:29 [Q] INFO Q Cluster april-east-hot-potato starting.
05:05:29 [Q] INFO Process-1:1 ready for work at 3364005
05:05:29 [Q] INFO Process-1:2 ready for work at 3364006
05:05:29 [Q] INFO Process-1 guarding cluster april-east-hot-potato
05:05:29 [Q] INFO Process-1:3 monitoring at 3364007
05:05:29 [Q] INFO Q Cluster april-east-hot-potato running.
05:05:29 [Q] INFO Process-1:4 pushing tasks at 3364008
If it's none of the above, I'm out of ideas. Maybe Mark or Abhilash has more experience.
Steve
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/
-- thanks, Abhilash Raj (maxking)