我在 azure 中部署了这个 django 定位器项目。我的 Redis 缓存主机名 (DNS) 是 mycompany.azure.microsoft.net。我在 azure 中创建了它,但不确定在哪里可以找到 redis 服务器的密码。我已将其作为我的 settings.py 中的配置。我使用 Redis 作为项目中 celery 设置的代理。
BROKER_URL = 'redis://:pa[email protected]:6380/0'
我无法连接。有什么不同的地方,我需要输入密码或用户名才能连接到上述服务器吗?另外我在 Azure 中哪里可以找到密码。或者是因为我试图从本地主机联系Azure redis?
You can find your redis services keys in Azure portal, click Settings=>Access keys, you can select either primary or secondary key as your password in the redis connection string.
此外,您可以尝试启用 redis 服务的非 ssl 端点,如所述https://azure.microsoft.com/en-us/documentation/articles/cache-python-get-started/#enable-the-non-ssl-endpoint.
看来你正在使用celery
,您可以使用 celery cli 命令来测试您的 redis 服务。例如。
celery inspect ping -b redis://:{password}@{redis_service_name}.redis.cache.wi
ndows.net:6379/0
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)