LVS CentOS 5 ldirectord question

Discussion in 'HOWTO-Related Questions' started by xmichielx, Apr 25, 2010.

  1. xmichielx

    xmichielx New Member

    Hi,

    I followed http://www.howtoforge.com/efficient...d-cluster-on-centos-5.3-direct-routing-method and changed it to load balance smtp port 25.
    But I can not get a listening port 25 on my server.

    Some configs:
    -bash-3.2# ip addr sh eth0
    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:16:3e:4b:df:69 brd ff:ff:ff:ff:ff:ff
    inet 178.21.112.162/24 brd 178.21.112.255 scope global eth0
    inet 178.21.112.169/24 brd 178.21.112.255 scope global secondary eth0:1
    inet6 fe80::216:3eff:fe4b:df69/64 scope link
    valid_lft forever preferred_lft forever

    my /etc/ha.d/ldirectord.conf:
    checktimeout=30
    checkinterval=2
    autoreload=yes
    logfile="/var/log/ldirectord.log"
    quiescent=no
    virtual=178.21.112.169:25
    fallback=127.0.0.1:80
    real=194.145.200.17:25 gate
    real=194.145.200.171:25 gate
    service=smtp
    persistent=100
    scheduler=lblc
    protocol=tcp
    checktype=negotiate

    In /var/log/ldirectord.log:
    [Sun Apr 25 19:12:59 2010|ldirectord|15310] Invoking ldirectord invoked as: /usr/sbin/ldirectord start
    [Sun Apr 25 19:12:59 2010|ldirectord|15310] Starting Linux Director v1.186-ha-2.1.3 as daemon
    [Sun Apr 25 19:12:59 2010|ldirectord|15313] Added virtual server: 178.21.112.169:25
    [Sun Apr 25 19:12:59 2010|ldirectord|15313] Added fallback server: 127.0.0.1:80 (178.21.112.169:25) (Weight set to 1)
    [Sun Apr 25 19:12:59 2010|ldirectord|15313] Added real server: 194.145.200.17:25 (178.21.112.169:25) (Weight set to 1)
    [Sun Apr 25 19:12:59 2010|ldirectord|15313] Deleted fallback server: 127.0.0.1:25 mapped from 127.0.0.1:80 (178.21.112.169:25)
    [Sun Apr 25 19:12:59 2010|ldirectord|15313] Added real server: 194.145.200.171:25 (178.21.112.169:25) (Weight set to 1)


    Why isn't anything listening on port 25?
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Change
    Code:
    fallback=127.0.0.1:80
    to
    Code:
    fallback=127.0.0.1:25
     
  3. xmichielx

    xmichielx New Member

    Hi,

    But that is the fallback server, that isn't the port 25 listening right?
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Have you tried it? If it doesn't work, what's the output of
    Code:
    netstat -tap
    ?
     
  5. xmichielx

    xmichielx New Member

    Everything but smtp port 25:

    roto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0 *:imaps *:* LISTEN 5069/haproxy
    tcp 0 0 *:xmpp-client *:* LISTEN 5069/haproxy
    tcp 0 0 *:http *:* LISTEN 5069/haproxy
    tcp 0 0 *:ssh *:* LISTEN 1030/sshd
    tcp 0 0 localhost:26 *:* LISTEN 1174/master
    tcp 0 0 *:nsw-fe *:* LISTEN 5069/haproxy
    tcp 0 0 *:https *:* LISTEN 5069/haproxy
    tcp 0 0 vps704.directvps.nl:47534 mx1.pcintelligence.nl:smtp TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:36480 mx1.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:59835 mx2.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:34638 mx1.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvp:xmpp-client office.info.nl:36661 ESTABLISHED 5069/haproxy
    tcp 0 0 vps704.directvps.nl:35351 mx2.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:http crawl-66-249-65-52.go:54762 TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:59943 mx2.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:34618 mx1.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:59845 mx2.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:35321 mx2.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:36519 mx1.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:36332 mx1.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:59865 mx2.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:36302 mx1.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:35577 mx2.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:34736 mx1.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:imaps office.info.nl:33819 ESTABLISHED 5069/haproxy
    tcp 0 0 vps704.directvps.nl:35522 mx2.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:35432 mx2.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:55452 mx2.pcintelligence.nl:imaps ESTABLISHED 5069/haproxy
    tcp 0 0 vps704.directvps.nl:47540 mx1.pcintelligence.nl:smtp TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:ssh office.info.nl:56568 ESTABLISHED 5199/0
    tcp 0 0 vps704.directvps.nl:36292 mx1.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:35372 mx2.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:34598 mx1.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:36363 mx1.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:59855 mx2.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:36561 mx1.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:47548 mx1.pcintelligence.nl:smtp TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:34788 mx1.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:59815 mx2.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:47520 mx1.pcintelligence.nl:smtp TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:34668 mx1.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:47482 mx1.pcintelligence.nl:smtp TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:47491 mx1.pcintelligence.nl:smtp TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:47757 mx2.pcintelligence.nl:smtp TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:36282 mx1.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:47735 mx2.pcintelligence.nl:smtp TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:59744 mx2.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:35341 mx2.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:34648 mx1.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:47743 mx2.pcintelligence.nl:smtp TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:59795 mx2.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:47720 mx2.pcintelligence.nl:smtp TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:34774 mx1.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:59922 mx2.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:59734 mx2.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:36435 mx1.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:59971 mx2.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:35563 mx2.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:34548 mx1.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:36322 mx1.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:36533 mx1.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:36353 mx1.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:34680 mx1.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:34538 mx1.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:59825 mx2.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:47665 mx2.pcintelligence.nl:smtp TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:34568 mx1.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:59887 mx2.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:59805 mx2.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:59985 mx2.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:36459 mx1.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:36373 mx1.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:47729 mx2.pcintelligence.nl:smtp TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:47526 mx1.pcintelligence.nl:smtp TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:34588 mx1.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:58488 mx2.pcintelligence.nl:imaps ESTABLISHED 5069/haproxy
    tcp 0 0 vps704.directvps.nl:35536 mx2.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:34355 mx2.pcintelligence.nl:http TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:35382 mx2.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:35412 mx2.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:35489 mx2.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:36470 mx1.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:36383 mx1.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:34608 mx1.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:60013 mx2.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:35331 mx2.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:57793 mx1.pcintelligence.nl:imaps ESTABLISHED 5069/haproxy
    tcp 0 0 vps704.directvps.nl:34715 mx1.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:36312 mx1.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:36393 mx1.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:36491 mx1.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:35361 mx2.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:34760 mx1.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:34528 mx1.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:36343 mx1.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:59897 mx2.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:36272 mx1.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:35402 mx2.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:59957 mx2.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:47763 mx2.pcintelligence.nl:smtp TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:35454 mx2.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:34748 mx1.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:59774 mx2.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:34690 mx1.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:47506 mx1.pcintelligence.nl:smtp TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:59877 mx2.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:36547 mx1.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:47749 mx2.pcintelligence.nl:smtp TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:imaps office.info.nl:33811 ESTABLISHED 5069/haproxy
    tcp 0 0 vps704.directvps.nl:59724 mx2.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:59784 mx2.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:59754 mx2.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:57780 mx1.pcintelligence.nl:imaps ESTABLISHED 5069/haproxy
    tcp 0 0 vps704.directvps.nl:36445 mx1.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:59999 mx2.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:47441 mx1.pcintelligence.nl:smtp TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:34628 mx1.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:35550 mx2.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:33971 mx2.pcintellige:xmpp-client ESTABLISHED 5069/haproxy
    tcp 0 0 vps704.directvps.nl:35464 mx2.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:34578 mx1.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:47497 mx1.pcintelligence.nl:smtp TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:34802 mx1.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:35392 mx2.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:34725 mx1.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:35311 mx2.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:35301 mx2.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:59764 mx2.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:35478 mx2.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:59912 mx2.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:35422 mx2.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:36413 mx1.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:35510 mx2.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:35443 mx2.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:36505 mx1.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:imaps s55907b0a.adsl.wanadoo.:sbl ESTABLISHED 5069/haproxy
    tcp 0 0 vps704.directvps.nl:47714 mx2.pcintelligence.nl:smtp TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:34700 mx1.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:59933 mx2.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:36425 mx1.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:35499 mx2.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:47512 mx1.pcintelligence.nl:smtp TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:imaps office.info.nl:33812 ESTABLISHED 5069/haproxy
    tcp 0 0 vps704.directvps.nl:34558 mx1.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:36403 mx1.pcintelligence.nl:imaps TIME_WAIT -
    tcp 0 0 vps704.directvps.nl:34658 mx1.pcintellige:xmpp-client TIME_WAIT -
    tcp 0 0 *:ssh *:* LISTEN 1030/sshd

    /etc/ldirectord.cf

    checktimeout=3
    checkinterval=1
    autoreload=yes
    logfile="/var/log/ldirectord.log"
    quiescent=no
    virtual=194.145.200.87:25
    fallback=127.0.0.1:25
    real=194.145.200.17:25 gate
    real=194.145.200.171:25 gate
    service=smtp
    persistent=100
    scheduler=rr
    protocol=tcp
    checktype=negotiate

    strange thing is that heartbeat does not start ldirectord, this is my haresources:
    vps704.directvps.nl ldirectord::ldirectord.cf LVSSyncDaemonSwap::master IPaddr2::194.145.200.87/24/eth0/194.145.200.255

    When I start ldirectord I can connect to port 25 but it only forwards the traffic to server2 (171 ip).
    When I stop server2 Qmail no failover to server 1 is being made by ldirectord..

    loadbalancer is fedora c12 (normal ip 194.145.200.86 - vip 194.145.200.87)
    realserver 1 is centos 5.4 194.145.200.17
    realserver 2 is centos 5.4 194.145.200.171

    routing through direct routing.

    What am I doing wrong?
     

Share This Page