2

I made a Debian 9 VM on Azure, I also installed MariaDB, PHPMyAdmin, and node with pm2. With this, I set in inbound rules port 80 for HTTP, 3306 for MySQL and port 6379 for the Redis.

when i try to connect with the windows client it refuses or in code it also refuses and i get "Error: Redis connection to [someIP]:6379 failed - connect ETIMEDOUT [someIP]:6379". when I change the connection settings to another Redis I own it does work, so there shouldn't be an issue with the code.

in short: what should I check for a successful connection from my home network to the Redis on Azure.

1 Answers1

0

I refer this official document and install redis on Debian 9. I could connect it with VM Public IP.

You should enable Redis is listening on VM's private IP. By default, it listens on localhost. Modify /etc/redis/6379.conf as below:

bind <vm's private ip>

Then restart Redis. systemctl restart redis_6379.

Check connection on Linux.

root@shui:~/redis-stable/utils# redis-cli -h 52.232.114.152
52.232.114.152:6379> set test HugeServer
OK
52.232.114.152:6379> get test
"HugeServer"

Note: You should open port 6379 on NSG like this screenshot.

Shui shengbao
  • 462
  • 3
  • 8