Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Worker always offline in Celery flower

I have Celery and Flower running on my server and the tasks run just fine and are correctly registered and updated for me to monitor within the Flower UI, however, the worker status is allways Offline no matter if I restart the workers or Flower itself, and my log file (as given by the --log_file_prefix option) is empty, so no errors, nothing.

The only thing I can see is that the chrome dev tools show a Websocket Handshake error as shown below: flower error in chrome dev tools and a message CAUTION: Provitional headers are shown. enter image description here

I read that I need to make my server to respond with the Upgrade: websocket and Connection: upgrade headers for the Websocket handshake to be successful. I'm using apache, then I tried so by specifying the following in /etc/apache2/sites-enabled/mysite.conf:

Header set Upgrade "websocket"
Header set Connection "upgrade"

but it didn't work.

Does anyone have a clue on this error? Let me know if you need any more info.

Thanks!!

like image 837
Gerard Avatar asked Oct 20 '22 05:10

Gerard


2 Answers

Gerard, check the kombu version.

I solved a similar problem upgrading kombu to version 3.0.21 (rel. 2014-07-07).

pip install kombu==3.0.21

I'm not sure it solves your problem but give it a try.

like image 59
dcellai Avatar answered Oct 22 '22 19:10

dcellai


same behavior with celery: 4.0.2, redis: 2.10.5

solve it by update kombu and redis

pip install kombu --upgrade

pip install redis --upgrade
like image 33
Echo Zeng Avatar answered Oct 22 '22 18:10

Echo Zeng