1 问题现象
keepalived 启动后立即关闭,但是查看日志并没有异常的错误信息:
Fri Dec 15 15:38:36.631212266 2023: CPU usage (self/children) user: 0.000936/0.004612 system: 0.000000/0.007444
Fri Dec 15 15:38:36.631242413 2023: Stopped Keepalived v2.2.8 (04/04,2023), git commit v2.2.7-154-g292b299e+
Fri Dec 15 15:49:07.110573717 2023: Starting Keepalived v2.2.8 (04/04,2023), git commit v2.2.7-154-g292b299e+
Fri Dec 15 15:49:07.110694039 2023: Running on Linux 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 (built for Linux 3.10.0)
Fri Dec 15 15:49:07.110713173 2023: Command line: '/data/mysql/3308/utils/keepalived/sbin/keepalived' '-D' '-f'
Fri Dec 15 15:49:07.110720663 2023: '/data/mysql/3308/utils/keepalived/etc/keepalived/keepalived.conf' '-p'
Fri Dec 15 15:49:07.110726103 2023: '/data/mysql/3308/utils/keepalived/run/keepalived.pid'
Fri Dec 15 15:49:07.110731231 2023: '--log-file=/data/mysql/3308/utils/keepalived/logs/keepalived.log' '-r'
Fri Dec 15 15:49:07.110736558 2023: '/data/mysql/3308/utils/keepalived/run/vrrp.pid' '-c'
Fri Dec 15 15:49:07.110741624 2023: '/data/mysql/3308/utils/keepalived/run/checkers.pid'
Fri Dec 15 15:49:07.110860363 2023: Opening file '/data/mysql/3308/utils/keepalived/etc/keepalived/keepalived.conf'.
Fri Dec 15 15:49:07.110888253 2023: Configuration file /data/mysql/3308/utils/keepalived/etc/keepalived/keepalived.conf
Fri Dec 15 15:49:07.156417701 2023: NOTICE: setting config option max_auto_priority should result in better keepalived performance
Fri Dec 15 15:49:07.156850065 2023: Starting VRRP child process, pid=5356
Fri Dec 15 15:49:07.158494999 2023: Startup complete
Fri Dec 15 15:49:07.167328918 2023: Stopping
2 故障解决
排查了半天,问题出在检测脚本上,在启动后,脚本会检测,因为依赖的进程没有启动,所以导致 keepalived vrrp 验证失败,然后关闭了 keepalived。
很小的问题,一直没旅顺,浪费了不少时间,随笔记之。
[dave@www.cndba.cn:~]# cat /data/mysql/3308/utils/keepalived/etc/keepalived/keepalived.conf
! Configuration File for keepalived
vrrp_script chk_proxysql_23308 {
script "/data/mysql/3308/utils/keepalived/scripts/proxysql_check.sh 3308"
……
}
版权声明:本文为博主原创文章,未经博主允许不得转载。
- 上一篇:vim 搜索及高亮取消
- 下一篇:MySQL 分区表 操作示例