[Redis]sentinel 실행 오류

DB/Redis · 2021. 6. 9. 16:45

Redis seninel을 redis-server로 실행하려고 하면 다음과 같은 오류 메시지를 만날 수 있습니다.

[root]# redis-server sentinel.conf

*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 85
>>> 'sentinel monitor mymaster n.n.n.n 6379 2'
sentinel directive while not in sentinel mode

sentinel 모드가 아니란다..

그럼 sentinel 모드로 실행시켜주자.

[root]# redis-server sentinel.conf --sentinel
[root]# ps -ef|grep redis
root     23034     1  0 15:56 ?        00:00:00 redis-server 0.0.0.0:6379
root     24319     1  0 16:23 ?        00:00:00 redis-server 0.0.0.0:26379 [sentinel]

'--sentinel'로 명시해주고 실행해주니 서버가 잘 작동하는 것을 볼 수 있다.

 

사실 바로 redis-sentinel로 명시해주고 실행해주는게 맞긴하지만

[root]# redis-sentinel sentinel.conf
[roo]# ps -ef|grep redis
root     23034     1  0 15:56 ?        00:00:01 redis-server 0.0.0.0:6379
root     26624     1  0 16:38 ?        00:00:00 redis-sentinel 0.0.0.0:26379 [sentinel]

redis-server가 너무 손에 익어버려서 잘 안쓰게 되더라..🤣🤣🤣

 

+++

Sentinels는 기본적 으로 TCP 포트 26379에 대한 연결을 수신 대기하므로 반드시 서버의 포트 26379 가 열려 있어야 합니다. 

반응형