Chinaunix

标题: 配置 ldirectord 时出现错误 [打印本页]

作者: jatic    时间: 2007-04-14 09:42
标题: 配置 ldirectord 时出现错误
启动ldirectord 后,日志ldirectord.log
[Sat Apr 14 09:37:50 2007|ldirectord|13113] Invoking ldirectord invoked as: /usr/sbin/ldirectord start
[Sat Apr 14 09:37:50 2007|ldirectord|13113] Starting Linux Director v1.141 as daemon
[Sat Apr 14 09:37:50 2007|ldirectord|13115] Changed virtual server: 192.168.1.121:80
[Sat Apr 14 09:37:50 2007|ldirectord|13115] Restored real server: 192.168.1.120:80 ( x 192.168.1.121:80) (Weight set to 2)

算正常吗?有两台 RealServer 怎么这里只能显示一台呢?而且我试过了,停了其中一台,根本不会自己检测出来,配置文件如下:


# Global Directives
checktimeout=3
checkinterval=1
fallback=127.0.0.1:80
autoreload=yes
logfile="/var/log/ldirectord.log"
#logfile="local0"
quiescent=yes

# A sample virual with a fallback that will override the gobal setting
virtual=192.168.1.121:80
        real=192.168.1.131:80 gate weight 1
        real=192.168.1.120:80 gate weight 2
        #real=192.168.6.6:80 gate
        fallback=127.0.0.1:80 gate
        service=http
        request="index.html"
        receive="Test Page"
        virtualhost=192.168.1.121
        scheduler=rr
        #persistent=600
        #netmask=255.255.255.255
        protocol=tcp


# service ldirectord status;
ldirectord stale pid file /var/run/ldirectord.ldirectord.pid for /etc/ha.d/ldirectord.cf
ldirectord is stopped for /etc/ha.d/ldirectord.cf

哪位来帮一下

[ 本帖最后由 jatic 于 2007-4-19 15:38 编辑 ]
作者: maluyao    时间: 2007-04-14 11:46
request="index.html"  #RS上得有这个文件
        receive="Test Page"   # 文件的内容
作者: jatic    时间: 2007-04-14 12:27
我改了一下:
request="testpage.html"  #RS上得有这个文件
receive="Test Page"   # 文件的内容

当前,目录中有这样的文件:
http://192.168.1.131/testpage.html 可以访问到内容

我把 131网卡down了,但还是不行哦

因为没有使用 backup director ,所以我没有配置 heartbeat ,只配置了 ldirectord ,启动方式:
#/etc/init.d/ldirectord start

日志:
[Sat Apr 14 12:10:42 2007|ldirectord|13202] Invoking ldirectord invoked as: /usr/sbin/ldirectord restart
[Sat Apr 14 12:10:42 2007|ldirectord|13202] Starting Linux Director v1.141 as daemon
[Sat Apr 14 12:10:42 2007|ldirectord|13204] Changed virtual server: 192.168.1.121:80
[Sat Apr 14 12:10:42 2007|ldirectord|13204] Restored real server: 192.168.1.120:80 ( x 192.168.1.121:80) (Weight set to 1)
[
这里并没有看到有 192.168.1.131 的IP哦。
作者: jatic    时间: 2007-04-14 13:17
# ldirectord -d /etc/ha.d/ldirectord.cf start

DEBUG2: Running exec(/usr/sbin/ldirectord -d /etc/ha.d/ldirectord.cf start)
Running exec(/usr/sbin/ldirectord -d /etc/ha.d/ldirectord.cf start)
DEBUG2: Invoking ldirectord invoked as: /usr/sbin/ldirectord /etc/ha.d/ldirectord.cf start
Invoking ldirectord invoked as: /usr/sbin/ldirectord /etc/ha.d/ldirectord.cf start
DEBUG2: Starting Linux Director v1.141 with pid: 13247
Starting Linux Director v1.141 with pid: 13247
DEBUG2: Running system(/sbin/ipvsadm -E -t 192.168.1.121:80 -s rr )
Running system(/sbin/ipvsadm -E -t 192.168.1.121:80 -s rr )
DEBUG2: Changed virtual server: 192.168.1.121:80
Changed virtual server: 192.168.1.121:80
DEBUG2: Enabled server=192.168.1.131
DEBUG2: Running system(/sbin/ipvsadm -e -t 192.168.1.121:80 -r 192.168.1.120:80 -g -w 1)
Running system(/sbin/ipvsadm -e -t 192.168.1.121:80 -r 192.168.1.120:80 -g -w 1)
DEBUG2: Restored real server: 192.168.1.120:80 ( x 192.168.1.121:80) (Weight set to 1)
Restored real server: 192.168.1.120:80 ( x 192.168.1.121:80) (Weight set to 1)
Can't locate Mail/Send.pm in @INC (@INC contains: /usr/lib/perl5/5.8.5/i386-linux-thread-multi /usr/lib/perl5/5.8.5 /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at /usr/sbin/ldirectord line 3002.
作者: jatic    时间: 2007-04-14 15:36
ldirectord.cf
文件中把 real=192.168.1.131 清除后,再启动 ldirectord ,这时,就没有把 131加进来
那就证明 ldirectord 是工作的,只是监视功能没有正常工作

另外,即时把 131 关了,再 restart ldirectord 也不能把 131 清除!

把 /etc/ha.d/ldirectord.cf 中的
persistent=60
netmask=255.255.255.255
注释取消后, restart ldirectord ,已经关了的 131 不会再列入可用 real server 中

难道要自己定义每隔一定时间运行 ldirectord restart 或者一定要 heartbeat 来管理?
道理上应该 start ldirectord 后,有一个守护进程的,是不是配置有问题呢?

晕了~~~~~~

[ 本帖最后由 jatic 于 2007-4-14 17:12 编辑 ]
作者: jatic    时间: 2007-04-17 09:44

人呢?
作者: jatic    时间: 2007-04-19 15:39
还是不行哦
~~~~~~~~~~
作者: agg230    时间: 2007-08-24 10:21
很简单 ldirectord.cf 配置错误




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2