Skip to content
This repository has been archived by the owner on Sep 17, 2021. It is now read-only.

SSL Redis isn't usable #1175

Open
jasonmcintosh opened this issue Feb 19, 2019 · 2 comments
Open

SSL Redis isn't usable #1175

jasonmcintosh opened this issue Feb 19, 2019 · 2 comments

Comments

@jasonmcintosh
Copy link

IF you setup Redis with SSL, celery (e.g. scheduler/workers) won't be able to connect to it and get failures in the logs. E.g.

[2019-02-19 18:47:50,400: ERROR/MainProcess] consumer: Cannot connect to redis://***:6379/0: Error while reading from socket: ('Connection closed by server.',).
Trying again in 6.00 seconds...

Should be able to adjust the celeryconfig.py file to be:

broker_url = '{}://{}/{}'.format(
    os.getenv('SECURITY_MONKEY_REDIS_PROTOCOL', 'redis'),
    os.getenv('SECURITY_MONKEY_REDIS_HOST', 'redis'),
    os.getenv('SECURITY_MONKEY_REDIS_DB', '0')
)

Then for those using SSL, set SECURITY_MONKEY_REDIS_PROTOCOL to "rediss" not "redis" and then things seem to work fine.

@mikegrima
Copy link
Contributor

Can you submit a PR with these changes?

@jasonmcintosh
Copy link
Author

Will do soon as I can get a chance. Was working on some updates to the docker sections - e.g. originally was trying to get running in k8s, though leaning back towards ECS so was creating demo terraform for that.

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

No branches or pull requests

2 participants