Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CentOS celeryd script $PATH reset by /etc/init.d/functions, cannot find python #1472

Closed
RacingTadpole opened this issue Jul 16, 2013 · 2 comments

Comments

@RacingTadpole
Copy link

commented Jul 16, 2013

Hi,

I am using the celeryd script for CentOS (https://github.com/celery/celery/tree/3.0/extra/centos/), with config settings for Django.
I found that /etc/init.d/functions resets the PATH:

# Set up a default search path.
PATH="/sbin:/usr/sbin:/bin:/usr/bin"
export PATH

This then means that celeryd cannot find python later on, and it throws an error.

I have worked around this manually by using in celeryd the rather ugly:

PREVPATH=$PATH
source /etc/init.d/functions 
PATH=$PREVPATH
export PATH

And this seems to work.

@ask

This comment has been minimized.

Copy link
Contributor

commented Oct 9, 2013

I'm not quite sure why the centos script sets such a restrictive path, but maybe this is a convention there?

Usually you will provide an absolute path to the worker program, is there any reason why you cannot do that?

@ask

This comment has been minimized.

Copy link
Contributor

commented Oct 22, 2013

In /etc/sysconfig/celeryd, you should set the absolute path to celeryd-multi:

CELERYD_MULTI="/path/to/celeryd-multi"

@ask ask closed this Oct 22, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.