Problem migrating from Ubuntu packaged Mailman to Virtualenv, including Hyperkitty
Hi everyone,
As we all know, mailman3 got dropped from Ubuntu 22. So I updated the operating system anyway, and decided to switch to a virtualenv setup, keeping the old Debian/Ubuntu database and log locations etc.
With some lumps and bumps, this has gone OK; the web interface appears to be working, and I can use the mailman CLI to manipulate the lists. So far so good.
However, there do seem to be two problems, which might be linked:
- If I send a message to my test list, it does not get sent on to any members. I can see the lmtp delivery to mailman. But nothing comes out again. I can see the two test messages in the “shunt” directory
- Trying to look in the archives for my mailing lists does not work. On the web, I get "An error occurred while processing your request.”, and the log file seems to show a schema error in the hyper kitty table:
ERROR 2022-07-07 13:18:41,634 116894 django.request Internal Server Error: /mailman3/archives/list/fairhaven-members@thecutts.org/ Traceback (most recent call last): File "/opt/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 86, in _execute return self.cursor.execute(sql, params) psycopg2.errors.UndefinedColumn: column hyperkitty_mailinglist.archive_rendering_mode does not exist LINE 1: ...e_policy", "hyperkitty_mailinglist"."created_at", "hyperkitt... ^
Do I need to run a database migration manually? If so, how? I’m not very familiar with Django, it seems a bit hideously complex to me.
Are these issues likely to be related, or do I have two things going on here?
Regards
Tim
On 7/7/22 8:12 AM, tim@thecutts.org wrote:
Hi everyone,
As we all know, mailman3 got dropped from Ubuntu 22. So I updated the operating system anyway, and decided to switch to a virtualenv setup, keeping the old Debian/Ubuntu database and log locations etc.
With some lumps and bumps, this has gone OK; the web interface appears to be working, and I can use the mailman CLI to manipulate the lists. So far so good.
However, there do seem to be two problems, which might be linked:
- If I send a message to my test list, it does not get sent on to any members. I can see the lmtp delivery to mailman. But nothing comes out again. I can see the two test messages in the “shunt” directory
Look in mailman.log. There will be exceptions and tracebacks associated with the shunted messages. What are these?
- Trying to look in the archives for my mailing lists does not work. On the web, I get "An error occurred while processing your request.”, and the log file seems to show a schema error in the hyper kitty table:
ERROR 2022-07-07 13:18:41,634 116894 django.request Internal Server Error: /mailman3/archives/list/fairhaven-members@thecutts.org/ Traceback (most recent call last): File "/opt/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 86, in _execute return self.cursor.execute(sql, params) psycopg2.errors.UndefinedColumn: column hyperkitty_mailinglist.archive_rendering_mode does not exist LINE 1: ...e_policy", "hyperkitty_mailinglist"."created_at", "hyperkitt... ^
Do I need to run a database migration manually? If so, how? I’m not very familiar with Django, it seems a bit hideously complex to me.
Yes. You need to run your Django admin command however you invoke it with the 'migrate' option. e.g. with your venv activated
django-admin migrate
or
python manage.py migrate
or ???
Are these issues likely to be related, or do I have two things going on here?
The shunted messages are not related to the Django migration issues.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Thanks Mark. The migration seems to have done the trick for the archive - thanks for the pointer. Given that I have mailman-web running as www-data in Debian-style, I had to use:
sudo -u www-data /opt/mailman/venv/bin/mailman-web migrate
But that did the trick, and my archives have reappeared, so thank you.
On 7 Jul 2022, at 19:35, Mark Sapiro <mark@msapiro.net> wrote:
On 7/7/22 8:12 AM, tim@thecutts.org wrote:
Hi everyone, As we all know, mailman3 got dropped from Ubuntu 22. So I updated the operating system anyway, and decided to switch to a virtualenv setup, keeping the old Debian/Ubuntu database and log locations etc. With some lumps and bumps, this has gone OK; the web interface appears to be working, and I can use the mailman CLI to manipulate the lists. So far so good. However, there do seem to be two problems, which might be linked:
- If I send a message to my test list, it does not get sent on to any members. I can see the lmtp delivery to mailman. But nothing comes out again. I can see the two test messages in the “shunt” directory
Look in mailman.log. There will be exceptions and tracebacks associated with the shunted messages. What are these?
Right, thanks for the pointer (there are so many separate log files, I’d been looking in the wrong one!)
Jul 07 17:17:44 2022 (117110) SHUNTING: 1657210664.44771+e859f37833c541df3582ea334ab4b7b016557f77 Jul 07 17:23:39 2022 (117110) Uncaught runner exception: no nameservers Jul 07 17:23:39 2022 (117110) Traceback (most recent call last): File "/opt/mailman/venv/lib/python3.10/site-packages/mailman/core/runner.py", line 176, in _one_iteration self._process_one_file(msg, msgdata) File "/opt/mailman/venv/lib/python3.10/site-packages/mailman/core/runner.py", line 269, in _process_one_file keepqueued = self._dispose(mlist, msg, msgdata) File "/opt/mailman/venv/lib/python3.10/site-packages/mailman/runners/incoming.py", line 79, in _dispose process(mlist, msg, msgdata, start_chain) File "/opt/mailman/venv/lib/python3.10/site-packages/mailman/core/chains.py", line 57, in process if link.rule.check(mlist, msg, msgdata): File "/opt/mailman/venv/lib/python3.10/site-packages/mailman/rules/dmarc.py", line 316, in check if maybe_mitigate(mlist, address): File "/opt/mailman/venv/lib/python3.10/site-packages/mailman/rules/dmarc.py", line 288, in maybe_mitigate answer = is_reject_or_quarantine( File "/opt/mailman/venv/lib/python3.10/site-packages/mailman/rules/dmarc.py", line 177, in is_reject_or_quarantine resolver = dns.resolver.Resolver() File "/opt/mailman/venv/lib/python3.10/site-packages/dns/resolver.py", line 758, in __init__ self.read_resolv_conf(filename) File "/opt/mailman/venv/lib/python3.10/site-packages/dns/resolver.py", line 850, in read_resolv_conf raise NoResolverConfiguration('no nameservers') dns.resolver.NoResolverConfiguration: no nameservers Jul 07 17:23:39 2022 (117110) SHUNTING: 1657211019.9355967+2e5a440ca577e112e092e03072660a4314f012eb
Purging the resolvconf package and configuring resolv.conf manually fixed that little issue.
Thanks again for the help
Tim
Are these issues likely to be related, or do I have two things going on here?
The shunted messages are not related to the Django migration issues.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
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/
participants (3)
-
Mark Sapiro
-
Tim Cutts
-
tim@thecutts.org