title: Azure VM not connecting to Azure Redis Cache but local is connecting to Azure Redis Cache
body: <p>The same Azure Redis cache is getting connected from local machince.
  The port 6380, on which cache is running is open in firewall of both inbound and outbound in the VM.</p>
  <p><a href="https://i.stack.imgur.com/3GZVs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3GZVs.png" alt="enter image description here" /></a></p>
  <p>I tried in both NodeJs and Java. Both are connecting to remote Azure Redis from local and the exact same code for NodeJS and Java is not connceting to Azure Redis cache from VM.</p>
  <p>Java config:</p>
  <pre><code>spring.redis.host=my-cache.redis.cache.windows.net
  
  spring.redis.password=&lt;password&gt;
  
  spring.redis.port=6380
  
  spring.redis.ssl=true
  </code></pre>
  <p>NodeJS config:</p>
  <pre><code>const client = redis.createClient(6380,
    'my-cache.redis.cache.windows.net',
    {
      auth_pass: &lt;password&gt;,
      tls: { servername: 'my-cache.redis.cache.windows.net' }
    });
  
  </code></pre>