keepalived+lvs无法访问vip或访问超时
2017-07-19 14:41
3851 查看
1. 在访问vip的时候,连接被拒绝,但是可以ping通:
检查配置文件
首先检查防火墙和selinux,都是关闭的。
查看RS端的arptables的策略。
2. 访问VIP超时,但是可以ping通:
LVS端看到状态是SYN_RECV,说明请求已经到达LVS,但是在发给后端Real Server的时候出现问题。
数据包的进出策略是正确的,但依然无法处理数据包。数据包出去只是发送,肯定是好的,那么就只能是数据包解析出错。数据包在传给RS后,解析ip,如果发现自己的VIP且和解析出的IP一致,那么就没有问题,说明vip和解析的ip不一致,但访问的是VIP,解析出的目的IP一定是VIP,那么只有RS上的VIP有问题,查看的时候发现没有VIP,是因为添加VIP是通过 ‘ip addr add 172.25.67.200/24 dev eth0’命令,而重启两台RS后VIP就没了。
[kiosk@foundation67 Desktop]$ curl -I 172.25.67.200 curl: (7) Failed connect to 172.25.67.200:80; Connection refused [kiosk@foundation67 Desktop]$ ping 172.25.67.200 PING 172.25.67.200 (172.25.67.200) 56(84) bytes of data. 64 bytes from 172.25.67.200: icmp_seq=1 ttl=64 time=0.160 ms 64 bytes from 172.25.67.200: icmp_seq=2 ttl=64 time=0.207 ms ^C
检查配置文件
首先检查防火墙和selinux,都是关闭的。
查看RS端的arptables的策略。
# arptables --list Chain IN (policy ACCEPT) target source-ip destination-ip source-hw destination-hw hlen op hrd pro DROP anywhere 172.25.67.200 anywhere anywhere any any any any Chain OUT (policy ACCEPT) target source-ip destination-ip source-hw destination-hw hlen op hrd pro mangle 172.25.67.200 anywhere anywhere anywhere any any any any --mangle-ip-s server3 Chain FORWARD (policy ACCEPT) target source-ip destination-ip source-hw destination-hw hlen op hrd pro
2. 访问VIP超时,但是可以ping通:
客户端返回内容: [root@foundation67 Desktop]# curl 172.25.67.200 curl: (7) Failed connect to 172.25.67.200:80; Connection timed out 在调度端: [root@server1 ~]# ipvsadm -l IP Virtual Server version 1.2.1 (size=4096) Prot LocalAddress:Port Scheduler Flags -> RemoteAddress:Port Forward Weight ActiveConn InActConn TCP 172.25.67.200:http rr -> server3:http Route 1 0 0 -> server4:http Route 1 0 1 [root@server1 ~]# ipvsadm -lnc IPVS connection entries pro expire state source virtual destination TCP 00:53 SYN_RECV 172.25.67.250:51808 172.25.67.200:80 172.25.67.4:80
LVS端看到状态是SYN_RECV,说明请求已经到达LVS,但是在发给后端Real Server的时候出现问题。
数据包的进出策略是正确的,但依然无法处理数据包。数据包出去只是发送,肯定是好的,那么就只能是数据包解析出错。数据包在传给RS后,解析ip,如果发现自己的VIP且和解析出的IP一致,那么就没有问题,说明vip和解析的ip不一致,但访问的是VIP,解析出的目的IP一定是VIP,那么只有RS上的VIP有问题,查看的时候发现没有VIP,是因为添加VIP是通过 ‘ip addr add 172.25.67.200/24 dev eth0’命令,而重启两台RS后VIP就没了。
相关文章推荐
- linux系统搭建keepalived+LVS负载均衡无法访问VIP的问题
- keepalived导致lvs vip无法解绑
- 使用keepalived加lvs做负载均衡,访问后端的服务器,2分钟后超时,需要重新登录
- LVS+Keepalived+Nginx+Tomcat高可用负载均衡集群配置(DR模式,一个VIP,多个端口)
- 基于keepalived 实现VIP转移,lvs,nginx的高可用
- 关于云服务器可以远程桌面连接,但是浏览器无法访问服务器的网址,显示服务器连接超时问题
- 基于keepalived 实现VIP转移,lvs,nginx的高可用
- LVS NAT 超实用配置 解决页面无法访问
- Keepalived无法绑定VIP故障排查经历
- lvs主备可以自由切换,vip落在主上的时候,端口无法telnet,业务连接不了
- iptables规则导致lvs直接访问vip很慢
- "SQL Server 不存在或访问被拒绝","无法连接到服务器,用户xxx登陆失败","连接超时"处理方法
- Zabbix监控LVS状态及keepalived VIP漂移
- Keepalived无法绑定VIP故障排查经历
- 基于keepalived 实现VIP转移,lvs,nginx的高可用
- 基于keepalived 实现VIP转移,lvs,nginx的高可用
- 基于keepalived 实现VIP转移,lvs,nginx的高可用
- LVS的nat模式连接超时及无法连接主机排错总结
- 【操作系统-Windows】无法ping通对方机器,无法访问对方机器(连接超时)
- LVS+Keepalived 多个VIP 测试总结