An Azure service that provides access to a secure, dedicated Redis cache, managed by Microsoft.
If you are experiencing an unknown host exception while trying to connect to your Azure Cache for Redis instance, even with public access enabled, there are a few potential issues to consider:
- DNS Resolution: Ensure that your application is using the correct hostname format. You should connect to
<cachename>.redis.cache.windows.neton the appropriate port (typically 6380 for SSL connections). Avoid using<cachename>.privatelink.redis.cache.windows.netin your configuration or connection string. - Firewall Rules: Check if there are any firewall rules that might be blocking access. Ensure that your client IP address is added to the firewall rules for the Azure Redis cache.
- Public Network Access: Although public access is enabled, confirm that the public network access setting is correctly configured in the Azure portal. If you have a private endpoint configured, ensure that it is set to allow public network access as well.
- Network Configuration: Verify your network configuration to ensure that there are no issues preventing DNS resolution or connectivity to the Redis cache.
- Public IP Address Changes: If you have configured any networking resources to use the cache's public IP address, check whether the public IP address has changed, as this could lead to connectivity issues.
Testing connectivity using tools like redis-cli or PSPING can also help diagnose the issue further.