启动keepalived报错(VI_1): received an invalid passwd!
一、署keepalived后测试主down掉后无法自动切换到备
查看message日志一直报此错误
[root@lb-nginx-master ~]# tailf /var/log/messages
Jul :: lb-nginx-master Keepalived_vrrp[]: (VI_1): received an invalid passwd!
Jul :: lb-nginx-master Keepalived_vrrp[]: bogus VRRP packet received on eth0 !!!
Jul :: lb-nginx-master Keepalived_vrrp[]: VRRP_Instance(VI_1) Dropping received VRRP packet...
Jul :: lb-nginx-master Keepalived_vrrp[]: (VI_1): received an invalid passwd!
Jul :: lb-nginx-master Keepalived_vrrp[]: bogus VRRP packet received on eth0 !!!
Jul :: lb-nginx-master Keepalived_vrrp[]: VRRP_Instance(VI_1) Dropping received VRRP packet...
二、原因分析
因为virtual_router_id,路由ID实例,必须是唯一的,其它环境中有存在相同的实例ID,所以要修改一个其它的实例ID
# 主节点
[root@lb-nginx-master ~]# cat /etc/keepalived/keepalived.conf
bal_defs {
# 接收邮件地址
notification_email {
acassen@firewall.loc
failover@firewall.loc
sysadmin@firewall.loc
}
# 邮件发送地址
notification_email_from Alexandre.Cassen@firewall.loc
smtp_server 127.0.0.1
smtp_connect_timeout
router_id NGINX_MASTER
} vrrp_script check_nginx {
script "/etc/keepalived/check_nginx.sh"
} vrrp_instance VI_1 {
state MASTER
interface eth0
virtual_router_id # VRRP 路由 ID实例,每个实例是唯一的
priority # 优先级,备服务器设置
advert_int # 指定VRRP 心跳包通告间隔时间,默认1秒
authentication {
auth_type PASS
auth_pass
}
virtual_ipaddress {
192.168.5.60/
}
track_script {
check_nginx
}
} # 备节点
[root@lb-nginx-backup ~]# cat /etc/keepalived/keepalived.conf
bal_defs {
# 接收邮件地址
notification_email {
acassen@firewall.loc
failover@firewall.loc
sysadmin@firewall.loc
}
# 邮件发送地址
notification_email_from Alexandre.Cassen@firewall.loc
smtp_server 127.0.0.1
smtp_connect_timeout
router_id NGINX_MASTER
} vrrp_script check_nginx {
script "/etc/keepalived/check_nginx.sh"
} vrrp_instance VI_1 {
state BACKUP
interface eth0
virtual_router_id # VRRP 路由 ID实例,每个实例是唯一的
priority # 优先级,备服务器设置
advert_int # 指定VRRP 心跳包通告间隔时间,默认1秒
authentication {
auth_type PASS
auth_pass
}
virtual_ipaddress {
192.168.5.60/
}
track_script {
check_nginx
}
} # 检查脚本
[root@lb-nginx-master ~]# cat /etc/keepalived/check_nginx.sh
count=$(ps -ef |grep nginx |egrep -cv "grep|$$") if [ "$count" -eq ];then
systemctl stop keepalived
fi
主备都重启keepalived,重启后再测试已正常。
[root@lb-nginx-master ~]# systemctl start keepalived.service
[root@lb-nginx-backup ~]# systemctl restart keepalived
启动keepalived报错(VI_1): received an invalid passwd!的更多相关文章
- keepalived启动后报错:(VI_1): received an invalid passwd!的解决办法
一.配置好keepalived.conf文件后,启动keepalived,查看/var/log/message日志报错: [root@push-- sbin]# tail -f /var/log/me ...
- centos6 启动docker报错
1.启动docker报错: # service docker stop Stopping docker: [ OK ] [root@RSING data2]# service docker start ...
- maven 项目启动tomcat报错 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
maven项目启动tomcat报错: java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderLi ...
- 【转】Eclipse下启动tomcat报错:/bin/bootstrap.jar which is referenced by the classpath, does not exist.
转载地址:http://blog.csdn.net/jnqqls/article/details/8946964 1.错误: 在Eclipse下启动tomcat的时候,报错为:Eclipse下启动to ...
- 学习中的错误——ubuntu 14.04 LTS 启动eclipse报错
在ubuntu中启动eclipse报错:(Eclipse:15978): GLib-GIO-CRITICAL **: g_dbus_connection_get_unique_name: assert ...
- tomcat7 启动项目报错 java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig()
JDK版本:jdk1.8.0_77 Tomcat 版本:apache-tomcat-7.0.47 异常重现步骤: 1.完成项目部署 2.启动Tomcat 异常头部信息:java.lang.NoSuch ...
- Eclipse中启动tomcat报错:A child container failed during start
我真的很崩溃,先是workspace崩了,费了好久重建的workspace,然后建立了一个小demo项目,tomcat中启动却报错,挑选其中比较重要的2条信息如下: A child container ...
- Ubuntu下安装了java但启动eclipse报错说没装java
参考资料:http://blog.csdn.net/happyteafriends/article/details/8290950 一.问题 在Ubuntu下安装了java并在~/.bashrc配置了 ...
- VirtualBox启动虚拟机报错0x80004005
Unable to load R3 module C:\Program Files\Oracle\VirtualBox/VBoxDD.DLL (VBoxDD): GetLastError=1790 ( ...
随机推荐
- 在Github或Gitee上用hexo搭建个人博客
安装nodejs环境查看node版本node -v 安装cnpmnpm install cnpm -g --registry=https://registry.npm.taobao.org 安装 He ...
- 把jar包安装到本地Maven仓库
使用的场景 自己写的工具类想安装到本地 从Maven仓库中下载不下来的jar 使用的步骤 首先要保证自己的Maven配置全局环境变量,如果没有配置过maven全局变量,可以按照下面的步骤配 ...
- json字符串手动拼接
return "xxx{" + "xxx='" + xxx+ '\'' + ", ggg='" + ggg+ '\'' + ", ...
- Matlab 整数线性规划问题模型代码
整数线性规划问题的基本内容 整数线性规划解决的是自变量在一定的线性约束条件下,使得线性目标函数求得最大值或者最小值的问题.其中自变量只能取整数.特别地,当自变量只能取0或者1时,称之为 0-1 整数规 ...
- pip install 时报错 pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
pip install 时报错: pip is configured with locations that require TLS/SSL, however the ssl module in Py ...
- Java练习——扑克牌发牌器
Java练习——扑克牌发牌器声明:学习自其他博主,感谢分享,这里自己也写了一下.实现思路 - 构建一张扑克牌 - 构建一套扑克牌 - 测试 构建一张扑克牌 /** * @author 冬冬 * 定义 ...
- Java学习:线程的安全问题
线程的安全问题 模拟卖票案例创建三个的线程,同时开启,对共享的票进行出售 public class RunnableImpl implementsc Runnable{ //定义一个多线程共享的票源 ...
- 封装:简要介绍自定义开发基于WPF的MVC框架
原文:封装:简要介绍自定义开发基于WPF的MVC框架 一.目的:在使用Asp.net Core时,深感MVC框架作为页面跳转数据处理的方便,但WPF中似乎没有现成的MVC框架,由此自定义开发一套MVC ...
- C# 接口、抽象类、以及事件
接口.抽象类,用于项目集成,如: Interface icls = appid == "A" ? new ClassA() : new ClassA();icls.func(&qu ...
- selenium中元素操作之上传操作(六)
上传操作分为两种情况: 1.input标签上传 如果是input可以直接输入路径的,那么直接调用send_keys输入路径,和前边的元素操作类似,在这里不再过多的赘述. 2.非input标签上传 非i ...