WSL: redis-cli cannot connect to redis-server.
I can sudo apt-get install redis-server with no errors. I can start redis-server either with redis-server --daemonize yes or redis-server &, but when I run redis-cli I get Could not connect to Redis at 127.0.0.1:6379: Connection refused.
About this issue
- Original URL
- State: closed
- Created 11 years ago
- Comments: 26 (7 by maintainers)
Worth noting, if you’re in production, you might want to run Redis in the background:
redis-server --daemonize yesHad the same issues trying to start redis-server from the command line. What did work was starting the redis-server which was installed, but not started, automatically.
In the past, I have built Redis myself (generally follow these instructions) and had good luck running from the command line there. Haven’t had a chance to try this on a straight Ubuntu VM, but it should get you moving.
Gah! This just bit me too … MUST MANUALLY START REDIS-SERVER FIRST! 😒
Faced same issue for 02 days. The workaround is first start the
redis-servermanually and then start the service. If you miss either of two, it showsConnection refusederror.Step 1: Run
redis-server --daemonize yesStep 2: Runsudo service redis-server startorsudo service redis-server restartOk, Congratulation 😄 ! I solve my problem through stop svchost.exe!
But i don’t want stop my svchost.exe that is about IPV6 NAT(Window system sevice)
If can i change port 6379 used by svchost.exe to others?
@doncadavona Thank you, I have successfully solved the problem!