Mar 26 11:17:21 localhost Keepalived_vrrp[2161]: WARNING - script
‘/etc/keepalived/nginx_check.sh’ is not executable for uid:gid 0:0 -
disabling.Mar 26 11:17:21 localhost Keepalived_vrrp[2161]: SECURITY
VIOLATION - scripts are being executed but script_security not
enabled.
配置nginx高可用时,测试master上的nginx挂掉VIP没有漂移,查看日志时发现有nginx检测脚本的报错
journalctl -xeu keepalived
解决办法:修改检测脚本的权限
chmod 755 /etc/keepalived/nginx_check.sh
systemctl restart keepalived.service
再次测试后VIP能正常漂移