djangoceleryflower

celery flower connection issue with --persistent True


I was running celery flower 1.0.0 as a systemd service with --persistent=True. And every restart used to fail with error SSLV3_ALERT_HANDSHAKE_FAILURE which was in-depth because of db type could not be determined error message.

Upon removing --persisten=True it used to work perfectly on every restart, but then I couldn't get my celery flower database be intact after each restart.

Here is what worked for me.


Solution

  • First, that SSLV3_ALERT_HANDSHAKE_FAILURE was because of my mis-configuration of sentry + raven.

    Second, the real error db type could not be determined was arising because the new restarted service wasn't able to connect with the database of older flower service. I couldn't find out why is that so, but a very helpful GitHub issue is here.

    Finally, I tried specifying --db flag to specify my flower database location and name. This resolved the issue for me. Now the service was able to restart successful even with --persistent=True.

    Later, I found out that the default database which flower was creating was owned by the primary user of the host. But upon specifying --db flag in the service file, the database was owned by celery user. This was the real solution for me.

    Take Away: If you are running flower as a systemd service, then make sure the flower database file is owned by the celery user. Or even better is to always use --db flag to save you from this problem.