sentinel directive while not in sentinel mode問題解決策

537 ワード

今日redisの哨兵モードを配置する時、自分の不注意のため、配置する時一致して以下の誤りを報告します:
*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 2
>>> 'sentinel monitor mymaster 127.0.0.1 6379 2'
sentinel directive while not in sentinel mode

最後に、哨兵モードを配備する際に使用される命令が間違っていたため、正しい命令は以下の通りであることが分かった.
./redis-server.sh sentinel.conf --sentinel

私が自分で配置したとき、うっかり後ろのsentinelを忘れてしまった.似たようなことを避けるために、redis-sentinel sentinelを使うことをお勧めします.confはredis-serverコマンドの代わりに
ここに根拠を立てて、不注意な自分にも目を覚ます.