2

I'm trying to set up a celery task queue with celerybeat for periodic updates on a database. My celeryd service seems to working perfectly but celerybeat keeps giving me a Connection error: [Errno 111]:

[2012-09-10 09:40:18,954: INFO/MainProcess] Celerybeat: Starting...
[2012-09-10 09:40:19,001: ERROR/MainProcess] Celerybeat: Connection error: [Errno 111] Connection refused. Trying again in 2.0 seconds...
[2012-09-10 09:40:22,004: ERROR/MainProcess] Celerybeat: Connection error: [Errno 111] Connection refused. Trying again in 4.0 seconds...
[2012-09-10 09:40:32,012: ERROR/MainProcess] Celerybeat: Connection error: [Errno 111] Connection refused. Trying again in 6.0 seconds...
[2012-09-10 09:40:53,030: ERROR/MainProcess] Celerybeat: Connection error: [Errno 111] Connection refused. Trying again in 8.0 seconds...
[2012-09-10 09:41:29,052: ERROR/MainProcess] Celerybeat: Connection error: [Errno 111] Connection refused. Trying again in 10.0 seconds...

Here's my celeryconfig file:

from celery.schedules import crontab
import datetime

BROKER_URL = 'mongodb://localhost:27017/tasks'
CELERY_RESULT_BACKEND = 'mongodb'
CELERY_MONGODB_BACKEND_SETTINGS = {
    "host": "127.0.0.1",
    "port": 27017,
    "database": "celery",
    "taskmeta_collection": "celery_taskmeta",
}

CELERYBEAT_SCHEDULE = {
    'update-linked-calendars': {
        'task': 'tasks.initiateUpdate',
        'schedule': crontab(minute=0, hour='*/1')
    },
}

CELERY_IMPORTS = ('tasks',)

I've been working on this for a long time and am still confused as to why I am getting this error. I don't have a user/password for my MongoDB (using it perfectly for my application). Any help would be greatly appreciated!

skarim
  • 95
  • 1
  • 7
  • just to confirm the `mongod` is up and running on localhost. What does `mongo` give you from that box? – Ross Sep 10 '12 at 11:55
  • try this answer: http://stackoverflow.com/questions/6499268/mongodb-connection-refused – andrean Sep 10 '12 at 12:03
  • @andrean my mongo installation is from the 10gen repo. – skarim Sep 10 '12 at 20:15
  • @Ross mongod is working perfectly...i can connect to the mongo shell and is is working perfectly for my other applications. the problem seems to be with just celery. – skarim Sep 10 '12 at 20:16
  • the link to the answer mentioned that the issue may be fixed by: "Edit the configuration files and if it contains the line bind_ip = 127.0.0.1 or bind_ip = localhost, comment it out." – andrean Sep 11 '12 at 06:08

0 Answers0