skip to Main Content

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.

enter image description here

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.

Java config:

spring.redis.host=my-cache.redis.cache.windows.net

spring.redis.password=<password>

spring.redis.port=6380

spring.redis.ssl=true

NodeJS config:

const client = redis.createClient(6380,
  'my-cache.redis.cache.windows.net',
  {
    auth_pass: <password>,
    tls: { servername: 'my-cache.redis.cache.windows.net' }
  });

2

Answers


  1. Chosen as BEST ANSWER

    This is solved by the following on my Windows Desktop VM:

    1. Click Start.
    2. Enter cmd in the Start menu search text box.
    3. Right-click Command Prompt and select Run as Administrator.
    4. Run the following command: ipconfig /flushdns
    5. Run the following command: ipconfig /registerdns

  2. well, the other end must accept connection as well, so you mist allow connections from the VM if you have any firewall rules at all:

    https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-configure#firewall

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search