免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5195 | 回复: 3
打印 上一主题 下一主题

如何在Piranha环境下做Socket应用服务的负载 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-05-09 12:35 |只看该作者 |倒序浏览
如何在Piranha环境下做Socket应用服务的负载




感觉lvs是可以为socket做均衡负载的,只要调整一下monitor script脚本


可是最近一直没能做成功。

我做了个shell脚本如下

#!/bin/sh

if nc $1 1111 -w 3 -z;then
    echo "OK"
else
    echo "FAIL"
fi

可以检测1111端口

然后把monitor script上改为
Sending Program ="/opt/test.sh %h"
Send 不需要
Expact="OK"

realserver一直没有被检测到,不知道我这样做对不对,错在哪里。请做过的有经验的朋友指点指点。

论坛徽章:
0
2 [报告]
发表于 2011-05-09 12:36 |只看该作者
补充一下错误日志

Apr 17 03:26:44 localhost nanny[11343]: READ from xxx.xxx.xxx.xxx:1111 was too short
Apr 17 03:26:44 localhost nanny[11274]: READ from xxx.xxx.xxx.xxx:1111 was too short
Apr 17 03:26:45 localhost nanny[11276]: READ from xxx.xxx.xxx.xxx:1111 was too short
Apr 17 03:26:45 localhost nanny[11345]: READ from xxx.xxx.xxx.xxx:1111 was too short
Apr 17 03:26:45 localhost nanny[16487]: Trouble. Received results are not what we expected from (xxx.xxx.xxx.xxx:1111)
Apr 17 03:26:45 localhost nanny[16485]: Trouble. Received results are not what we expected from (xxx.xxx.xxx.xxx:1111)
Apr 17 03:26:46 localhost nanny[12934]: Trouble. Received results are not what we expected from (xxx.xxx.xxx.xxx:1111)
Apr 17 03:26:46 localhost nanny[12936]: Trouble. Received results are not what we expected from (xxx.xxx.xxx.xxx:1111)
Apr 17 03:26:47 localhost nanny[15045]: Trouble. Received results are not what we expected from (xxx.xxx.xxx.xxx:1111)
Apr 17 03:26:47 localhost nanny[15047]: Trouble. Received results are not what we expected from (xxx.xxx.xxx.xxx:1111)

论坛徽章:
0
3 [报告]
发表于 2012-03-07 13:48 |只看该作者
兄弟,你这个问题解决了没。我也遇到跟你一样的问题。一直困扰着我,都快1个月了。

论坛徽章:
0
4 [报告]
发表于 2015-03-28 19:45 |只看该作者
同样的问题,被小弟也遇到了,秋前辈解惑呀,qq10153722
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP