Issue 1:
Checklist

I have checked the issues list

for similar or identical bug reports.

I have checked the pull requests list

for existing proposed fixes.

I have checked the commit log

to find out if the bug was already fixed in the master branch.

I have included all related issues and possible duplicate issues in this issue

(If there are none, check this box anyway).

Related Issues and Possible Duplicates

Related Issues

None

Possible Duplicates

None

Description

I am using celery 4.3, and according to it's documentation, the class based tasks are not registered automatically (or autodiscovered) they have to be registered manually : https://docs.celeryproject.org/en/3.0/whatsnew-4.0.html#the-task-base-class-no-longer-automatically-register-tasks. But I see all class based tasks are getting registered in my case automatically. And now when I upgraded to celery 5.1.*, now the class based tasks are not getting registered. So in which version exactly this feature is removed?

Suggestions

Issue 2:
Checklist

I have verified that the issue exists against the master branch of Celery.

This has already been asked to the discussions forum first.

I have read the relevant section in the

contribution guide

on reporting bugs.

I have checked the issues list

for similar or identical bug reports.

I have checked the pull requests list

for existing proposed fixes.

I have checked the commit log

to find out if the bug was already fixed in the master branch.

I have included all related issues and possible duplicate issues

in this issue (If there are none, check this box anyway).

Mandatory Debugging Information

I have included the output of celery -A proj report in the issue.

(if you are not able to do this, then at least specify the Celery

version affected).

I have verified that the issue exists against the master branch of Celery.

I have included the contents of pip freeze in the issue.

I have included all the versions of all the external dependencies required

to reproduce this bug.

Optional Debugging Information

I have tried reproducing the issue on more than one Python version

and/or implementation.

I have tried reproducing the issue on more than one message broker and/or

result backend.

I have tried reproducing the issue on more than one version of the message

broker and/or result backend.

I have tried reproducing the issue on more than one operating system.

I have tried reproducing the issue on more than one workers pool.

I have tried reproducing the issue with autoscaling, retries,

ETA/Countdown & rate limits disabled.

I have tried reproducing the issue after downgrading

and/or upgrading Celery and its dependencies.

Related Issues and Possible Duplicates

Related Issues

None

Possible Duplicates

None

Environment & Settings

Celery version: 5.2.7

celery report Output:

redis.exceptions.ConnectionError: Connection closed by server.
[2022-08-12 14:04:04,481: WARNING/MainProcess] /usr/local/lib/python3.10/site-packages/celery/worker/consumer/consumer.py:367: CPendingDeprecationWarning:
In Celery 5.1 we introduced an optional breaking change which
on connection loss cancels all currently executed tasks with late acknowledgement enabled.
These tasks cannot be acknowledged as the connection is gone, and the tasks are automatically redelivered back to the queue.
You can enable this behavior using the worker_cancel_long_running_tasks_on_connection_loss setting.
In Celery 5.1 it is set to False by default. The setting will be set to True by default in Celery 6.0.

warnings.warn(CANCEL_TASKS_BY_DEFAULT, CPendingDeprecationWarning)

[2022-08-12 14:04:04,488: ERROR/MainProcess] consumer: Cannot connect to redis://192.168.10.21:6379/0: Error while reading from 192.168.10.21:6379 : (104, 'Connection reset by peer').
Trying again in 2.00 seconds... (1/100)

[2022-08-12 14:04:04,492: ERROR/MainProcess] ["consumer: Cannot connect to redis://192.168.10.21:6379/0: Error while reading from 192.168.10.21:6379 : (104, 'Connection reset by peer').\nTrying again in 2.00 seconds... (1/100)\n"]
[2022-08-12 14:04:04,493: WARNING/MainProcess] b'["consumer: Cannot connect to redis://192.168.10.21:6379/0: Error while reading from 192.168.10.21:6379 : (104, \'Connection reset by peer\').\\nTrying again in 2.00 seconds... (1/100)\\n"]'
[2022-08-12 14:04:06,501: INFO/MainProcess] Connected to redis://192.168.10.21:6379/0
[2022-08-12 14:04:06,507: INFO/MainProcess] mingle: searching for neighbors
[2022-08-12 14:04:07,515: INFO/MainProcess] mingle: all alone
[2022-08-12 14:04:12,535: INFO/MainProcess] missed heartbeat from celery@f0e9b74e758d

Steps to Reproduce

Required Dependencies

Minimal Python Version: Unknown

Minimal Celery Version: Unknown

Minimal Kombu Version: Unknown

Minimal Broker Version: Unknown

Minimal Result Backend Version: Unknown

Minimal OS and/or Kernel Version: Unknown

Minimal Broker Client Version: Unknown

Minimal Result Backend Client Version: Unknown

Python Packages

pip freeze Output:

amqp 5.1.1
APScheduler 3.9.1
async-timeout 4.0.2
baidu-aip 4.16.7
beautifulsoup4 4.11.1
bidict 0.22.0
billiard 3.6.4.0
blinker 1.5
bs4 0.0.1
cachelib 0.9.0
celery 5.2.7
certifi 2022.6.15
chardet 5.0.0
charset-normalizer 2.1.0
click 8.1.3
click-didyoumean 0.3.0
click-plugins 1.1.1
click-repl 0.2.0
Deprecated 1.2.13
dill 0.3.5.1
et-xmlfile 1.1.0
factor-analyzer 0.4.0
Flask 2.2.1
Flask-APScheduler 1.12.4
Flask-Caching 2.0.1
Flask-Cors 3.0.10
Flask-Excel 0.0.7
hiredis 2.0.0
idna 3.3
itsdangerous 2.1.2
Jinja2 3.1.2
joblib 1.1.0
kombu 5.2.4
lml 0.1.0
Logbook 1.5.3
loguru 0.6.0
lxml 4.9.1
MarkupSafe 2.1.1
marshmallow 3.17.0
mongoengine 0.24.2
numpy 1.23.1
openpyxl 3.0.10
packaging 21.3
pandas 1.4.3
pip 22.2.1
prompt-toolkit 3.0.30
pyexcel 0.7.0
pyexcel-io 0.6.6
pyexcel-webio 0.1.4
pyexcel-xls 0.7.0
pyexcel-xlsx 0.6.0
pymongo 4.2.0
pyparsing 3.0.9
python-dateutil 2.8.2
python-engineio 4.3.4
python-redis-lock 3.7.0
python-socketio 5.7.1
pytz 2022.1
pytz-deprecation-shim 0.1.0.post0
raven 6.10.0
redis 4.3.4
requests 2.28.1
scikit-learn 1.1.2
scipy 1.9.0
setuptools 63.2.0
six 1.16.0
soupsieve 2.3.2.post1
supervisor 4.2.4
TA-Lib 0.4.24
texttable 1.6.4
threadpoolctl 3.1.0
tzdata 2022.1
tzlocal 4.2
urllib3 1.26.11
uWSGI 2.0.20
vine 5.0.0
wcwidth 0.2.5
websocket-client 1.3.3
Werkzeug 2.2.1
wheel 0.37.1
wrapt 1.14.1
xlrd 2.0.1
xlwt 1.3.0

Other Dependencies

using redis as broker

Minimally Reproducible Test Case

just restart redis-server after celery workers started.

I tested with celery 4.4.7. celery works perfectly.

Expected Behavior

Actual Behavior