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

前端 未结 9 1230
悲&欢浪女
悲&欢浪女 2021-01-30 16:25

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

9条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-30 17:21

    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.

提交回复
热议问题