Daily Cronjob fails
Hey hey,
I applied a recent Update from Debian Buster, und this night a received an email about a failing cronjob.
The traceback can be reproduced using:
# sudo -u www-data flock -n /var/run/mailman3-web/cron.daily /usr/share/mailman3-web/manage.py runjobs daily
ERROR OCCURED IN DAILY JOB: sync_mailman (APP: hyperkitty)
START TRACEBACK:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
psycopg2.IntegrityError: null value in column "description" violates not-null constraint
DETAIL: Failing row contains (2, hb-events@hackbrettl.de, hb-events, null, [hb-events] , 1, 2015-10-22 09:54:53.684306+00, hb-events.hackbrettl.de).
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/django_extensions/management/commands/runjobs.py", line 36, in runjobs
job().execute()
File "/usr/lib/python3/dist-packages/hyperkitty/jobs/sync_mailman.py", line 35, in execute
sync_with_mailman()
File "/usr/lib/python3/dist-packages/hyperkitty/lib/mailman.py", line 131, in sync_with_mailman
mlist.update_from_mailman()
File "/usr/lib/python3/dist-packages/hyperkitty/models/mailinglist.py", line 192, in update_from_mailman
self.save()
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 808, in save
force_update=force_update, update_fields=update_fields)
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 838, in save_base
updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 905, in _save_table
forced_update)
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 955, in _do_update
return filtered._update(values) > 0
File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 667, in _update
return query.get_compiler(self.db).execute_sql(CURSOR)
File "/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 1204, in execute_sql
cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
File "/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 899, in execute_sql
raise original_exception
File "/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 889, in execute_sql
cursor.execute(sql, params)
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/usr/lib/python3/dist-packages/django/db/utils.py", line 94, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/lib/python3/dist-packages/django/utils/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
django.db.utils.IntegrityError: null value in column "description" violates not-null constraint
DETAIL: Failing row contains (2, hb-events@hackbrettl.de, hb-events, null, [hb-events] , 1, 2015-10-22 09:54:53.684306+00, hb-events.hackbrettl.de).
END TRACEBACK
Appearently there is something wrong with the database. Is there anything what I can do about this? Running the migrations doesn't help:
# sudo -u www-data flock -n /var/run/mailman3-web/cron.daily /usr/share/mailman3-web/manage.py migrate
Operations to perform:
Apply all migrations: account, admin, auth, contenttypes, django_mailman3, django_q, hyperkitty, postorius, sessions, sites, socialaccount
Running migrations:
No migrations to apply.
Thanks! Stefan
On Wed, 2019-02-27 at 07:37 +0100, Stefan Tatschner wrote:
Hey hey,
I applied a recent Update from Debian Buster, und this night a received an email about a failing cronjob.
Hmm. Buster only has Hyperkitty 1.2.1 right now. So I manually applied:
0019_auto_20190127_null_description.py
Now it works. Strange. Sorry for the noise.
Stefan
I am seeing the same error with the Hyperkitty installed from packages on Ubuntu 19.
In order to apply that patch, should I install hyperkitty from git myself?
On 6/7/19 7:19 PM, andrew.bernard@gmail.com wrote:
I am seeing the same error with the Hyperkitty installed from packages on Ubuntu 19.
In order to apply that patch, should I install hyperkitty from git myself?
Assuming your hyperkitty installation includes
hyperkitty/migrations/0018_threadcategory_color.py all you should need
to do is get
hyperkitty/migrations/0019_auto_20190127_null_description.py from gitlab
and put it in your hyperkitty/migrations/ directory and run manage.py migrate
to apply it.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (3)
-
andrew.bernard@gmail.com
-
Mark Sapiro
-
Stefan Tatschner