免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1323 | 回复: 0

[服务应用] keepalived只能检查到本地realserver [复制链接]

论坛徽章:
0
发表于 2014-07-01 17:08 |显示全部楼层

QQ截图20140701165543.jpg

lvs 和 realserver 装在同一台主机上

192.168.1.188
  1. [root@node1 ~]# ipvsadm -ln
  2. IP Virtual Server version 1.2.1 (size=4096)
  3. Prot LocalAddress:Port Scheduler Flags
  4.   -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
  5. TCP  192.168.1.251:8000 rr
  6.   -> 192.168.1.188:80             Local   1      0          0
复制代码
为什么看不到192.168.1.69 realserver上脚本已启动 双方的80端口也能访问

192.168.1.188配置
  1. ! Configuration File for keepalived

  2. global_defs {
  3.    notification_email {
  4.     *@qq.com
  5.    }
  6.    notification_email_from *@qq.com
  7.    smtp_server 127.0.0.1
  8.    smtp_connect_timeout 30
  9.    router_id node1
  10. }

  11. vrrp_instance VI_1 {
  12.     state MASTER
  13.     interface eth0
  14.     virtual_router_id 51
  15.     priority 100
  16.     advert_int 1
  17.     authentication {
  18.         auth_type PASS
  19.         auth_pass 1111
  20.     }
  21.     virtual_ipaddress {
  22.         192.168.1.251
  23.     }
  24. }

  25. virtual_server 192.168.1.251 80 {
  26.     delay_loop 6
  27.     lb_algo rr
  28.     lb_kind DR
  29.         nat_mask 255.255.255.0
  30.     protocol TCP

  31.     real_server 192.168.1.188 80 {
  32.         weight 1
  33.         TCP_CHECK{
  34.             connect_timeout 10
  35.                         nb_get_retry 3
  36.                         delay_before_retry 3
  37.                         connect_port 80
  38.         }
  39.     }

  40.         real_server 192.168.1.69 80 {
  41.         weight 1
  42.         TCP_CHECK{
  43.             connect_timeout 10
  44.                         nb_get_retry 3
  45.                         delay_before_retry 3
  46.                         connect_port 80
  47.         }
  48.     }
  49. }
复制代码
Any answer will be appreciated
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP