Skip to content

Unable to Connect to Azure Hosted Redis Broker via SSL/TLS Port 6380 #4792

Description

@ddavtian

Summary

Maybe someone can shine some light on this. I am having a hard time connecting to an Azure hosted Redis Cache on SSL/TLS port 6380

celery 4.1.1

When trying to use a local version of Redis as a broker things are working fine. Locally we are not using an SSL connection. When trying to use an Azure hosted Redis cache on the default none TLS port 6379 things are working ok, but when trying to connect to the SSL/TLS enabled port which is 6380 on Azure, celery hangs and doesn't connect and eventually throws a socket error connection.

I am able to connect locally using stunnel and redis-cli to the remote Azure hosted Redis server just fine on SSL/TLS and also using redis-py works fine without the need for the stunnel.

Celery Config

host='xxx-int-va7-xxxxxxx.redis.cache.windows.net'
passwword='xxxxxxxxxxxxxxxxxxxxxxxpkOOdeFdSRWOBeVU='
port='6380'

broker_use_ssl=True

broker_url = 'redis://:{pw}@{h}:{p}/0'.format(pw=passwword, h=host, p=port)

Output

-------------- celery@daxxxx-mac v4.1.1 (latentcall)
---- **** ----- 
--- * ***  * -- Darwin-17.5.0-x86_64-i386-64bit 2018-06-02 12:14:59
-- * - **** --- 
- ** ---------- [config]
- ** ---------- .> app:         octo-engine-worker:0x10910f518
- ** ---------- .> transport:   redis://:**@xxx-int-va7-xxxxxxx.redis.cache.windows.net:6380/0
- ** ---------- .> results:     disabled://
- *** --- * --- .> concurrency: 8 (prefork)
-- ******* ---- .> task events: ON
--- ***** ----- 
 -------------- [queues]
                .> celery           exchange=celery(direct) key=celery
                

[tasks]
  . celery.accumulate
  . celery.backend_cleanup
  . celery.chain
  . celery.chord
  . celery.chord_unlock
  . celery.chunks
  . celery.group
  . celery.map
  . celery.starmap
  . octo.tasks.monitor.job_status.JobStatus
  . octo.tasks.processor.arm_deployer.ArmProcessor
  . octo.tasks.processor.scale_sets.SsProcessor
  . octo.tasks.processor.service_principals.SpProcessor
  . octo.tasks.recurring.check_sub_quota.CheckSubscriptionQuota
  . octo.tasks.scheduler.job_scheduler.JobScheduler

[2018-06-02 12:14:59,277: DEBUG/MainProcess] | Worker: Starting Hub
[2018-06-02 12:14:59,277: DEBUG/MainProcess] ^-- substep ok
[2018-06-02 12:14:59,277: DEBUG/MainProcess] | Worker: Starting Pool
[2018-06-02 12:14:59,717: DEBUG/MainProcess] ^-- substep ok
[2018-06-02 12:14:59,718: DEBUG/MainProcess] | Worker: Starting Consumer
[2018-06-02 12:14:59,719: DEBUG/MainProcess] | Consumer: Starting Connection

Error

[2018-06-02 12:18:15,223: ERROR/MainProcess] consumer: Cannot connect to rredis://:**@xxx-int-va7-xxxxxxx.redis.cache.windows.net:6380/0: Error while reading from socket: (54, 'Connection reset by peer').
Trying again in 2.00 seconds...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions