使用的是zip解压安装版本Redis-x64-5.0.14.1,报错信息如下:
运行服务器报错:
M:\02_install\Redis-x64-5.0.14.1>.\redis-server.exe
[17048] 23 Apr 08:07:33.057 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
[17048] 23 Apr 08:07:33.057 # Redis version=5.0.14.1, bits=64, commit=ec77f72d, modified=0, pid=17048, just started
[17048] 23 Apr 08:07:33.058 # Warning: no config file specified, using the default config. In order to specify a config file use .\redis-server.exe /path/to/redis.conf
[17048] 23 Apr 08:07:33.061 # Could not create server TCP listening socket *:6379: listen: 提供了一个无效的参数。
运行客户端也报错:
M:\02_install\Redis-x64-5.0.14.1>.\redis-cli.exe
Could not connect to Redis at 127.0.0.1:6379: 由于目标计算机积极拒绝,无法连接。
not connected>
not connected>
not connected> ^C
解决方法:
第一种解决办(试了不行)
修改redis.windows.conf,把bind 127.0.0.1的注释去掉,再运行。
第二种解决办法(试了不行)
在redis目录下
输入命令:redis-cli.exe 回车
在输入 shutdown 回车
再输入 exit 回车
重新输入:redis-server.exe redis.windows.conf 启动。
第三种解决办法(试了不行)
使用管理员权限运行CMD命令行窗口来操作,也不行。
第四种解决办法(可行)
修改redis.windows.conf,把bind 127.0.0.1的IP地址改为0.0.0.0,再启动运行OK
参考:
Could not create server TCP listening socket *:6379: listen: 提供了一个无效的参数。-CSDN博客