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

Error in logfile #738

Open
timrichardson opened this issue Feb 23, 2024 · 3 comments
Open

Error in logfile #738

timrichardson opened this issue Feb 23, 2024 · 3 comments

Comments

@timrichardson
Copy link

Summary:

Include a brief description of the problem here, and fill out the version info below.

Error in stderr. Searching (chatgpt) indicates a problem with old versions, but I am using the latest.
Although the error trace indicates that this is a celery redis backend problem, not specifically celery-beat, I never see this error in other logfiles.

The tasks that are run in celery-beat are invoked in other ways (e.g. from django admin "run" or simply from a python shell) and I never see this error elsewhere. This is why I have reported it here.

My requirements are managed in requirements.txt imported into Dockerfile

  • Celery Version: celery==5.3.6
  • Celery-Beat Version:
  • django-celery-beat==2.5.0

Exact steps to reproduce the issue:

  1. I have periodic scheduled tasks.

Detailed information

I am running celery-beat via supervisor.

It is invoked via this configuration:

[program:celery_beat]
directory = /opt/app
command = celery --app project beat --pidfile=  --loglevel info --scheduler django_celery_beat.schedulers:DatabaseScheduler
autorestart = true
startretries=3

The supervisor log has repeated messages like this
( from celery_beat-stderr---supervisor-51cyqtpg.log )

Exception ignored in: <function AsyncResult.__del__ at 0x7f422d71cb80> 
Traceback (most recent call last): 
  File "/usr/local/lib/python3.11/site-packages/celery/result.py", line 417, in __del__ 
    self.backend.remove_pending_result(self) 
  File "/usr/local/lib/python3.11/site-packages/celery/backends/asynchronous.py", line 208, in remove_pending_result 
    self.on_result_fulfilled(result) 
  File "/usr/local/lib/python3.11/site-packages/celery/backends/asynchronous.py", line 216, in on_result_fulfilled 
    self.result_consumer.cancel_for(result.id) 
  File "/usr/local/lib/python3.11/site-packages/celery/backends/redis.py", line 183, in cancel_for 
    with self.reconnect_on_error(): 
  File "/usr/local/lib/python3.11/contextlib.py", line 155, in __exit__ 
    self.gen.throw(typ, value, traceback) 
  File "/usr/local/lib/python3.11/site-packages/celery/backends/redis.py", line 130, in reconnect_on_error 
    self._ensure(self._reconnect_pubsub, ()) 
  File "/usr/local/lib/python3.11/site-packages/celery/backends/redis.py", line 384, in ensure 
    return retry_over_time( 
           ^^^^^^^^^^^^^^^^ 
  File "/usr/local/lib/python3.11/site-packages/kombu/utils/functional.py", line 318, in retry_over_time 
    return fun(*args, **kwargs) 
           ^^^^^^^^^^^^^^^^^^^^ 
  File "/usr/local/lib/python3.11/site-packages/celery/backends/redis.py", line 122, in _reconnect_pubsub 
    self._pubsub.connection.register_connect_callback(self._pubsub.on_connect) 
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
AttributeError: 'Connection' object has no attribute 'register_connect_callback'

Please include more detailed information here, such as relevant information about your system setup, things you did to try and debug the problem, log messages, etc.

@timrichardson
Copy link
Author

also
django-redis==5.4.0

@cclauss
Copy link
Contributor

cclauss commented Mar 4, 2024

Please retry with v2.6.0 which was released yesterday.

@timrichardson
Copy link
Author

thanks. So far after a few minutes I have not seen this, I will come back in a few days either way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants