I\'m using Redis 2.8 on Windows which I downloaded from github release. After unzip and I\'ve set maxheap in redis.windows.conf
file. After running redis-serv
redis-server xxx.conf
to run a server with your configurationredis-cli
check redis issues(https://github.com/ServiceStack/redis-windows/wiki/Issues-might-happen)
C:\redis>redis-server.exe --service-install [8124] 03 Feb 23:58:14.573 # HandleServiceCommands: system error caught. error c ode=1073, message = CreateService failed: unknown error
C:\redis>redis-server --service-install redis.windows.conf --loglevel verbose [10848] 04 Feb 00:00:40.508 # HandleServiceCommands: system error caught. error code=1073, message = CreateService failed: unknown error
C:\redis>redis-server --service-install -–service-name redisService1 –port 100 01 Failed to open the .conf file: 10001 CWD=C:\redis
C:\redis>redis-server --service-install redis.windows.conf -–service-name redis Service1 –port 10001 Failed to open the .conf file: 10001 CWD=C:\redis
C:\redis>redis-server --service-install redis.windows.conf -–service-name redis Service1 –port 10001 Failed to open the .conf file: 10001 CWD=C:\redis
C:\redis>redis-server --service-install C:\redis\redis.windows.conf -–service-n ame redisService1 –port 10001 Failed to open the .conf file: 10001 CWD=C:\redis
C:\redis>redis-server --service-install C:\redis\redis.windows.conf -–service-n ame redisService1 –port 10001 Failed to open the .conf file: 10001 CWD=C:\redis
C:\redis>redis-server --service-install redis.windows.conf -–service-name redis Service1 –port 10001 Failed to open the .conf file: 10001 CWD=C:\redis
C:\redis> C:\redis>redis-server --service-install redis.windows.conf -–service-name redis Service1 –port 10001 Failed to open the .conf file: 10001 CWD=C:\redis
C:\redis>redis-server --service-install redis.windows.conf --loglevel verbose [11572] 04 Feb 00:03:34.847 # HandleServiceCommands: system error caught. error code=1073, message = CreateService failed: unknown error
C:\redis>redis-server --service-install redis.windows.conf --loglevel verbose -- service-name redisService [7484] 04 Feb 00:03:53.610 # Granting read/write access to 'NT AUTHORITY\Network Service' on: "C:\redis" "C:\redis" [7484] 04 Feb 00:03:53.612 # Redis successfully installed as a service.
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.
I just got the same error message, but the root cause was different: I copied the config file over from a different machine, but it contained a "bind" entry containing an IP address, which - for sure - was invalid for the new machine, i.e. bind 234.234.234.234
I changed it to the correct address and it was working as expected.