zoukankan      html  css  js  c++  java
  • LVS的RS(readserver)OutBytes返回内容0

    环境:在虚拟机里测试

    服务器一
    VIP:192.168.10.10 (Director 对外公网IP)
    DIP:10.0.0.2  (Director 集群对ReadServer 内外IP)
    
    服务器二
    RIP_1:10.0.0.3 (RS 提供http处理的真机)
    
    服务器三
    RIP_2:10.0.0.4 (RS 提供http处理的真机)  

     

    问题:VIP能正常访问,执行ipvsadm -L -n --stats也能看到计数器在变化,唯独没有从RS里返回回来的数据OutBytes为0

    # while true ;do  ipvsadm -L -n --stats ;sleep 2; done
    IP Virtual Server version 1.2.1 (size=4096)
    Prot LocalAddress:Port               Conns   InPkts  OutPkts  InBytes OutBytes
      -> RemoteAddress:Port
    TCP  192.168.200.132:80                63      424      236    40931    0
      -> 10.0.0.3:80                       31      193      106    16293    0
      -> 10.0.0.4:80                       32      231      130    24638    0 

     PS:,while命令是循环的执行ipvsadm -L -n --stats后休息2秒,在执行。

    解决方法:

    忽然想到是不是因为虚拟机里的RS(ReadServer)有两块网卡导致的,一块是ens32 另一块是ens34 ,ens34里是和LVS要用到的。停掉另一块不用的ens32。

    # ifdown ens32
    

     这时,用VIP打开就正常了。网页可以轮询的显示RS web 1 和 web2 的内容了。

    参考:

    http://cloud.tencent.com/developer/article/1444874

    http://cnblogs.com/zhoading/p/11558463.html

     

  • 相关阅读:
    Hadoop安装配置(ubuntu-12.04.2-server-amd64)
    初识hadoop
    mybatis多表关联配置
    mybatis的详解
    SpringMVC学习笔记
    spring注解
    web filter用spring注入对象
    luence全文检索(数据库检索)
    C++ inline 函数
    Ubuntu16.04 QT5编译出现cannot find -lGL和collect2:error:ld r
  • 原文地址:https://www.cnblogs.com/wutou/p/14152730.html
Copyright © 2011-2022 走看看