序言
在linux环境配置以及测试redis相关的技术,在部署redis的哨兵模式的时候,由于自己的粗心大意,导致部署的时候一致报如下的错误:
*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 85
>>> 'sentinel monitor mymaster 192.168.197.132 6379 2'
sentinel directive while not in sentinel mode
最后发现,竟然是因为部署哨兵模式的时候,使用的启动命令不对造成的,正确的命令如下:
redis-sentinel sentinel.conf
而我导致错误的启动命令是这样的:
redis-server sentinel.conf
而我自己部署的时候,粗心的把后面的-sentinel竟然给忘了。为了避免类似的事情发生,建议大家使用redis-sentinel sentinel.conf代替redis-server命令
特在此留下字据,给自己提醒
借鉴博客:https://blog.csdn.net/liuchuanhong1/article/details/73844499/