Django celery beat DBAccessError

I run django + celery with celerybeat and I get this error

.../local/lib/python2.7/site-packages/celery/beat.py", line 367, in setup_schedule writeback=True) File "/usr/lib/python2.7/shelve.py", line 239, in open return DbfilenameShelf(filename, flag, protocol, writeback) File "/usr/lib/python2.7/shelve.py", line 223, in __init__ Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback) File "/usr/lib/python2.7/anydbm.py", line 85, in open return mod.open(file, flag, mode) File "/usr/lib/python2.7/dbhash.py", line 18, in open return bsddb.hashopen(file, flag, mode) File "/usr/lib/python2.7/bsddb/__init__.py", line 364, in hashopen d.open(file, db.DB_HASH, flags, mode) DBAccessError: (13, 'Permission denied') [2014-11-05 06:39:20,901: INFO/MainProcess] mingle: all alone 

I used python manage.py celeryd -B to execute the celery bit. It seems that working celery is not a problem, but working celerybeat does not initialize. any suggestions as to where I can find the database that celery is trying to access?

I run django = 1.5 and django-celery == 3.1.10

+8
python celery django-celery
source share
1 answer

I asked too soon!

answering my question if someone else comes across the same question.

The problem was that I did not have write permission in the folder in which my django project was running.

from the documentation ( http://celery.readthedocs.org/en/latest/userguide/periodic-tasks.html#starting-the-scheduler )

Beat should store the last execution time of tasks in a local database file (by default - celerybeat-schedule), therefore write access in the current directory

fixed issue by running

 python manage.py celeryd -B -s /path/to/where/i/have/write-access/celerybeat-schedule 

Hope this helps someone.

+17
source share

All Articles