WebFaction
Community site: login faq

Hello,

What would be a proper settings to run djcelery at Webfcation?

Thanks,

zehi

asked 13 Jan '11, 20:16

zehi
112
accept rate: 0%

Hi Zehi,

Do you have something in particular that you are looking to find out? "Proper settings" is kind of vague.

(13 Jan '11, 20:27) klynton

Hi Klynton,

Yes, it runs well on my local machine but at webfaction it returs error bellow after starting the deamon:

[zehi@web1 factory]$ python manage.py celeryd [2011-01-13 20:08:45,868: WARNING/MainProcess] celery@web1.webfaction.com v2.1.4 is starting. [2011-01-13 20:08:45,869: WARNING/MainProcess] /home2/zehi/lib/python2.5/celery-2.1.4-py2.5.egg/celery/apps/worker.py:110: UserWarning: Using settings.DEBUG leads to a memory leak, never use this setting in a production environment! warnings.warn("Using settings.DEBUG leads to a memory leak, " [2011-01-13 20:08:45,870: WARNING/MainProcess]
Configuration -> . broker -> amqp://guest@localhost:5672/ . queues -> . celery -> exchange:celery (direct) binding:celery . concurrency -> 4 . loader -> djcelery.loaders.DjangoLoader . logfile -> [stderr]@WARNING . events -> OFF . beat -> OFF

[2011-01-13 20:08:45,906: WARNING/MainProcess] celery@web1.webfaction.com has started. [2011-01-13 20:08:45,912: ERROR/MainProcess] CarrotListener: Connection Error: (111, 'Connection refused'). Trying again in 2 seconds...

Thanks for an input

(13 Jan '11, 20:34) zehi

Hi,

It looks like you are trying to run it on port 5672 via user guest. I'm almost certain that the guest account is not a real account so this will not work and the port number that you've provided may already be in use. You will need to create a "Custom application listening on port" and use the port that you are assigned from that to run the celery server.

(13 Jan '11, 20:38) klynton

yes, you are right.

So far I put into the settings:

BROKER_HOST = "localhost" BROKER_PORT = 5672 BROKER_USER = "guest" BROKER_PASSWORD = "guest" BROKER_VHOST = "/"

and to project.wsgi:

os.environ["CELERY_LOADER"] = "django"

So, what you're saying is to change 'just' a port number?

How to start it then?

(13 Jan '11, 20:43) zehi

Hi,

You should change this to:

BROKER_HOST = "localhost" BROKER_PORT = port number from custom app BROKER_USER = "your user" BROKER_PASSWORD = "guest" BROKER_VHOST = "/"

Then start it just as you would normally.

(13 Jan '11, 20:51) klynton

Klinton, I did change the settings, create the custom app 'celery' with certain port number which I put to the settings, but don't how to start it now..

Could you be more specific about "..Then start it just as you would normally..."

Thanks a lot.

zehi

(13 Jan '11, 21:06) zehi

It looks like the command you ran to start it was:

python manage.py celeryd

so you should run that to start it again. Make sure to kill all of the running celery instances first so that your configuration changes are recognized.

(13 Jan '11, 21:14) klynton

still :-( the same error... I did start from django project directory and the also from new custom app 'celery' with /path/manage.py celery, ... but no success

I did try to change BROKER_USER = "your user" from 'zehi' to 'celery' ...

Klinton, have you some idea?

zehi

(13 Jan '11, 21:27) zehi

Hi,

I'm sorry if I wasn't clear before, BROKER_USER should be:

BROKER_USER="zehi"

not celery. Try changing the BROKER_HOST to 127.0.0.1. You can find some more information here:

http://celeryq.org/docs/django-celery/getting-started/first-steps-with-django.html

Especially the help command.

(13 Jan '11, 21:32) klynton

Not yet...

Here is my settings:

BROKER_HOST = "localhost" BROKER_PORT = 33391 #new custom port number BROKER_USER = "zehi" BROKER_PASSWORD = "guest" BROKER_VHOST = "/"

Shouldn't I change also BROKER_HOST = "localhost"?

Also, from which directory shall I use python manage.py celeryd ? From my django project or from the 'custom app' one ('celery')

Thanks for your time and help, Klinton.

PS: Error and command history:

[zehi@web1 celery]$ python /home2/zehi/webapps/django/factory/manage.py celeryd [2011-01-13 21:36:18,185: WARNING/MainProcess] celery@web1.webfaction.com v2.1.4 is starting. [2011-01-13 21:36:18,186: WARNING/MainProcess] /home2/zehi/lib/python2.5/celery-2.1.4-py2.5.egg/celery/apps/worker.py:110: UserWarning: Using settings.DEBUG leads to a memory leak, never use this setting in a production environment! warnings.warn("Using settings.DEBUG leads to a memory leak, " [2011-01-13 21:36:18,187: WARNING/MainProcess]
Configuration -> . broker -> amqp://zehi@localhost:33391/ . queues -> . celery -> exchange:celery (direct) binding:celery . concurrency -> 4 . loader -> djcelery.loaders.DjangoLoader . logfile -> [stderr]@WARNING . events -> OFF . beat -> OFF

[2011-01-13 21:36:18,218: WARNING/MainProcess] celery@web1.webfaction.com has started. [2011-01-13 21:36:18,223: ERROR/MainProcess] CarrotListener: Connection Error: (111, 'Connection refused'). Trying again in 2 seconds...

(13 Jan '11, 21:41) zehi

Try using 127.0.0.1 as the BROKER_HOST. Have you set the password to be guest? If not it may not work correctly.

(13 Jan '11, 22:52) klynton

No success still... I can't find a proper settings. Some more ideas?

Does someone get it up and running here at Webfaction?

(14 Jan '11, 07:46) zehi

I've seen numerous users using RabbitMQ and Celery. I'm not certain where their settings differ from yours. The error you are getting shows that Celery is starting but the CarrotListener is getting a connection error. Have you configured RabbitMQ to talk to Celery?

(15 Jan '11, 20:18) klynton
showing 5 of 13 show 8 more comments
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×909
×21
×2

question asked: 13 Jan '11, 20:16

question was seen: 5,751 times

last updated: 15 Jan '11, 20:18

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM