簡體   English   中英

將 Azure Web 應用連接到 Azure Redis 緩存

[英]Connect Azure Web App to Azure Cache for Redis

如何將 Azure Redis 緩存連接到使用 celery 執行一些異步任務的 Flask WebApp? 每當我嘗試通過 Webjob 連接時,它都會說無法連接到 redis。

我也嘗試從這篇文章中輸入這個celery inspect ping -b redis://{password}@{redis_service_name}.redis.cache.windows.net:6379/0 How to configure celery-redis in django project on microsoft azure? 但我會得到Connection Failure: If this issue persists, ensure your computer's firewall and proxy settings allow outbound TCP traffic to port 10225. Using the firewall feature on your cache may also block connections from the console if your IP address has not been whitelisted

如果防火牆沒有特殊規則,應該不會出現這個錯誤。 一般來說,公司網絡中有特殊的防火牆設置,因此可能會出現訪問問題。 在這種情況下,您需要允許防火牆通過 10225 端口出站。 您可以使用 Azure 上的 Redis 控制台在不同的網絡上對其進行測試,以查看它是否與防火牆相關。

使用帶有防火牆規則的公司網絡使用帶有防火牆規則的公司網絡

沒有防火牆規則的其他網絡在此處輸入圖片說明

嘗試切換您的網絡以暫時工作。 這是一個特定於網絡的問題,用於連接到 Redis 服務器的端口被阻止,需要打開。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM