如何在Piranha环境下做Socket应用服务的负载
如何在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一直没有被检测到,不知道我这样做对不对,错在哪里。请做过的有经验的朋友指点指点。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
补充一下错误日志
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)
兄弟,你这个问题解决了没。我也遇到跟你一样的问题。一直困扰着我,都快1个月了。
同样的问题,被小弟也遇到了,秋前辈解惑呀,qq10153722