I see this error oin startup:
3:22:11 [Q] INFO Process-1:1 processing [rebuild_mailinglist_cache_for_month] 13:22:11 [Q] ERROR Failed [rebuild_mailinglist_cache_for_month] - MailingList matching query does not exist. : Traceback (most recent call last): File "/opt/mailman/mm/venv/lib/python3.7/site-packages/django_q-1.0.1-py3.7.egg/django_q/cluster.py", line 377, in worker res = f(*task['args'], **task['kwargs']) File "/opt/mailman/mm/venv/lib/python3.7/site-packages/HyperKitty-1.2.3-py3.7.egg/hyperkitty/tasks.py", line 79, in _rebuild_mailinglist_cache_for_month mlist = MailingList.objects.get(name=mlist_name) File "/opt/mailman/mm/venv/lib/python3.7/site-packages/Django-2.1.9-py3.7.egg/django/db/models/manager.py", line 82, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) File "/opt/mailman/mm/venv/lib/python3.7/site-packages/Django-2.1.9-py3.7.egg/django/db/models/query.py", line 399, in get self.model._meta.object_name hyperkitty.models.mailinglist.MailingList.DoesNotExist: MailingList matching query does not exist.
Latest build versions of everything.
Any pointers?
Andrew
Is there some way to add debug log statements into the offending code? Knowing the list name causing the problem would be a big help.
Andrew
On Tue, Jun 25, 2019, at 7:49 AM, andrew.bernard@gmail.com wrote:
I am running all the cron jobs, by the way. This one fails.
Did you delete some MailingLists after you created them? This seems to be coming from routine jobs which for some reason are running for mailing lists that have been deleted.
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/
-- thanks, Abhilash Raj (maxking)
Yes I did. So something is out of sync, the job are referring to lists no longer existing. What is this?
Andrew
On 6/25/19 4:08 PM, andrew.bernard@gmail.com wrote:
Yes I did. So something is out of sync, the job are referring to lists no longer existing. What is this?
I'm confused. The subject of this thread is 'Monthly job failure', but your original post said 'I see this error on startup:'
Perhaps you are confused in that the error occurs in 'rebuild_mailinglist_cache_for_month'. That is not a monthly job. That is a queued task to rebuild the cached data for a particular 'by month' view.
That task is queued whenever a post is added to update the monthly cache for the year and month of the date of the post, and whenever a thread is deleted to update the monthly cache for the year and month of the date the thread was active.
I'm guessing here, but I think you have a task queued for a list that no longer exists in HyperKitty.
Go to the Django web admin and look at the DJANGO Q section, particularly Queued tasks, but maybe the others too. Maybe there's a task you can delete.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Hi Mark. Indeed, I am confused. I am not yet familiar with Hyperkiity internals and code, and I must say it is currently like fog to me. :-)
Indeed, rebuild_mailinglist_cache_for_month made me think this was a monthly job.
I had made some lists and deleted them shortly thereafter. I managed to add some lines likes raise Exception(locals()) in some of the code, which revealed that a deleted list was being referred to. I have no idea how to purge this. I looked everywhere in every table in the database to find references to the deleted table, to no avail. I deleted all the queued, jobs in Django, to no avail. I rebooted three times to no avail (highly unscientific), And now, for no obvious reason, the error has stopped appearing. it definitely did not stop after deleting Django queued jobs - although perhaps something takes time to propagate, or there is something stuck cached in RAM?
It's nice that it stopped but I feel a bit uncomfortable that creating a list and deleting it a couple of hours later can cause the log to fill up every minute with these tracebacks. The exception raised in the code simply says <MailingList matching query does not exist>. It would be great if the error could name the list. I think that would be helpful. It would make it clearer to people what is happening at least, a lot faster. Python tracebacks don't show the values of local variables, unfortunately.
Andrew
On Wed, Jun 26, 2019, at 2:46 AM, andrew.bernard@gmail.com wrote:
Hi Mark. Indeed, I am confused. I am not yet familiar with Hyperkiity internals and code, and I must say it is currently like fog to me. :-)
Indeed, rebuild_mailinglist_cache_for_month made me think this was a monthly job.
I had made some lists and deleted them shortly thereafter. I managed to add some lines likes raise Exception(locals()) in some of the code, which revealed that a deleted list was being referred to. I have no idea how to purge this. I looked everywhere in every table in the database to find references to the deleted table, to no avail. I deleted all the queued, jobs in Django, to no avail. I rebooted three times to no avail (highly unscientific), And now, for no obvious reason, the error has stopped appearing. it definitely did not stop after deleting Django queued jobs - although perhaps something takes time to propagate, or there is something stuck cached in RAM?
It's nice that it stopped but I feel a bit uncomfortable that creating a list and deleting it a couple of hours later can cause the log to fill up every minute with these tracebacks. The exception raised in the code simply says <MailingList matching query does not exist>. It would be great if the error could name the list. I think that would be helpful. It would make it clearer to people what is happening at least, a lot faster. Python tracebacks don't show the values of local variables, unfortunately.
The delete functionality isn't completely implemented yet and part of the problem lies in the way MailingList, Thread and Email objects are created in Hyperkitty.
What you need to know is that once a MailingList has been created, several (routine and event based) tasks are added up in a queue. If at the time those tasks are ready to be executed, the mailinglist has gone away, it prints those errors. IMO, it is mostly harmless, but I can see so much of errors in logs would be worrisome to users.
Right now, errors are logged unconditionally, but it is possible to
filter them to skip MailingList does not exist errors
altogether.
Ofcourse, that is not the ideal solution, but I think it should at least stop the exceptions from being logged when us or the user can't do anything about it.
Andrew
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/
-- thanks, Abhilash Raj (maxking)
participants (3)
-
Abhilash Raj
-
andrew.bernard@gmail.com
-
Mark Sapiro