Let’s check that the load balancer is running on lb:
# ldirectord ldirectord.cf status
You should see something like this:
ldirectord for /etc/ha.d/ldirectord.cf is running with pid:
1455
If you see something like this instead:
ldirectord is stopped for /etc/ha.d/ldirectord.cf
there’s some problem. You can stop the director and restart it with the debug flag -d, and see whether any errors appear in the output:
# /usr/sbin/ldirectord /etc/ha.d/ ldirectord.cf stop
# /usr/sbin/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: Starting Linux Director v1.77.2.32 with pid: 12984
Starting Linux Director v1.77.2.32 with pid: 12984
DEBUG2: Running system(/sbin/ipvsadm -A -t 70.253.158.42:80 -s rr )
Running system(/sbin/ipvsadm -A -t 70.253.158.42:80 -s rr )
DEBUG2: Added virtual server: 70.253.158.42:80
Added virtual server: 70.253.158.42:80
DEBUG2: Disabled server=70.253.158.45
DEBUG2: Disabled server=70.253.158.41
DEBUG2: Checking negotiate: real
server=negotiate:http:tcp:70.253.158.41:80:::\/
director\.html:I\'m\ alive\!
(virtual=tcp:70.253.158.42:80)
DEBUG2: check_http: url="http://70.253.158.41:80/director.html"
virtualhost="70.253.158.41"
LWP::UserAgent::new: ()
LWP::UserAgent::request: ()
LWP::UserAgent::send_request: GET http://70.253.158.41:80/director.html
LWP::UserAgent::_need_proxy: Not proxied
LWP::Protocol::http::request: ()
LWP::Protocol::collect: read 11 bytes
LWP::UserAgent::request: Simple response: OK
45:80/director.html is up
The output is shorter ifchecktypeischeck.
Just to be nosy, we’ll see what the lower-level IP virtual server says:
# ipvsadm -L -n
IP Virtual Server version 1.2.0 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port | Forward Weight ActiveConn InActConn |
TCP | 70.253.158.42:80 rr | |
-> 70.253.158.45:80 | Route | 1 | 1 | 2 |
-> 70.253.158.41:80 | Route | 1 | 0 | 3 |
This shows that our first realserver is active, but the second is not.
blog comments powered by