设为首页收藏本站

LinuxTone | 运维专家网论坛 - 最棒的Linux运维与开源架构技术交流社区!

 找回密码
 注册

QQ登录

只需一步,快速开始

#公告#抱歉,网站将关闭,不再开放。由于PC时代已远逝 。在这个后移动互联网时代,我们继续携手前行,保持对技术的热情。共同构建linuxtone知识星球欢迎加入,一起讨论技术、招聘人才、分享资源。请新老linuxtone人 扫码移步到 知识星球:linuxtone

学习是一种信仰!分享是一种快乐!能力= 心态 * 沟通 * 知识 (你的每一天需要正能量!)

 网站的发展需要你贡献一份力量!希望你能每天坚持看贴1小时,并回答网友的问题!祝你在浏览论坛的过程中取得进步!谢谢!linuxtone加油!大家加油! 友情提示: 你今天学习了吗?你今天进步了吗?少一点抱怨!多一点进步!Life is short ! Why not linuxtone ?  

网站的发展、感谢每位坛友的努力!

查看: 3085|回复: 1

[lvs] redhat6.4 64位lvs Sendin Program判断对应Real Server脚本无法调用,h% [复制链接]

Rank: 4

签到
9
注册时间
2012-4-13
最后登录
2013-12-18
在线时间
5 小时
阅读权限
50
积分
1065
帖子
1
主题
1
精华
0
UID
19417
发表于 2013-12-5 13:24:11 |显示全部楼层
redhat6.4 64位lvs Sending Program判断对应Real Server脚本无法调用,h%参数无法传入
lvs.cf 配置:
serial_no = 30
primary = 192.168.0.242
primary_private = 192.168.0.242
service = lvs
backup = 0.0.0.0
heartbeat = 1
heartbeat_port = 539
keepalive = 6
deadtime = 18
network = direct
debug_level = NONE
virtual udp {
     active = 1
     address = 192.168.0.123 eth0:1
     vip_nmask = 255.255.255.0
     port = 8100
     expect = "OK"
     use_regex = 0
     send_program = "/etc/sysconfig/ha/lynx.sh %h"
     load_monitor = none
     scheduler = sh
     protocol = udp
     timeout = 6
     reentry = 15
     quiesce_server = 0
     server server1 {
         address = 192.168.0.178
         active = 1
         weight = 1
     }
     server server2 {
         address = 192.168.0.141
         active = 1
         weight = 1
     }
}
piranha页面信息:
CURRENT LVS ROUTING TABLE
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddressort Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
UDP 192.168.0.123:8100 sh
-> 192.168.0.141:8100 Route 1 0 1
-> 192.168.0.178:8100 Route 1 0 1


CURRENT LVS PROCESSES
root 2779 0.0 0.1 450736 5292 ? S<sl Dec04 0:00 /usr/bin/pulseaudio --start
root 2796 0.0 0.0 94988 2600 ? S Dec04 0:00 /usr/libexec/pulse/gconf-helper
root 3199 0.0 0.0 8768 548 ? Ss Dec04 0:00 pulse
root 3215 0.0 0.0 8756 824 ? Ss Dec04 0:00 /usr/sbin/lvsd --nofork -c /etc/sysconfig/ha/lvs.cf
root 3235 0.0 0.0 8732 804 ? Ss Dec04 0:01 /usr/sbin/nanny -c -h 192.168.0.178 -p 8100 -r 8100 -u -e /etc/sysconfig/ha/lynx.sh %h -x OK -a 15 -I /sbin/ipvsadm -t 6 -w 1 -V 192.168.0.123 -M g -U none --lvs
root 3236 0.0 0.0 8732 804 ? Ss Dec04 0:01 /usr/sbin/nanny -c -h 192.168.0.141 -p 8100 -r 8100 -u -e /etc/sysconfig/ha/lynx.sh %h -x OK -a 15 -I /sbin/ipvsadm -t 6 -w 1 -V 192.168.0.123 -M g -U none --lvs


lynx.sh 脚本内容:
#!/bin/bash
http='http://'
#ip='192.168.0.175'
ip=$1
port=':8080'
path='/sample-ui/lvsTest.jsp'
testString='OK'
test=$(lynx --dump $http$ip$port$path |grep -c $testString)
if [ $test -ge "1" ]
then
echo $1'OK' >> /usr/tbird/udp
echo 'OK'
else
echo $1'FAIL' >> /usr/tbird/udp
echo 'FAIL'
fi
tail -f /var/log/messages 日志:
Dec  5 10:53:52 web1 nanny[3235]: Ran the external sending program to (192.168.0
.178:8100) but didn't get anything back
Dec  5 10:53:52 web1 nanny[3236]: Ran the external sending program to (192.168.0
.141:8100) but didn't get anything back
Dec  5 10:53:58 web1 nanny[3236]: The following exited abnormally:
Dec  5 10:53:58 web1 nanny[3235]: The following exited abnormally:
Dec  5 10:53:58 web1 nanny[3235]: Ran the external sending program to (192.168.0
.178:8100) but didn't get anything back
Dec  5 10:53:58 web1 nanny[3236]: Ran the external sending program to (192.168.0
.141:8100) but didn't get anything back
Dec  5 10:54:04 web1 nanny[3235]: The following exited abnormally:
Dec  5 10:54:04 web1 nanny[3236]: The following exited abnormally:
Dec  5 10:54:04 web1 nanny[3236]: Ran the external sending program to (192.168.0
.141:8100) but didn't get anything back
Dec  5 10:54:04 web1 nanny[3235]: Ran the external sending program to (192.168.0
.178:8100) but didn't get anything back
有哪位大神知道原因不,求解答?在redhat6.0 64位系统这样配置运行都正常的,换了个版本系统就出现这种问题了,看看配置都一样,求解答?

Rank: 8Rank: 8

注册时间
2011-9-16
最后登录
2019-10-14
在线时间
912 小时
阅读权限
90
积分
252489
帖子
2158
主题
2
精华
0
UID
15647
发表于 2013-12-6 09:45:20 |显示全部楼层
这还真奇怪

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

IT运维专家网感谢您的支持

合作联系: QQ:67888954/MSN:cnseek@msn.com/mail:netseek@linuxtone.org

Archiver|手机版|感谢所有关心和支持过LinuxTone的朋友们 转载本站内容请注明原作者名及出处 ( 京ICP备08103151 )   |

GMT+8, 2019-10-15 06:53 , Processed in 0.021330 second(s), 14 queries , Apc On.

Powered by Discuz! X2 Licensed

© 2001-2011 Comsenz Inc.

回顶部