2012-07-13 79 views
6

我最近從2.3.0升級到芹菜3.0.1,所有的任務運行良好。不幸。我很頻繁地收到「Framing Error」異常。我也在運行主管重新啓動線程,但由於這些從來沒有真正被殺死,所以主管無法知道芹菜需要重新啓動。有沒有人見過這個?芹菜3.0.1的框架錯誤

2012-07-13 18:53:59,004: ERROR/MainProcess] Unrecoverable error: Exception('Framing Error, received 0x00 while expecting 0xce',) 
Traceback (most recent call last): 
    File "/usr/local/lib/python2.7/dist-packages/celery/worker/__init__.py", line 350, in start 
    component.start() 
    File "/usr/local/lib/python2.7/dist-packages/celery/worker/consumer.py", line 360, in start 
    self.consume_messages() 
    File "/usr/local/lib/python2.7/dist-packages/celery/worker/consumer.py", line 445, in consume_messages 
    drain_nowait() 
    File "/usr/local/lib/python2.7/dist-packages/kombu/connection.py", line 175, in drain_nowait 
    self.drain_events(timeout=0) 
    File "/usr/local/lib/python2.7/dist-packages/kombu/connection.py", line 171, in drain_events 
    return self.transport.drain_events(self.connection, **kwargs) 
    File "/usr/local/lib/python2.7/dist-packages/kombu/transport/amqplib.py", line 262, in drain_events 
    return connection.drain_events(**kwargs) 
    File "/usr/local/lib/python2.7/dist-packages/kombu/transport/amqplib.py", line 97, in drain_events 
    chanmap, None, timeout=timeout) 
    File "/usr/local/lib/python2.7/dist-packages/kombu/transport/amqplib.py", line 155, in  _wait_multiple 
    channel, method_sig, args, content = read_timeout(timeout) 
    File "/usr/local/lib/python2.7/dist-packages/kombu/transport/amqplib.py", line 129, in read_timeout 
    return self.method_reader.read_method() 
    File "/usr/local/lib/python2.7/dist-packages/amqplib/client_0_8/method_framing.py", line 221, in read_method 
    raise m 
Exception: Framing Error, received 0x00 while expecting 0xce 
+0

不是專家,這是猜測從堆棧跟蹤,但是,你確定你的任務生產者寫郵件到AMQP在正確的版本?也許你需要更新制作者的版本,刷新舊信息,或類似的東西。 – pkoch 2012-08-08 03:02:07

+0

我目前面臨同樣的問題。它可能是不同的工人和任務發送者上的AMQP lib? – 2012-08-10 06:59:52

+0

嘿丹,你解決了這個問題嗎? – antonlitvinenko 2012-08-17 20:49:17

回答

4

雖然我不知道爲什麼這實際發生,從amqplib切換到librabbitmq幫我解決這個麻煩。

我沒有在配置改變任何東西,只是:

pip uninstall amqplib 
pip install librabbitmq 

並重新啓動芹菜工人。

得到這個想法形式https://github.com/celery/celery/issues/922

+1

這解決了我在Heroku上使用CloudAMQP – alan 2012-08-24 12:36:02

+0

在Kombu(位於Celery下方的庫)並從amqplib移動到librabbitmq時出現此錯誤的相同問題 – 2013-01-29 06:37:23