ChrisC
ChrisC

Reputation: 916

dotcloud celery permission denied

I am attempting to use celery in my django application so that I can run a background process that imports a CSV file into the one of my models databases. This works fine on my local machine running a celery worker using:

python manage.py celery worker --loglevel=info

and RabbitMQ

rabbitmq-server

This is the error I receive once I push to dotcloud

workers.0    celery.platforms.LockFailed: [Errno 13] Permission denied: '/celeryev.pid'

EDIT:

supervisord.conf

[program:djcelery]
command = /home/dotcloud/env/bin/python /home/dotcloud/current/cellhelmet/manage.py celeryd -E -l info -c 2
stderr_logfile = /var/log/supervisor/%(program_name)s_error.log
stdout_logfile = /var/log/supervisor/%(program_name)s.log

[program:celerycam]
command = /home/dotcloud/env/bin/python /home/dotcloud/current/cellhelmet/manage.py     celerycam
stderr_logfile = /var/log/supervisor/%(program_name)s_error.log
stdout_logfile = /var/log/supervisor/%(program_name)s.log

Upvotes: 1

Views: 2047

Answers (2)

ChrisC
ChrisC

Reputation: 916

The issue was that I had removed this line from the supervisord.conf file:

directory = /home/dotcloud/current/cellhelmet

That caused it to search from the root directory i'm assuming which gave me the permission denied error. It certainly cleared it up for me though.

Upvotes: 0

Ken Cochrane
Ken Cochrane

Reputation: 77365

It looks like you are trying to write a pid file to / which makes sense why you would get a permission denied.

What do you have for a value for CELERYD_PID_FILE ?

Try setting it to one of these options

CELERYD_PID_FILE="/var/log/supervisor/%n.pid" CELERYD_PID_FILE="/home/dotcloud/"

More info about your config options can be found here: http://ask.github.com/celery/cookbook/daemonizing.html

If that doesn't work can you let us know how you are kicking off the command and send along any configuration (supervisord.conf, etc) and scripts you are using to run celery.

Upvotes: 1

Related Questions