*<< I sent this to the mailman3 issues on gitlab and Mark replied but asked me to move to this list, so I copied everything and inserted responses. I hope this makes sense and someone can help me.>>*
After a lengthy power failure I had to reboot a machine that has been running for several years. the WEB-UI does not seem to be able to see mailman-core. I have looked for log entries that might explain what the issue is and I am stumped to even find logs that will update when I get an error on the browser. Mailman is definitely running, postgres is running and mailman web is running. if I go to the lists page I see lists, if I try to access a specific list I get Server error: An error occurred while processing your request.
I looked in /var/logs/mailman /opt/mailman/web/mailmanweb
All I can find is:
django.urls.exceptions.NoReverseMatch: Reverse for 'list_unsubscription_requests' not found. 'list_unsubscription_requests' is not a valid view function or pattern name.16688 ERROR 2023-09-12 13:56:58,430 1760 django.request Internal Server Error: /mailman3/lists/goodstein.goodstein.org/ File "/opt/mailman/venv/lib64/python3.8/site-packages/haystack/admin.py", line 8, in <module> from django.utils.translation import ungettextImportError: cannot import name 'ungettext' from 'django.utils.translation' (/opt/mailman/venv/lib64/python3.8/site-packages/django/utils/translation/__init__.py)
Also I have to run mailman from "mailman start" because the systemctl returns this:
● mailman3.service - GNU Mailing List Manager Loaded: loaded (/etc/systemd/system/mailman3.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Tue 2023-09-12 10:06:31 EDT; 13s ago Process: 31159 ExecStart=/opt/mailman/venv/bin/mailman start (code=exited, status=1/FAILURE) CPU: 806msSep 12 10:06:31 mail mailman[31159]: Error in atexit._run_exitfuncs:Sep 12 10:06:31 mail mailman[31159]: Traceback (most recent call last):Sep 12 10:06:31 mail mailman[31159]: File "/usr/lib64/python3.8/logging/__init__.py", line 2126, in shutdownSep 12 10:06:31 mail mailman[31159]: h.flush()Sep 12 10:06:31 mail mailman[31159]: File "/opt/mailman/venv/lib64/python3.8/site-packages/mailman/core/logging.py", line 67, in flushSep 12 10:06:31 mail mailman[31159]: if self._stream:Sep 12 10:06:31 mail mailman[31159]: AttributeError: 'ReopenableFileHandler' object has no attribute '_stream'Sep 12 10:06:31 mail systemd[1]: mailman3.service: Control process exited, code=exited, status=1/FAILURESep 12 10:06:31 mail systemd[1]: mailman3.service: Failed with result 'exit-code'.Sep 12 10:06:31 mail systemd[1]: Failed to start GNU Mailing List Manager.
Please tell me where to start looking or adjusting.
Reply from Mark Sapiro,* Edited to include responses:*
Mark Sapiro <https://gitlab.com/msapiro>@msapiro <https://gitlab.com/msapiro>· 1 day ago <https://gitlab.com/mailman/mailman-web/-/issues/23#note_1557601916> Owner Add reaction More actions
The mailman-users@mailman3.org list is probably a more appropriate place for issues like this.
django.urls.exceptions.NoReverseMatch: Reverse for 'list_unsubscription_requests' not found. 'list_unsubscription_requests' is not a valid view function or pattern name. 16688 ERROR 2023-09-12 13:56:58,430 1760 django.request Internal Server Error: /mailman3/lists/ goodstein.goodstein.org/
/opt/mailman/venv/lib64/python3.8/site-packages/postorius/urls.py should contain
re_path( r'^unsubscription_requests$',
list_views.list_unsubscription_requests, name='list_unsubscription_requests', ),
Y
*Yes this exists*
and /opt/mailman/venv/lib64/python3.8/site-packages/postorius/views/list.py should define list_unsubscription_requests.
*Yes there is a method by this name defined*
File "/opt/mailman/venv/lib64/python3.8/site-packages/haystack/admin.py", line 8, in from django.utils.translation import ungettext ImportError: cannot import name 'ungettext' from 'django.utils.translation' (/opt/mailman/venv/lib64/python3.8/site-packages/django/utils/translation/ *init*.py)
See https://docs.djangoproject.com/en/4.2/internals/deprecation/#deprecation-rem...
ungettext() is removed from django>=4.0
Sep 12 10:06:31 mail mailman[31159]: AttributeError: 'ReopenableFileHandler' object has no attribute '_stream'
I don't understand this one offhand, but what is the content of /etc/systemd/system/mailman3.service, in particular the settings for User, Group and ExecStart?
*The service looks right:*
1 [Unit] 2 Description=GNU Mailing List Manager 3 After=syslog.target network.target postgresql.service 4 5 [Service] 6 Type=forking 7 PIDFile=/opt/mailman/mm/var/master.pid 8 User=mailman 9 Group=mailman 10 ExecStart=/opt/mailman/venv/bin/mailman start 11 ExecReload=/opt/mailman/venv/bin/mailman restart 12 ExecStop=/opt/mailman/venv/bin/mailman stop 13 14 [Install] 15 WantedBy=multi-user.target
*It seems I may have two versions of the mailman script:*
mail:/opt/mailman # which mailman /usr/bin/mailman mail:/opt/mailman # ls -al /usr/bin/mailman -rwxr-xr-x 1 root root 382 May 10 2021 /usr/bin/mailman mail:/opt/mailman # ls -al /opt/mailman/venv/bin/mailman -rwxr-xr-x 1 mailman mailman 231 Sep 12 10:02 /opt/mailman/venv/bin/mailman
Somehow, your installation is corrupted. I don't know how
*I need to know what to remove, how to correctly update, etc., That said the two scripts appear to be very similar:*
mail:/opt/mailman # head /usr/bin/mailman
#!/usr/bin/python3 # EASY-INSTALL-ENTRY-SCRIPT: 'mailman==3.3.4','console_scripts','mailman' __requires__ = 'mailman==3.3.4' 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(
mail:/opt/mailman # head /opt/mailman/venv/bin/mailman #!/opt/mailman/venv/bin/python3 # -*- coding: utf-8 -*- import re import sys from mailman.bin.mailman import main if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) sys.exit(main()) mail:/opt/mailman #
*Given the two years since the last reboot I also tried following * https://docs.mailman3.org/en/latest/upgrade-guide.html *to make sure I was running the latest*
pip install -U mailman postorius django-mailman3 hyperkitty mailman-web