keepalived常见错误汇总

错误内容:

WARNING - default user 'keepalived_script' for script execution does not exist - please create.

解决方案:

在keepalived.conf的global_defs配置节中增加script_user root

global_defs {
   router_id 1
   script_user root
}

 

错误内容:

WARNING - script '/etc/keepalived/script/checkmysql.sh' is not executable for uid:gid 0:0 - disabling.

解决方案:

赋予/etc/keepalived/script/checkmysql.sh执行权限,或者脚本改成如下写法

vrrp_script chk_mysql {
   script "bash /etc/keepalived/script/checkmysql.sh"
}

 

错误内容:

SECURITY VIOLATION - scripts are being executed but script_security not enabled.

解决方案:

在keepalived.conf的global_defs配置节中增加enable_script_security配置

global_defs {
   router_id 1
   enable_script_security
}

 错误内容:

无法ping通VIP

解决方案:

检查global_defs中是否配置了vrrp_strict,将其注释

global_defs {
   router_id 1
   vrrp_strict #严格遵守VRRP协议,不允许状况:1,没有VIP地址,2.配置了单播,3.在VRRP版本2中有IPv6地址
}

 

posted @   Granding  阅读(1752)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 三行代码完成国际化适配,妙~啊~
· .NET Core 中如何实现缓存的预热?
点击右上角即可分享
微信分享提示