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

Celery worker not starting, *Unrecoverable error* #1679

Closed
alexprengere opened this issue Nov 22, 2013 · 4 comments
Closed

Celery worker not starting, *Unrecoverable error* #1679

alexprengere opened this issue Nov 22, 2013 · 4 comments

Comments

@alexprengere
Copy link

I just installed Celery v3.1.5 on Linux-2.6.34.9-69.fc13.x86_64-x86_64-with-fedora-13-Goddard. Fedora 13 uses Python 2.6.4.
After creating a minimalist task using Redis 2.6 as broker, I try to launch the worker, and get this error.

[ERROR/MainProcess] Unrecoverable error: TypeError('__init__() keywords must be strings',)
Traceback (most recent call last):
  File "/home/robb/.local/lib/python2.6/site-packages/celery/worker/__init__.py", line 212, in start
    self.blueprint.start(self)
  File "/home/robb/.local/lib/python2.6/site-packages/celery/bootsteps.py", line 123, in start
    step.start(parent)
  File "/home/robb/.local/lib/python2.6/site-packages/celery/bootsteps.py", line 373, in start
    return self.obj.start()
  File "/home/robb/.local/lib/python2.6/site-packages/celery/worker/consumer.py", line 270, in start
    blueprint.start(self)
  File "/home/robb/.local/lib/python2.6/site-packages/celery/bootsteps.py", line 123, in start
    step.start(parent)
  File "/home/robb/.local/lib/python2.6/site-packages/celery/worker/consumer.py", line 789, in start
    c.loop(*c.loop_args())
  File "/home/robb/.local/lib/python2.6/site-packages/celery/worker/loops.py", line 72, in asynloop
    next(loop)
  File "/home/robb/.local/lib/python2.6/site-packages/kombu/async/hub.py", line 333, in create_loop
    cb(*cbargs)
  File "/home/robb/.local/lib/python2.6/site-packages/kombu/transport/redis.py", line 822, in on_readable
    self._callbacks[queue](message)
  File "/home/robb/.local/lib/python2.6/site-packages/kombu/transport/virtual/__init__.py", line 502, in _callback
    message = self.Message(self, raw_message)
  File "/home/robb/.local/lib/python2.6/site-packages/kombu/transport/virtual/__init__.py", line 232, in __init__
    super(Message, self).__init__(channel, **dict(kwargs, **fields))
TypeError: __init__() keywords must be strings

A few remarks:

  • I can launch the same worker with no problems on another machine I have, running Linux-3.8.13-100.fc17.x86_64-x86_64-with-fedora-17-Beefy_Miracle, using Python 2.7.3
  • Celery installation went fine on both machines
  • I tried a few days ago with Celery 3.1.4 and got the exact same results.
ask added a commit to celery/kombu that referenced this issue Nov 22, 2013
@ask
Copy link
Contributor

ask commented Nov 22, 2013

Thanks! Please try the patch above

@alexprengere
Copy link
Author

Thank for you very fast answer! I tried the above fix b7d6569fc19d3d6e6b552c14334a7f58497bd60e. It partially fixes the issue, since now I have a similar problem somewhere else:

[ERROR/MainProcess] Unrecoverable error: TypeError('on_heartbeat() keywords must be strings',)
Traceback (most recent call last):
  File "/home/robb/.local/lib/python2.6/site-packages/celery/worker/__init__.py", line 212, in start
    self.blueprint.start(self)
  File "/home/robb/.local/lib/python2.6/site-packages/celery/bootsteps.py", line 123, in start
    step.start(parent)
  File "/home/robb/.local/lib/python2.6/site-packages/celery/bootsteps.py", line 373, in start
    return self.obj.start()
  File "/home/robb/.local/lib/python2.6/site-packages/celery/worker/consumer.py", line 270, in start
    blueprint.start(self)
  File "/home/robb/.local/lib/python2.6/site-packages/celery/bootsteps.py", line 123, in start
    step.start(parent)
  File "/home/robb/.local/lib/python2.6/site-packages/celery/worker/consumer.py", line 789, in start
    c.loop(*c.loop_args())
  File "/home/robb/.local/lib/python2.6/site-packages/celery/worker/loops.py", line 72, in asynloop
    next(loop)
  File "/home/robb/.local/lib/python2.6/site-packages/kombu/async/hub.py", line 333, in create_loop
    cb(*cbargs)
  File "/home/robb/.local/lib/python2.6/site-packages/kombu/transport/redis.py", line 822, in on_readable
    self._callbacks[queue](message)
  File "/home/robb/.local/lib/python2.6/site-packages/kombu/transport/virtual/__init__.py", line 505, in _callback
    return callback(message)
  File "/home/robb/.local/lib/python2.6/site-packages/kombu/messaging.py", line 589, in _receive_callback
    return on_m(message) if on_m else self.receive(decoded, message)
  File "/home/robb/.local/lib/python2.6/site-packages/celery/worker/consumer.py", line 738, in on_message
    worker, created = self.update_state(subject, event)
  File "/home/robb/.local/lib/python2.6/site-packages/celery/events/state.py", line 355, in worker_event
    handler(**fields)
TypeError: on_heartbeat() keywords must be strings

@alexprengere
Copy link
Author

With the commit 4d230e2 you just referenced, it works ;). Thanks a lot for your support! I guess the next minor release will include those changes?

@ask
Copy link
Contributor

ask commented Nov 22, 2013

Yes! They will be included in the next bugfix release!

@ask ask closed this as completed Nov 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants