[Solved] Redis startup error Creating Server TCP listening socket 127.0.0.1:6379: bind: No error

When installing Redis under windows, an error is reported at the first startup:

[2368] 21 Apr 02:57:05.611 # Creating Server TCP listening socket 127.0.0.1:6379: bind: No error

Solution: Run in the command line

redis-cli.exe

127.0.0.1:6379>shutdown

not connected>exit

Then re-run redis-server.exe redis.windows.conf, the startup is successful!

Start Redis

Open the command window directly in the directory above, and run:

  1. redis – server redis windows conf

The results on the tragedy, QForkMasterInit: system error caught. error code=0x000005af, message=VirtualAllocEx failed.: unknown error tips: . The reason is the memory allocation problem (if your computer is powerful enough, it may not be a problem). There are two solutions. First: Use --maxmemory commands to limit Redis memory at startup :

  1. redis – server redis windows conf  – maxmemory  200m

The second method is to modify the configuration file redis.windows.conf :

  1. maxmemory  209715200

Note that the unit is byte, after the change is as follows:

Then run redis-server redis.windows.conf it to start:

But here comes the problem again. Redis will be closed when the cmd window is closed. Is it necessary to keep the server open? This is obviously unscientific, let’s see how to deploy on the server.

Deploy Redis

In fact, Redis can be installed as a windows service. It starts automatically after booting. The command is as follows:

  1. redis – server  – service – install redis windows conf

After the installation is complete, you can see that Redis has been used as a windows service:

But after the installation, Redis did not start, the startup command is as follows:

  1. redis – server  – service – start

Stop command:

  1. redis – server  – service – stop

Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *