Perfect solution: redis-cli client remote access to other hosts redis-server disk is in use or is locked by another process problems (incidentally learn about redis startup mode)

Here Insert Picture Description

Scene: A computer running default redis-server (or double clicking directly cmd-Server running Redis)
B PC running redis-cli

Command:
A Computer: Redis-Server
B PC: Redis -H CLI-Host Port -a -p password
(-H -a server address port number -p password)

出现报错:Error: 磁盘在使用中,或被另一个进程锁定。
				以及一大段英文(如图)

Redis startup mode in the windows are:
1, no start Redis configuration parameters:
(1) Double redis-server.exe
(2) running under cmd command window redis-server or redis-server.exe

Start effect is as follows:
Here Insert Picture Description

You can see there are such a sentence:
G: \ Tools \ Redis-x64-3.2.100 \ Redis-server.exe /path/to/redis.conf
(default start effect, at this time no matter how modifications are redis.windows.conf It is invalid, and thus there is a second start)

2, start with the profile Redis

在cmd命令窗口下运行:redis-server redis.windows.conf或者redis-server.exe redis.windows.conf

Here Insert Picture Description

Such a way to start is to solve: disk is in use or is locked by another process.
Solution:
In the server, modify the configuration file redis.windows-service.conf in:

1 comment #bind 127.0.0.1

2, provided protected-mode no

When A computer running redis-server using the second method to start the perfect solution for remote access problem redis

Another Start:
3, the service windows redis added
(1) running in cmd command window: the install redis-server.exe --service-verbose redis.windows.conf --loglevel
(2) to start the service redis
in cmd run the command window: redis-Server --service-Start
(3) close redis service
running under cmd command window: redis-server --service-stop

I encounter this problem because it did record, hope to those in need have encountered similar problems not resolved friend a reference Ha ~

Published 13 original articles · won praise 2 · Views 3800

Guess you like

Origin blog.csdn.net/weixin_44019721/article/details/103978696