-
Notifications
You must be signed in to change notification settings - Fork 452
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
Error when starting a celery worker #228
Comments
I'm also getting this since I updated celery and billard. I run Windows, if that helps. |
@mpaf, are you also using Windows? |
Yes, sorry I forgot to mention. Windows 7 64 bit |
Happens for me too. Win7 64bit. |
I don't have access to Windows at the moment,
into:
(these lines: https://github.com/celery/celery/blob/3.0/celery/app/base.py#L418-L419) This should work as a workaround, and if celery was working before it shouldn't have any bad effects. |
It works for me, thanks! |
I can confirm this issue and that the change fix the error. Regards, |
Had the same problem here on win7 with redis backend... the suggested workaround fixed it |
I guess more faults should be expected when using celery on Windows since not all of the tests pass. They all pass in Ubuntu. Not sure about the severity of the failed tests though. |
I've been running Celery in production on a Windows 2003 server (py 2.7) for the last few years with no issues to be had, until now. |
@mpaf: Some of the tests fail simply because the test code is incompatible (but not the actual code) |
I solved this problem for myself by adding lines of code below after https://github.com/celery/celery/blob/3.0/celery/app/utils.py#L71 if isinstance(d, LazySettings):
dd = dict()
for k in dir(d):
attr = getattr(d._wrapped, k)
if not callable(attr) and k.isupper() and not k.startswith('_'):
dd[k] = attr
d = dd And don't forget to import LazySettings |
I can confirm this issue after upgrading from Celery 3.0.11 to 3.0.15 (Linux 64-bit), Django 1.4.0. |
Do not confirm that issue, after upgrade to 3.0.15 from 3.0.11 on both Django 1.4.0 and Django 1.4.3 (Linux x86_64) workers start without exception. Other packages: $ pip freeze *************** PICKED VERSIONS **************** |
Still happens for me with 3.0.15 on Windows 8 64bit. |
Any updates on this, its still occurring for me. It should be a one line fix. |
@orf could you try installing the 3.0 development branch?
@marcinn This is not a place for you to recruit users, you say rq is simple, I would be nice if I called it nave, I still 3.0.16 does solve this problem for non-windows users, but you may have to set CELERY_FORCE_EXECV=False if you have already set it to True. Hopefully the recent change in the 3.0 branch will fix it on Windows, but sadly I don't have access to a Windows license myself. |
Sorry @ask, but in my case Celery is unstable as far I remember (since 2.x). I upgraded to 3.x because of some critical bugs in 2.x. And I tried many versions, many configurations and my customer is still complaining for months ("mr. marcin, please kill the rabbit again"). I can't go to vacation, because I have to "kill rabbit" (stalled celery processes) almost every day. Installing new version isn't possible due this issue (is it?). I'm trapped. Maybe I'm too stupid or lazy to use Celery properly, or just should wait for stable release. But I can't wait more for critical updates, probably same as @orf. This is a business problem. Don't get me wrong and keep up good job. Maybe Celery is not yet stable as we need. |
Yes, I know about long-running workers so I added cron jobs for restarting workers periodically. But still have some kind of problems which I can't recognize properly. The problem is that I can't do experimens in live env and can't reproduce major problems (I/O blocking?) in dev env. The simplest and safest way is to update Celery (and wait for The Rabbit), but 20 days ago I was not able to do that. I'll give a next try with 3.0.16 in this week. Forking processes is a good feature for some (simple) cases and it's ok for me. |
@ask The 3.0 development branch worked for me on Windows. On a side note, I couldn't get pip to install celery using the command you provided so I had to manually unzip it to my site-packages. Thanks, and keep up the good work. |
I also had this problem on win7 64bit. pip uninstalled celery and django-celery, use the 3.0 branch above with pip install https://github.com/celery/celery/zipball/3.0, reinstalled django-celery, and it appears to be working. |
I've seen this on ubuntu 12.04/64-bit with django 1.5 and celery 3.0.16. The 3.0 branch had the same problem, downgrading to 3.0.11 fixed it for me. |
Well, I've just tried to upgrade Celery to 3.0.16 and I can't run workers anymore (known issue - ImportError: billiard.forking). I'm using buildout. billiard-2.7.3.22 I have no luck. Again. :( |
@marcinn Do you have FORCE_EXECV in your settings, or are you on Windows? |
@marcinn buildout is messing things up here, you could try adding PYTHONPATH=/path/to/buildout/lib to ensure the external programs get the right PATH, or if not on Windows use the |
I create a new python environment (Python 2.7) and install django 1.4.3 and django-celery 3.0.11 . I then cd into my django project where the first two lines of settings.py have:
INSTALLED_APPS contains 'djcelery'
When I run:
I get the following error:
-------------- celery@MIGUEL-PC v3.0.15 (Chiastic Slide)
---- **** -----
--- * *** * -- [Configuration]
-- * - **** --- . broker: amqp://guest@localhost:5672//
-- ******* ---- . celery: exchange:celery(direct) binding:celery
--- ***** -----
[2013-02-13 15:40:58,119: ERROR/MainProcess] Unrecoverable error: TypeError("'LazySettings' object is not iterable",)
Traceback (most recent call last):
File "C:\Python27\Lib\site-packages\celery\worker__init__.py", line 351, in start
component.start()
File "C:\Python27\Lib\site-packages\celery\concurrency\base.py", line 111, in start
self.on_start()
File "C:\Python27\Lib\site-packages\celery\concurrency\processes__init__.py", line 80, in on_start
**self.options)
File "C:\Python27\Lib\site-packages\billiard\pool.py", line 845, in init
self._create_worker_process(i)
File "C:\Python27\Lib\site-packages\billiard\pool.py", line 915, in _create_worker_process
w.start()
File "C:\Python27\Lib\site-packages\billiard\process.py", line 119, in start
self._popen = Popen(self)
File "C:\Python27\Lib\site-packages\billiard\forking.py", line 336, in init
dump(process_obj, to_child, HIGHEST_PROTOCOL)
File "C:\Python27\Lib\site-packages\billiard\forking.py", line 127, in dump
ForkingPickler(file, protocol).dump(obj)
File "C:\Python27\lib\pickle.py", line 224, in dump
self.save(obj)
File "C:\Python27\lib\pickle.py", line 331, in save
self.save_reduce(obj=obj, *rv)
File "C:\Python27\lib\pickle.py", line 419, in save_reduce
save(state)
File "C:\Python27\lib\pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
File "C:\Python27\lib\pickle.py", line 649, in save_dict
self._batch_setitems(obj.iteritems())
File "C:\Python27\lib\pickle.py", line 681, in _batch_setitems
save(v)
File "C:\Python27\lib\pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
File "C:\Python27\lib\pickle.py", line 562, in save_tuple
save(element)
File "C:\Python27\lib\pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
File "C:\Python27\lib\pickle.py", line 548, in save_tuple
save(element)
File "C:\Python27\lib\pickle.py", line 306, in save
rv = reduce(self.proto)
File "C:\Python27\Lib\site-packages\celery\app\base.py", line 409, in reduce
(self.class, self.Pickler) + self.reduce_args(),
File "C:\Python27\Lib\site-packages\celery\app\base.py", line 419, in reduce_args
else self.conf._pickleable_changes())
File "C:\Python27\Lib\site-packages\celery\app\utils.py", line 77, in _pickleable_changes
R.update(d)
TypeError: 'LazySettings' object is not iterable
c:\Users\MIGUEL\Projects\django_atf>Traceback (most recent call last):
File "", line 1, in
File "C:\Python27\Lib\site-packages\billiard\forking.py", line 530, in main
self = load(from_parent)
File "C:\Python27\lib\pickle.py", line 1378, in load
return Unpickler(file).load()
File "C:\Python27\lib\pickle.py", line 858, in load
dispatchkey
File "C:\Python27\lib\pickle.py", line 880, in load_eof
raise EOFError
EOFError"
The text was updated successfully, but these errors were encountered: