Issue 1:
Checklist

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: 4.3.0

celery report Output:

software -> celery:4.3.0 (rhubarb) kombu:4.6.3 py:3.6.7
billiard:3.6.0.0 py-amqp:2.5.0
platform -> system:Linux arch:64bit
kernel version:4.15.0-1044-aws imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:amqp results:disabled

Steps to Reproduce

Required Dependencies

Minimal Python Version: 3.6.7

Minimal Celery Version: 4.3.0

Minimal Kombu Version: 4.6.3

Minimal Broker Version: RabbitMQ 3.7.17

Minimal Result Backend Version: Postgres 10.10

Minimal OS and/or Kernel Version: Ubuntu 18.04

Minimal Broker Client Version: N/A

Minimal Result Backend Client Version: N/A

Python Packages

pip freeze Output:

alabaster==0.7.10
alembic==0.8.10
amqp==2.5.0
appdirs==1.4.3
appnope==0.1.0
asn1crypto==0.22.0
astroid==1.6.0
Babel==2.5.0
backcall==0.1.0
backports-abc==0.5
billiard==3.6.0.0
bitarray==0.8.1
bleach==3.0.2
cached-property==1.3.0
celery==4.3.0
certifi==2018.10.15
cffi==1.10.0
chardet==3.0.4
ciso8601==2.1.1
Click==7.0
cloudant==0.5.10
CommonMark==0.7.4
configparser==3.5.0
cookies==2.2.1
coverage==4.4.2
coveralls==1.2.0
croniter==0.3.19
cryptography==2.4.2
cycler==0.10.0
DateTime==4.2
decorator==4.3.0
defusedxml==0.5.0
dicttoxml==1.7.4
dill==0.2.7.1
dnspython==1.15.0
docker-py==1.10.6
docker-pycreds==0.2.1
docopt==0.6.2
docutils==0.14
entrypoints==0.2.3
flake8==3.4.1
Flask==1.0.2
Flask-Admin==1.5.3
Flask-Cache==0.13.1
Flask-Login==0.2.11
flask-swagger==0.2.13
Flask-WTF==0.12
flower==0.9.3
freezegun==0.3.9
funcsigs==1.0.0
future==0.15.2
gevent==1.2.2
gitdb2==2.0.2
GitPython==2.1.5
greenlet==0.4.12
gunicorn==19.9.0
hive-thrift-py==0.0.1
html5lib==0.999999999
httplib2==0.12.1
idna==2.7
imagesize==0.7.1
impyla==0.14.0
ipykernel==4.10.0
ipython==5.8.0
ipython-genutils==0.2.0
ipywidgets==6.0.0
isodate==0.5.4
isort==4.2.15
itsdangerous==1.1.0
jedi==0.13.1
Jinja2==2.10.1
jmespath==0.9.3
jsonschema==2.6.0
jupyter==1.0.0
jupyter-client==5.3.1
jupyter-console==5.1.0
jupyter-core==4.4.0
kazoo==2.4.0
kombu==4.6.3
lazy-object-proxy==1.3.1
lockfile==0.12.2
lxml==3.8.0
lz4==0.11.1
Mako==1.0.7
Markdown==2.6.9
MarkupSafe==1.1.0
matplotlib==2.0.2
mccabe==0.6.1
mistune==0.8.4
mock==2.0.0
moto==1.1.1
nbconvert==5.4.0
nbformat==4.4.0
nose==1.3.7
nose-parameterized==0.6.0
notebook==6.0.0
numpy==1.13.1
oauth2==1.9.0.post1
ordereddict==1.1
packaging==16.8
pandas==0.20.3
pandocfilters==1.4.2
parso==0.5.0
pathlib2==2.3.0
patsy==0.5.0
pbr==3.1.1
pexpect==4.6.0
pg8000==1.11.0
pickleshare==0.7.5
pika==1.1.0
pluggy==0.6.0
ply==3.10
prometheus-client==0.4.2
prompt-toolkit==1.0.16
psutil==4.4.2
ptyprocess==0.6.0
py==1.5.2
pyaml==17.8.0
pycodestyle==2.3.1
pycparser==2.18
pyflakes==1.5.0
Pygments==2.2.0
pylint==1.8.0
pyOpenSSL==18.0.0
pyparsing==2.2.0
pytest==3.2.2
pytest-catchlog==1.2.2
pytest-cov==2.5.1
pytest-mock==1.6.3
pytest-pylint==0.7.1
python-daemon==2.1.2
python-dateutil==2.7.5
python-editor==1.0.3
python-json-logger==0.1.8
python-nvd3==0.14.2
python-slugify==1.1.4
python-snappy==0.5.3
pytz==2017.2
PyYAML==5.1.1
pyzmq==17.1.2
qtconsole==4.3.0
requests==2.21.0
requests-file==1.4.2
requests-futures==0.9.4
requests-toolbelt==0.8.0
scandir==1.5
scikit-learn==0.19.2
scipy==0.19.1
seaborn==0.9.0
selenium==3.5.0
Send2Trash==1.5.0
setproctitle==1.1.10
shortuuid==0.5.0
simple-salesforce==0.74.2
simplegeneric==0.8.1
singledispatch==3.4.0.3
six==1.11.0
smmap2==2.0.3
snowballstemmer==1.2.1
Sphinx==1.6.3
sphinx-argparse==0.2.1
sphinx-rtd-theme==0.2.4
sphinxcontrib-websupport==1.0.1
SQLAlchemy==1.3.5
statsmodels==0.9.0
tabulate==0.7.7
terminado==0.8.1
testpath==0.4.2
thrift==0.9.3
thriftpy==0.3.9
tldextract==2.1.0
tornado==5.1.1
tox==2.9.1
tqdm==4.15.0
traitlets==4.3.2
unicodecsv==0.14.1
Unidecode==0.4.21
urllib3==1.24.2
vertica-python==0.7.3
vine==1.3.0
virtualenv==16.4.3
wcwidth==0.1.7
webencodings==0.5.1
websocket-client==0.44.0
Werkzeug==0.14.1
widgetsnbextension==2.0.0
wrapt==1.10.11
WTForms==2.1
xmltodict==0.11.0
xxhash==1.0.1
zeep==2.3.0
zope.deprecation==4.3.0
zope.interface==4.4.2

Other Dependencies

Erlang/OTP 22 [erts-10.4.4] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1]

RabbitMQ 3.7.17

Ubuntu 18.04

Python 3.6.7

celery 4.3.0

kombu 4.6.3

rabbitmq.config

[
{ssl, [{versions, ['tlsv1.2', 'tlsv1.1']}]},
{rabbit,
[
{tcp_listeners, [{"127.0.0.1", 5672}]},
{ssl_listeners, [5671]},
{ssl_options, [{cacertfile, "/usr/local/share/ca-certificates/ca.crt"},
{certfile, "/usr/local/share/ca-certificates/server.crt"},
{keyfile, "/usr/local/share/private/server.key"},
{versions, ['tlsv1.2', 'tlsv1.1']},
{verify, verify_peer},
{fail_if_no_peer_cert, true}
]},
{auth_mechanisms, ['PLAIN', 'AMQPLAIN', 'EXTERNAL']}

]
}
].

celeryconfig.py

import ssl
broker_url="amqps://USER:PASSWORD@rabbit-endpoint.com:5671//"
result_backend="I am using postgresql"
include=["my_tasks.py"]
task_acks_late=True
worker_prefetch_multiplier=1
worker_max_tasks_per_child=25
task_default_rate_limit="50/m"
timezone="UTC"
broker_use_ssl={'keyfile': 'beep.key', 'certfile': 'beep.crt', 'ca_certs': 'boop.crt', 'cert_reqs': ssl.CERT_REQUIRED}

I have also verified that all my .crt and .key files are in .pem format.

Minimally Reproducible Test Case

I have a VPC that is setup on AWS with two EC2 machines running, Machine A and Machine B. RabbitMQ and a celery producer lives in Machine A and the celery workers are living in Machine B. The celery producer pushes in tasks into RabbitMQ via localhost on TCP port 5672. The workers are having trouble authenticating themselves with RabbitMQ on port 5671. I get a SSLv3 handshake error.

I start my rabbitmq server, with the above mentioned configuration, with:

sudo service rabbit-mq start
sudo rabbitmq-plugins enable rabbitmq_auth_mechanism_ssl

I start my celery application with

celery -A celery_app worker -l info --config celeryconfig --concurrency=4 -n "%h:Worker-Name" -O fair

My celery_app.py

from __future__ import absolute_import, unicode_literals
from celery import Celery

celery_app = Celery("app_name")

if __name__ == '__main__':
celery_app.start()

Expected Behavior

I read that the latest version of Erlang/RabbitMQ should not be accepting SSLv3 due to some vulnerabilities, so I am not sure why Celery is trying to authenticate with SSLv3. In the RabbitMQ configuration file, I specified to not use SSLv3 authentication and also reject connection if the client (in this case, celery) cannot produce a certificate.

Actual Behavior

When I start up my celery worker, I would get this error message

consumer: Cannot connect to amqps://USER:**@rabbit-endpoint.com:5671//: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:847).

I get this message when I set this RabbitMQ configuration:

{fail_if_no_peer_cert, true}

However, the error goes away if I change the RabbitMQ config to:

{fail_if_no_peer_cert, false}

But what is the point of using TLS if people can just connect to my RabbitMQ without providing their SSL certificates

Issue 2:
Checklist

I have checked the issues list

for similar or identical enhancement to an existing feature.

I have checked the pull requests list

for existing proposed enhancements.

I have checked the commit log

to find out if the if the same enhancement was already implemented 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

Brief Summary

I would like to be able to configure health_check_interval (i.e.: https://github.com/andymccurdy/redis-py/blob/1a41cfd95a53a95b078084d8627be6b6fba3bb71/redis/client.py#L737-L749) for the Redis results backend

Design

Architectural Considerations

None

Proposed Behavior

This would be an opt-in configuration to Redis via Celery. This lets us have more control over the Redis functionality and enables us to tune it to our desire.

Proposed UI/UX

New environment variable that allows setting this value

Diagrams

N/A

Alternatives

None