-
Notifications
You must be signed in to change notification settings - Fork 14k
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
Fix for worker healthcheck #23455
Comments
that's just a warning, it isn't actually failing, is it? the command just needs to be updated to
|
The update to the celery command would fix the warning; however, the health check would still have issues. Without the Happy to set up a pull request adding |
This is likely fixed by now, and is pretty out of date if not. If people are still encountering this in current versions (3.x) please open a new Issue or a PR to address the problem. |
superset-worker container health check on provided Docker Compose fails because a Celery dependency expects the
CELERY_BROKER_URL
environment variable which is currently not set in the 2.1.0rc3 release of Superset.How to reproduce the bug
1a. In the current
docker-compose.yml
anddocker-compose-non-dev.yml
the healthcheck will fail because Celery's dependency, Kombu, implicitly expects an environment variableCELERY_BROKER_URL
in order for the CLIcelery inspect ping
to work.1b. With the superset-worker container running,
docker exec -it superset-worker /bin/sh
then run the CLI commandcelery inspect ping
.2. Kombu will throw a
ConnectionRefusedError: [Errno 111] Connection refused
because theCELERY_BROKER_URL
environment variable is not set.Expected results
celery inspect ping
should return a JSON response like{"OK": "pong"}
if Celery is properly configured to see a broker.Actual results
ConnectionRefusedError: [Errno 111] Connection refused
resulting in the container being marked as unhealthyScreenshots
This screenshot of an interactive terminal in the superset-worker container before and after adding the CELERY_BROKER_URL environment variable.
This follow-up screenshot shows how the currently written health check will still fail due to the unrecognized
-A
flag for thecelery inspect
sub-command:Environment
(please complete the following information):
Checklist
Make sure to follow these steps before submitting your issue - thank you!
Additional context
This may be most easily fixed by adding the following to the
./docker/.env-non-dev
environment variables:I also recommend simplifying the health check from:
to
The current version of the health check throws an error that the
-A
flag is not recognized.A script to ensure the configs stay in sync with the
REDIS_HOST
,REDIS_PORT
,REDIS_CELERY_DB
, andREDIS_RESULTS_DB
used insuperset_config.py
would be ideal. I can submit a pull request with the recommended fix if the maintainers would like that.Finally, adding the recommended patch and health check to the
celery-worker-beat
container may be desirable.Thanks for all your hard work
The text was updated successfully, but these errors were encountered: