On 11/13/23 10:06, Lars Bjørndal wrote:
On Sun, Nov 12, 2023 at 08:07:59AM -0800, Mark Sapiro wrote:
for info. However, that script cannot be run as is by
mailman shell --run
. It can be run by invokingmailman shell
interactively and copying and pasting it,Yes, that worked, e.g. no error messages.
or if your Mailman is installed in a venv it can be run with the venv active by
python ./fix-doubled-entries.py
.I have mailman installed in venv, but got the following when trying that:
"python fix-doubled-entries.py" need the IListManager interface but can't find it.
I see that that's actually expected. In order to run that script with the Python in the venv, you'd need to add
from mailman.core import initialize
initialize.initialize()
to the script to properly set up the Zope components.
However, that script will not fix your issue because you don't have multiple mhonarc entries for a list. See https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/... and as it says, Tell us more about the "duplicate entries" error, and if possible copy it exactly from where you found it originally, including any traceback.
Here's the entries in the mailman.log file:
...
Nov 11 09:18:47 2023 (1715) Uncaught runner exception: Multiple rows were found when one or none was required Nov 11 09:18:47 2023 (1715) Traceback (most recent call last): File "/opt/mailman3/venv/lib64/python3.11/site-packages/mailman/core/runner.py", line 179, in _one_iteration self._process_one_file(msg, msgdata) File "/opt/mailman3/venv/lib64/python3.11/site-packages/mailman/core/runner.py", line 272, in _process_one_file keepqueued = self._dispose(mlist, msg, msgdata) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman3/venv/lib64/python3.11/site-packages/mailman/runners/outgoing.py", line 111, in _dispose self._func(mlist, msg, msgdata) File "/opt/mailman3/venv/lib64/python3.11/site-packages/mailman/mta/deliver.py", line 89, in deliver refused = agent.deliver(mlist, msg, msgdata) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman3/venv/lib64/python3.11/site-packages/mailman/mta/base.py", line 167, in deliver callback(mlist, message_copy, msgdata_copy) File "/opt/mailman3/venv/lib64/python3.11/site-packages/mailman/mta/decorating.py", line 32, in decorate decorator.process(mlist, msg, msgdata) File "/opt/mailman3/venv/lib64/python3.11/site-packages/mailman/handlers/decorate.py", line 250, in process process(mlist, msg, msgdata) File "/opt/mailman3/venv/lib64/python3.11/site-packages/mailman/handlers/decorate.py", line 73, in process for archiver in IListArchiverSet(mlist).archivers: ^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman3/venv/lib64/python3.11/site-packages/zope/component/_api.py", line 167, in adapter_hook return sitemanager.queryAdapter(object, interface, name, default) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman3/venv/lib64/python3.11/site-packages/zope/interface/registry.py", line 351, in queryAdapter return self.adapters.queryAdapter(object, interface, name, default) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman3/venv/lib64/python3.11/site-packages/mailman/database/transaction.py", line 106, in wrapper return function(args[0], config.db.store, *args[1:], **kws) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman3/venv/lib64/python3.11/site-packages/mailman/model/mailinglist.py", line 653, in __init__ ListArchiver.name == archiver_name).one_or_none() ^^^^^^^^^^^^^ File "/opt/mailman3/venv/lib64/python3.11/site-packages/sqlalchemy/orm/query.py", line 2769, in one_or_none return self._iter().one_or_none() # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman3/venv/lib64/python3.11/site-packages/sqlalchemy/engine/result.py", line 1813, in one_or_none return self._only_one_row( ^^^^^^^^^^^^^^^^^^^ File "/opt/mailman3/venv/lib64/python3.11/site-packages/sqlalchemy/engine/result.py", line 816, in _only_one_row raise exc.MultipleResultsFound( sqlalchemy.exc.MultipleResultsFound: Multiple rows were found when one or none was required Nov 11 09:18:47 2023 (1715) SHUNTING: 1699690727.810848+3b6f3baba5576f3d87d3ff392aba2715d4dda793
That does look like https://gitlab.com/mailman/mailman/-/issues/657, but your database query showed no duplicate mhonarc entries for a list. Possibly, it was a different archiver, or more likely considering
I don't know what fixed the problem, but when I did
mailman unshunt
the message went through.
it was already fixed when you queried the database.
Will mailman notify when there's shunted messages?
No. I run a daily cron that does ls -lAR /opt/mailman/mm/var/queue/
which lists the shunt queue and the others.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan