Can't bind TCP listener *:6379 using Redis on Windows

Solution 1:

You must've used the .msi installer. It automagically registers a windows service which starts instantly after the installation (at least on my win 10 machine).

This service uses the default config and binds to port 6379. When you start redis-server from the command line, if you haven't specified a different port through a config file, it picks up the default config again and tries to bind to port 6379 which fails.

Your cli works because it connects to the redis service that's already listening on 6379. Your shutdown command stops the service and from there things work as expected. Mystery solved. Case closed.

Solution 2:

cdto the bin directory of Redis, and run

  1. redis-cli.exe
  2. shutdown
  3. exit

open another cmd window, cd to the bin directory of Redis, and run

4.redis-server.exe

Solution 3:

Now service is normally.I run redis-cli.exe in the same window,and it connect correctly.Then I typed shutdown,the service is over.Reopen a command windows,type redis-server.The service run correctly.But I still did not understand why # Creating Server TCP listening socket *:6379:No such file or directory came out.

Solution 4:

We had a similar/related "redis-server.exe" service hosting issue.

After installing the Redis Windows Service, we could access the service on port 6379 locally, but not from a remote client (even though the firewall was configured to allow inbound traffic on the port).

In order to resolve the issue, we had to edit the redis.windows-service.conf configuration file and change the following:

  • bind 127.0.0.1 needed use the actual IP address
  • protected-mode yes needed to be set to "no"

After making the above changes, we restarted the Redis service and were able to connect from all clients.

Solution 5:

Its simple and works for me nice: -open redis-cli (default in C:\Program Files\Redis) and run this command:

shutdown

Finished.

now open cmd and try redis-server again.

I know its a little late for answering but because maybe others faced this problem later I answered it.