For the past few weeks I have been using a redis server locally on Windows 10 using WSL 2/Ubuntu 20.04 and now suddenly I can't connect to the server anymore. Here is what I usually did in linux terminal that opens when you run ubuntu using wsl 2:
$ sudo service redis-server start
$ sudo service redis-server status
* redis-server running
But now if I try to run the redis-cli
command I get this error:
Could not connect to Redis at 127.0.0.1:6379: Network is unreachable
I have checked the ip and port using:
$ ps aux | grep redis
which returns
redis 190 0.2 0.0 51704 9796 ? Ssl 17:12 0:00 /usr/bin/redis-server 127.0.0.1:6379
From what I can tell this is telling me that the server is running at 127.0.0.1:6379 yet I cannot connect to it. Every post I can find on this kind of issue shows the error as
Could not connect to Redis at 127.0.0.1:6379: Connection Refused
instead of "network is unreachable" so I'm not sure what the issue is.