您现在的位置是: 首页 > 运维 sentinel directive while not in sentinel mode 问题解决

sentinel directive while not in sentinel mode 问题解决

2020-05-20 运维 3441人已围观 7150次浏览

简介sentinel directive while not in sentinel mode 问题解决

部署 Redis 哨兵时,出现了下面的提示

*** FATAL CONFIG FILE ERROR (Redis 6.0.1) ***
Reading the configuration file, at line 84
>>> 'sentinel monitor mymaster 192.168.202.1 6379 2'
sentinel directive while not in sentinel mode

查看文档发现是启动哨兵时的命令不对。下面是两种解决方案

第一种(推荐

直接使用 redis-sentinel 启动

./redis-sentinel.sh sentinel.conf

第二种

给 redis-server 增加 --sentinel 参数启动

./redis-server.sh sentinel.conf --sentinel

很赞哦! (0)

站长推荐

站点信息

  • 网站地图