Skip to content
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

Worker will not re-connect anymore due to Celery 6.0 and above issue #7521

Closed
samip5 opened this issue Nov 11, 2023 · 1 comment
Closed

Worker will not re-connect anymore due to Celery 6.0 and above issue #7521

samip5 opened this issue Nov 11, 2023 · 1 comment
Labels
bug Something isn't working wontfix

Comments

@samip5
Copy link
Contributor

samip5 commented Nov 11, 2023

Describe the bug
Worker might not re-connect if it fails enough of times anymore.

To Reproduce
Steps to reproduce the behavior:

  1. Deploy Authentik
  2. Yeet Redis deployment for a moment
  3. See error
  4. De-deploy Redis
  5. See issue with Worker not re-connecting

Expected behavior
I would expect it to re-connect.

Logs

{"event": "/ak-root/venv/lib/python3.11/site-packages/celery/worker/consumer/consumer.py:391: CPendingDeprecationWarning: \nIn Celery 5.1 we introduced an optional breaking change which\non connection loss cancels all currently executed tasks with late acknowledgement enabled.\nThese tasks cannot be acknowledged as the connection is gone, and the tasks are automatically redelivered\nback to the queue. You can enable this behavior using the worker_cancel_long_running_tasks_on_connection_loss\nsetting. In Celery 5.1 it is set to False by default. The setting will be set to True by default in Celery 6.0.\n\n  warnings.warn(CANCEL_TASKS_BY_DEFAULT, CPendingDeprecationWarning)\n", "level": "warning", "logger": "py.warnings", "timestamp": 1699070849.2876282}
{"event": "/ak-root/venv/lib/python3.11/site-packages/celery/worker/consumer/consumer.py:507: CPendingDeprecationWarning: The broker_connection_retry configuration setting will no longer determine\nwhether broker connection retries are made during startup in Celery 6.0 and above.\nIf you wish to retain the existing behavior for retrying connections on startup,\nyou should set broker_connection_retry_on_startup to True.\n  warnings.warn(\n", "level": "warning", "logger": "py.warnings", "timestamp": 1699070849.4042337}
{"event": "consumer: Cannot connect to redis://redis.databases.svc.cluster.local:6379/0: Error 111 connecting to redis.databases.svc.cluster.local:6379. Connection refused..\nTrying again in 2.00 seconds... (1/100)\n", "level": "error", "logger": "celery.worker.consumer.consumer", "timestamp": 1699070849.4176264}
{"event": "consumer: Cannot connect to redis://redis.databases.svc.cluster.local:6379/0: Error 1 connecting to redis.databases.svc.cluster.local:6379. Operation not permitted..\nTrying again in 4.00 seconds... (2/100)\n", "level": "error", "logger": "celery.worker.consumer.consumer", "timestamp": 1699070851.7179375}
{"event": "consumer: Cannot connect to redis://redis.databases.svc.cluster.local:6379/0: Error 1 connecting to redis.databases.svc.cluster.local:6379. Operation not permitted..\nTrying again in 6.00 seconds... (3/100)\n", "level": "error", "logger": "celery.worker.consumer.consumer", "timestamp": 1699070855.7518742}
{"event": "/ak-root/venv/lib/python3.11/site-packages/celery/worker/consumer/consumer.py:507: CPendingDeprecationWarning: The broker_connection_retry configuration setting will no longer determine\nwhether broker connection retries are made during startup in Celery 6.0 and above.\nIf you wish to retain the existing behavior for retrying connections on startup,\nyou should set broker_connection_retry_on_startup to True.\n  warnings.warn(\n", "level": "warning", "logger": "py.warnings", "timestamp": 1699070862.060859}

Version and Deployment (please complete the following information):

  • authentik version: 2023.10.2
  • Deployment: Helm
@samip5 samip5 added the bug Something isn't working label Nov 11, 2023
@samip5 samip5 changed the title Celary 6.0 above: The broker_connection_retry configuration setting will no longer determine\nwhether broker connection retries are made during startup in Celery 6.0 and above.\nIf you wish to retain the existing behavior for retrying connections on startup,\nyou should set broker_connection_retry_on_startup to True. Celary 6.0 above: The broker_connection_retry configuration setting will no longer determine whether broker connection retries are made during startup in Celery 6.0 and above. If you wish to retain the existing behavior for retrying connections on startup, you should set broker_connection_retry_on_startup to True. Nov 11, 2023
@samip5 samip5 changed the title Celary 6.0 above: The broker_connection_retry configuration setting will no longer determine whether broker connection retries are made during startup in Celery 6.0 and above. If you wish to retain the existing behavior for retrying connections on startup, you should set broker_connection_retry_on_startup to True. Celery 6.0 above: The broker_connection_retry configuration setting will no longer determine whether broker connection retries are made during startup in Celery 6.0 and above. If you wish to retain the existing behavior for retrying connections on startup, you should set broker_connection_retry_on_startup to True. Nov 11, 2023
@samip5 samip5 changed the title Celery 6.0 above: The broker_connection_retry configuration setting will no longer determine whether broker connection retries are made during startup in Celery 6.0 and above. If you wish to retain the existing behavior for retrying connections on startup, you should set broker_connection_retry_on_startup to True. Worker will not re-connect anymore due to Celery 6.0 and above issue Nov 11, 2023
@authentik-automation
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix
Projects
None yet
Development

No branches or pull requests

1 participant