mher / flower

Real-time monitor and web admin for Celery distributed task queue
https://flower.readthedocs.io
Other
6.48k stars 1.09k forks source link

"Unknown worker" message after startup #1388

Open graysonpike opened 3 months ago

graysonpike commented 3 months ago

I am experiencing an issue that only comes right after starting Flower. Upon first loading Flower in my browser, I see the default view, which has a table displaying the workers. If I click on one of the workers, I am taken to the correct worker URL (/worker/...), but the page reports that "Unknown worker 'celery@...'". When I refresh the page in my browser, the worker information loads fine. I also found that refreshing the homepage before clicking on the worker will fix the problem.

To Reproduce Steps to reproduce the behavior:

  1. Deploy a celery worker and celery flower connected to a Redis broker
  2. Open the celery flower homepage
  3. Click on the worker in the "workers" table
  4. You will see an "unknown worker" error
  5. Refresh the page and the worker information will load

Expected behavior A browser refresh show not be required to display the worker information.

Theories I have a theory that this is caused by the startup order of the celery worker and flower. But I would expect that flower could gracefully handle being started either before or after the celery worker.

smashedr commented 3 months ago

This bug has been around for a very long time. First time clicking on any new worker gives Unknown worker. Any subsequent requests will succeed. Would love to see this fixed.