关于Redis报错:sentinel directive while not in sentinel mode 解决
关于Redis报错:sentinel directive while not in sentinel mode 解决启动redis哨兵机制的时候,居然报错这个信息,仔细一看才发现,原来是自己命令敲错了!敲的命令是:src/redis-server ./redis_cluster/7000/sentinel-7000.conf sentinel*** FATAL CONFIG FILE ...
关于Redis报错:sentinel directive while not in sentinel mode 解决
启动redis哨兵机制的时候,居然报错这个信息,仔细一看才发现,原来是自己命令敲错了!
敲的命令是:src/redis-server ./redis_cluster/7000/sentinel-7000.conf sentinel
*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 84
>>> 'sentinel monitor mymaster 120.79.233.206 7000 2'
sentinel directive while not in sentinel mode
眼尖的同学应该已经看出来了,就是最后面的sentinel,没有加上--,正确的写法是:
src/redis-server ./redis_cluster/7000/sentinel-7000.conf --sentinel
注意:--sentinel
正常启动成功!
我们可以不用这么担心,这么麻烦后面还要加上--sentinel ,一不小心还敲错了!
我们可以使用 redis->src 目录下的 redis-sentinel 命令,这样就不需要写后面的 --sentinel 参数了!
写法如下:
src/redis-sentinel ./redis_cluster/7000/sentinel-7000.conf
同样的启动成功!
各位小伙伴,有什么不足的地方,欢迎底下留言,谢谢!
更多推荐
所有评论(0)