签到成功

知道了

CNDBA社区CNDBA社区

keepalived 启动后立即关闭 分析过程

2023-12-15 16:08 841 0 原创 Linux
作者: dave

1 问题现象

keepalived 启动后立即关闭,但是查看日志并没有异常的错误信息:https://www.cndba.cn/dave/article/131484https://www.cndba.cn/dave/article/131484https://www.cndba.cn/dave/article/131484

https://www.cndba.cn/dave/article/131484
https://www.cndba.cn/dave/article/131484

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。 https://www.cndba.cn/dave/article/131484https://www.cndba.cn/dave/article/131484

https://www.cndba.cn/dave/article/131484

很小的问题,一直没旅顺,浪费了不少时间,随笔记之。 https://www.cndba.cn/dave/article/131484

https://www.cndba.cn/dave/article/131484

[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"
……
}

版权声明:本文为博主原创文章,未经博主允许不得转载。

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
dave

dave

关注

人的一生应该是这样度过的:当他回首往事的时候,他不会因为虚度年华而悔恨,也不会因为碌碌无为而羞耻;这样,在临死的时候,他就能够说:“我的整个生命和全部精力,都已经献给世界上最壮丽的事业....."

  • 2249
    原创
  • 3
    翻译
  • 573
    转载
  • 191
    评论
  • 访问:7505774次
  • 积分:4303
  • 等级:核心会员
  • 排名:第1名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ