On 6/28/21 2:02 PM, Sarah H wrote:
I'm having an issue with the mailman web logs (/opt/mailman/web/logs/uwsgi-error.log) spamming the below:
20:53:44 [Q] ERROR Failed [rebuild_mailinglist_cache_for_month] - MailingList matching query does not exist. : Traceback (most recent call last): File "/opt/mailman/venv/lib64/python3.6/site-packages/django_q/cluster.py", line 436, in worker res = f(*task["args"], **task["kwargs"]) File "/opt/mailman/venv/lib64/python3.6/site-packages/hyperkitty/tasks.py", line 79, in _rebuild_mailinglist_cache_for_month mlist = MailingList.objects.get(name=mlist_name) File "/opt/mailman/venv/lib64/python3.6/site-packages/django/db/models/manager.py", line 82, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) File "/opt/mailman/venv/lib64/python3.6/site-packages/django/db/models/query.py", line 417, in get self.model._meta.object_name hyperkitty.models.mailinglist.MailingList.DoesNotExist: MailingList matching query does not exist. ... I do not have a list named "MailingList".
hyperkitty.models.mailinglist.MailingList.DoesNotExist is the name of the exception. MailingList refers to the hyperkitty.models.mailinglist.MailingList class. It is not the name of a list.
The actual code is
def _rebuild_mailinglist_cache_for_month(mlist_name, year, month):
try:
mlist = MailingList.objects.get(name=mlist_name)
except MailingList.DoesNotExist:
log.warning('MailingList with name %s does not exist', mlist_name)
return
mlist.cached_values["participants_count_for_month"].rebuild(year,
month)
Thus, there should be a warning level log message
MailingList with name xxx does not exist
Identifying the list name. This will be in Django's log which is probably not /opt/mailman/web/logs/uwsgi-error.log, but may be /opt/mailman/web/logs/mailmansuitelog. It is defined in settings(_local).py as the value of LOGGING['handlers']['file']['filename']
I'm not sure how this issue comes about. I suspect it comes from a task
that was created before some list was deleted and the task is being
continuously retried because it fails. What does your Django admin
qinfo
command show?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan