关于LVS的DR模式问题

回复 收藏
配置好后在另一台虚拟机上curl流动IP,提示curl:(7) could't connect to host,求解决思路,配置是没问题的
2016-03-24 07:34 举报
已邀请:
0

乐橙306

赞同来自:

1.curl  -I     127.0.0.1  截图
2.curl  -I      vip           截图
3.ping         qq.com     截图
0

sunwang33

赞同来自:

我的思路是这样的,首先,先ping一下你第二台虚拟机看看能否Ping通,确保网络没有问题。如果你的第二台虚拟机是重新安装的,我会去检查一下selinux是否关闭,如果你第二台虚拟机上通过克隆方式安装的,我会去检查它是不是做了禁止ping或iptables的相关操作。最后我会检查你DR的相关配置。
0

vb3328998

赞同来自:

乐橙306 发表于 2016-3-24 09:36
1.curl  -I     127.0.0.1  截图
2.curl  -I      vip           截图
3.ping         qq.com     截图

[root@CCJ4 ~]# ping www.baidu.com
PING www.a.shifen.com (14.215.177.38) 56(84) bytes of data.
64 bytes from 14.215.177.38: icmp_seq=1 ttl=55 time=11.7 ms
64 bytes from 14.215.177.38: icmp_seq=2 ttl=55 time=18.7 ms
64 bytes from 14.215.177.38: icmp_seq=4 ttl=55 time=807 ms
64 bytes from 14.215.177.38: icmp_seq=5 ttl=55 time=13.0 ms
^C
--- www.a.shifen.com ping statistics ---
5 packets transmitted, 4 received, 20% packet loss, time 4286ms
rtt min/avg/max/mdev = 11.761/212.877/807.985/343.595 ms
[root@CCJ4 ~]# curl -I 192.168.0.100
curl: (7) couldn't connect to host
[root@CCJ4 ~]# curl 127.0.0.1
curl: (7) couldn't connect to host
[root@CCJ4 ~]# curl 127.0.0.1 -I
curl: (7) couldn't connect to host
0

乐橙306

赞同来自:

vb3328998 发表于 2016-3-24 18:18
[root@CCJ4 ~]# ping www.baidu.com
PING www.a.shifen.com (14.215.177.38) 56(84) bytes of data.
64 ...

大哥   你后端 web 服务器的httpd服务没有正常启动,   80端口都没起来啊  。。。。。

1.netstat -lnp  |  grep  80     截图

2.简单点 直接yum  install  httpd*   然后  /etc/init.d/httpd  start   截图

3.netstat -lnp  |  grep  80     截图

4.curl  -I  127.0.0.1      截图

5.curl -I   VIP              截图


0

vb3328998

赞同来自:

sunwang33 发表于 2016-3-24 10:05
我的思路是这样的,首先,先ping一下你第二台虚拟机看看能否Ping通,确保网络没有问题。如果你的第二台虚拟 ...

每一台都ping得通,但是VIP就是ping不通,配置应该是没问题的,我是找论坛拷贝再修改那些IP的,iptables也没有规则,都被我清了
0

vb3328998

赞同来自:

乐橙306 发表于 2016-3-24 18:48
大哥   你后端 web 服务器的httpd服务没有正常启动,   80端口都没起来啊  。。。。。

1.netstat -lnp ...

[root@CCJ4 ~]# netstat -lnp |grep 80
tcp        0      0 :::80                       :::*                        LISTEN      1763/httpd
[root@CCJ4 ~]# curl 192.168.0.100 -I
curl: (7) couldn't connect to host
[root@CCJ4 ~]# curl -I 127.0.0.1
HTTP/1.1 403 Forbidden
Date: Thu, 24 Mar 2016 16:12:28 GMT
Server: Apache/2.2.15 (CentOS)
Accept-Ranges: bytes
Content-Length: 4961
Connection: close
Content-Type: text/html; charset=UTF-8

0

vb3328998

赞同来自:

sunwang33 发表于 2016-3-24 10:05
我的思路是这样的,首先,先ping一下你第二台虚拟机看看能否Ping通,确保网络没有问题。如果你的第二台虚拟 ...

我去,终于解决了,80端口被过滤....

回复帖子,请先登录注册

退出全屏模式 全屏模式 回复
评分
可选评分理由: