On 10/21/22 09:56, Onyeibo Oku wrote:
On Fri, 21 Oct 2022 09:52:03 -0700 Mark Sapiro <mark@msapiro.net> wrote:
Can you successfully start mailman (or run any mailman commands) with, e.g. ``` /opt/mailman/venv/bin/mailman start
or
/opt/mailman/venv/bin/mailman info
without activating the venv?
Yes. All those are working without activating venv.
On my test installation with /etc/systemd/system/mailman3.service installed per https://docs.mailman3.org/en/latest/install/virtualenv.html#starting-mailman...
systemctl start|stop|status mailman3
all work. Assuming
python3 -c 'from pkg_resources import load_entry_point'
(not in your venv) returns no error, try replacing /opt/mailman/venv/bin/mailman with
#!/opt/mailman/venv/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'mailman==3.3.5','console_scripts','mailman'
__requires__ = 'mailman==3.3.5'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(
load_entry_point('mailman==3.3.5', 'console_scripts', 'mailman')()
)
Or in yours posted at
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/...
replace everything from the first try:
through
globals().setdefault(...)
with
from pkg_resources import load_entry_point
and see if that helps. Actually, if I replace mine with yours, it still works with systemctl, but this may be dependent on the python version (mine is 3.8.10). I'm really only guessing here, but this in your traceback
Oct 19 19:52:03 mail.server.tld mailman[782]: File
"/opt/mailman/venv/bin/mailman", line 25, in importlib_load_entry_point
Oct 19 19:52:03 mail.server.tld mailman[782]: return
next(matches).load()
Oct 19 19:52:03 mail.server.tld mailman[782]: StopIteration
Oct 19 19:52:03 mail.server.tld systemd[1]: mailman3.service: Control
process exited, code=exited, status=1/FAILURE
seems to say that the return next(matches).load()
is raising
StopIteration
and that is the issue, so removing that stuff from
/opt/mailman/venv/bin/mailman may help.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan