常见问题
1.1 make: cc:命令未找到,make: *** [adlist.o] 错误 127
解决方法:安装gcc,命令如下:
yum install gcc
1.2 Redis编译错误Killing still running Redis server 4966
Killing still running Redis server 4966
Killing still running Redis server 4971
Killing still running Redis server 4976
Killing still running Redis server 4978
Killing still running Redis server 4980
Killing still running Redis server 4983
Killing still running Redis server 4990
Killing still running Redis server 4991
Killing still running Redis server 4998
Killing still running Redis server 5001
Killing still running Redis server 5014
Killing still running Redis server 5134
Killing still running Redis server 5187
Killing still running Redis server 5208
Killing still running Redis server 5224
Killing still running Redis server 5253
Killing still running Redis server 5265
make[1]: *** [test] Error 1
make[1]: Leaving directory `/opt/redis/redis-4.0.2/src'
make: *** [test] Error 2
解决方案:
vim tests/integration/replication-2.tcl
将after 1000修改为after 10000
1.3 MISCONF Redis is configured to save RDB snapshots
异常信息:
redis.clients.jedis.exceptions.JedisDataException:
MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk.
Commands that may modify the data set are disabled.
Please check Redis logs for details about the error.
解决方案:
因为强制关闭Redis快照导致不能持久化。可以使用kill -9再次强制关闭掉redis,然后在重新启动。
1.4 Connection error: Connection refused
修改配置文件/etc/redis.conf,并注释掉bind 127.0.0.1这一行
1.5 Connection: Connection error: The remote host closed the connection
修改配置文件/etc/redis.conf,将protected-mode为no。
1.6 Node 192.168.88.101:7002 is not empty. Either the node already knows other nodes (check with CLUSTER NODES) or contains some key in database 0.
1) 先将redis 进程干掉 ps -ef | grep redis kill pid
2) 将每个节点下aof、rdb、nodes.conf本地备份文件删除,redis.conf appendfilename ;
3) 之后再执行脚本,成功执行;