Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redis哨兵模式,哨兵ss启动失败。 #6

Closed
Lvmoo opened this issue Apr 23, 2021 · 0 comments
Closed

Redis哨兵模式,哨兵ss启动失败。 #6

Lvmoo opened this issue Apr 23, 2021 · 0 comments

Comments

@Lvmoo
Copy link

Lvmoo commented Apr 23, 2021

#kubectl get pods -n db | grep sentinel
redis-sentinel-master-ss-0 1/1 Running 0 6m
redis-sentinel-sentinel-ss-0 0/1 CrashLoopBackOff 2 41s
redis-sentinel-slave-ss-0 1/1 Running 0 6m
redis-sentinel-slave-ss-1 1/1 Running 0 5m56s
redis-sentinel-slave-ss-2 1/1 Running 0 5m53s

#kubectl logs redis-sentinel-sentinel-ss-0 -n db

*** FATAL CONFIG FILE ERROR (Redis 6.2.2) ***
Reading the configuration file, at line 3

'sentinel monitor mymaster redis-sentinel-master-ss-0.redis-sentinel-master-ss.db.svc.cluster.local 6379 2'
Can't resolve instance hostname.

从redis-sentinel-master-ss-0 或是redis-sentinel-slave-ss-0 redis-sentinel-slave-ss-1 都可以ping通mymaster redis-sentinel-master-ss-0.redis-sentinel-master-ss.db.svc.cluster.local

尝试将redis-sentinel-configmap.yaml的哨兵配置文件修改成ip的形式 sentinel monitor mymaster ip 2
可以正常起哨兵 也可以ping通mymaster redis-sentinel-master-ss-0.redis-sentinel-master-ss.db.svc.cluster.local。

按照默认的配置,pod就是起不来,提示上面的错误Can't resolve instance hostname.

@dotbalo dotbalo closed this as completed Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants