gpt4 book ai didi

python - 将 Azure Web 应用连接到 Azure Redis 缓存

转载 作者:行者123 更新时间:2023-12-02 23:12:39 26 4
gpt4 key购买 nike

如何将 Azure Redis 缓存连接到使用 celery 执行某些异步任务的 Flask WebApp?每当我尝试通过 Webjob 连接时,都会显示无法连接到 redis。

我还尝试输入此帖子 How to configure celery-redis in django project on microsoft azure? 中的 celeryspect ping -b redis://{password}@{redis_service_name}.redis.cache.windows.net:6379/0但我会收到连接失败:如果此问题仍然存在,请确保计算机的防火墙和代理设置允许到端口 10225 的出站 TCP 流量。如果您的 IP 地址未设置,则在缓存上使用防火墙功能也可能会阻止来自控制台的连接已列入白名单

最佳答案

如果防火墙中没有特殊规则,则不会出现此错误。一般来说,公司网络有特殊的防火墙设置,因此可能会出现访问问题。在这种情况下,您需要允许防火墙出站端口10225。您可以使用 Azure 上的 Redis 控制台在不同的网络上进行测试,看看它是否与防火墙相关。

使用带有防火墙规则的公司网络 using company network with firewall rule

没有防火墙规则的其他网络 enter image description here

关于python - 将 Azure Web 应用连接到 Azure Redis 缓存,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57403592/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com