how to start apache2 on Heart beat

Discussion in 'Installation/Configuration' started by amohammad, Aug 24, 2007.

  1. amohammad

    amohammad New Member

    hi
    Iam a newbie here and also newbie in HA, ive configured two clusters with
    crm can some 1 plz elaborate specifically that wat should i do for
    starting of apache2 from HA (HA two clusters are up and monitor is showing
    but monitor shows 0 resource configured)
    iam using debian etch
    and apache2
    and heartbeat 2.1.2

    my ha.cf looks like
    -----------------------
    #logfacility daemon
    debugfile /var/log/ha-debug
    logfile /var/log/ha-log
    logfacility daemon
    keepalive 1
    deadtime 10
    warntime 5
    initdead 120 # depend on your hardware
    udpport 694
    ping 10.1.1.49
    bcast br0
    #bcast eth1
    auto_failback off
    node iksws115
    node nccpl-server
    use_logd yes
    compression bz2
    compression_threshold 2
    crm yes
    respawn hacluster /usr/lib/heartbeat/ipfail
    apiauth ipfail gid=haclient uid=hacluster
    ----------------------------------------------


    my authkeys looks like (with permission 600)
    -------------------------
    auth 1
    1 sha1 PutYourSuperSecretKeyHere
    --------------------------------

    my haresources looks like
    ---------------------------
    iksws115 10.1.1.91 apache2
    ----------------------------

    my crm_mon -i5 outputs
    -----------------------

    Last updated: Fri Aug 24 12:23:07 2007
    Current DC: iksws115 (0debf1de-2c2e-455f-aed4-379413ee0439)
    2 Nodes configured.
    0 Resources configured.
    ============

    Node: iksws115 (0debf1de-2c2e-455f-aed4-379413ee0439): online
    Node: nccpl-server (e2039328-7ddf-40b2-88c7-92bbe3cd7036): online
    --------------------------------------------------------------------

    please help me ASAP cz iam only stuck cz of this

    thnx in advance

    regards
    Ali
     
  2. falko

    falko Super Moderator ISPConfig Developer

  3. dogar

    dogar New Member

    heart beat ldiractor not work

    Hi Mr.falko
    How are you.
    The problem is that,i use your configration.same as u give.only ip changes.
    heart beat working fine, it is tested.but ldiractrod is not working.
    we i restart heart beat it fail to rum ldiractrod and following error message is shown.
    the error message is look like ...
    Error [] reading file /etc/ha.d/ldiractrof.cf at line 7 unknown command real=10.*.*.*:80 masq

    and this is my log file from /var/log/ldiractrod.log

    ////////////////////////////////////
    [Wed Oct 10 13:15:29 2007|ldirectord.cf] Exiting with exit_status 1: Initialisation Error
    [Wed Oct 10 13:33:52 2007|ldirectord.cf] ldirectord is stopped for /etc/ha.d/ldirectord.cf
    [Wed Oct 10 13:33:52 2007|ldirectord.cf] Exiting with exit_status 1: Initialisation Error
    [Wed Oct 10 13:33:52 2007|ldirectord.cf] ldirectord is stopped for /etc/ha.d/ldirectord.cf
    [Wed Oct 10 13:33:52 2007|ldirectord.cf] Exiting with exit_status 1: Initialisation Error
    [Wed Oct 10 13:36:33 2007|ldirectord.cf] ldirectord is stopped for /etc/ha.d/ldirectord.cf
    [Wed Oct 10 13:36:33 2007|ldirectord.cf] Exiting with exit_status 1: Initialisation Error
    [Wed Oct 10 13:36:35 2007|ldirectord.cf] ldirectord is stopped for /etc/ha.d/ldirectord.cf
    [Wed Oct 10 13:36:35 2007|ldirectord.cf] Exiting with exit_status 1: Initialisation Error
    [Wed Oct 10 13:36:36 2007|ldirectord.cf] ldirectord is stopped for /etc/ha.d/ldirectord.cf
    [Wed Oct 10 13:36:36 2007|ldirectord.cf] Exiting with exit_status 1: Initialisation Error
    [Wed Oct 10 13:36:37 2007|ldirectord.cf] ldirectord is stopped for /etc/ha.d/ldirectord.cf
    [Wed Oct 10 13:36:37 2007|ldirectord.cf] Exiting with exit_status 1: Initialisation Error
    [Wed Oct 10 13:36:39 2007|ldirectord.cf] ldirectord is stopped for /etc/ha.d/ldirectord.cf
    [Wed Oct 10 13:36:39 2007|ldirectord.cf] Exiting with exit_status 1: Initialisation Error
    [Wed Oct 10 13:36:40 2007|ldirectord.cf] ldirectord is stopped for /etc/ha.d/ldirectord.cf
    [Wed Oct 10 13:36:40 2007|ldirectord.cf] Exiting with exit_status 1: Initialisation Error
    [Wed Oct 10 13:36:42 2007|ldirectord.cf] ldirectord is stopped for /etc/ha.d/ldirectord.cf
    [Wed Oct 10 13:36:42 2007|ldirectord.cf] Exiting with exit_status 1: Initialisation Error
    [Wed Oct 10 13:36:43 2007|ldirectord.cf] ldirectord is stopped for /etc/ha.d/ldirectord.cf
    [Wed Oct 10 13:36:43 2007|ldirectord.cf] Exiting with exit_status 1: Initialisation Error
    [Wed Oct 10 13:36:44 2007|ldirectord.cf] ldirectord is stopped for /etc/ha.d/ldirectord.cf
    [Wed Oct 10 13:36:44 2007|ldirectord.cf] Exiting with exit_status 1: Initialisation Error
    [Wed Oct 10 13:36:46 2007|ldirectord.cf] ldirectord is stopped for /etc/ha.d/ldirectord.cf
    [Wed Oct 10 13:36:46 2007|ldirectord.cf] Exiting with exit_status 1: Initialisation Error
    [Wed Oct 10 13:36:47 2007|ldirectord.cf] ldirectord is stopped for /etc/ha.d/ldirectord.cf
    [Wed Oct 10 13:36:47 2007|ldirectord.cf] Exiting with exit_status 1: Initialisation Error
    [Wed Oct 10 13:36:48 2007|ldirectord.cf] ldirectord is stopped for /etc/ha.d/ldirectord.cf
    [Wed Oct 10 13:36:48 2007|ldirectord.cf] Exiting with exit_status 1: Initialisation Error
    [Wed Oct 10 13:40:08 2007|ldirectord.cf] ldirectord is stopped for /etc/ha.d/ldirectord.cf
    [Wed Oct 10 13:40:08 2007|ldirectord.cf] Exiting with exit_status 1: Initialisation Error
    [Wed Oct 10 13:40:22 2007|ldirectord.cf] ldirectord is stopped for /etc/ha.d/ldirectord.cf
    [Wed Oct 10 13:40:22 2007|ldirectord.cf] Exiting with exit_status 1: Initialisation Error
    [Wed Oct 10 13:40:23 2007|ldirectord.cf] ldirectord is stopped for /etc/ha.d/ldirectord.cf
    [Wed Oct 10 13:40:23 2007|ldirectord.cf] Exiting with exit_status 1: Initialisation Error
    [Wed Oct 10 14:08:02 2007|ldirectord] ldirectord is stopped for /etc/ha.d/ldirectord.cf
    [Wed Oct 10 14:08:02 2007|ldirectord] Exiting with exit_status 1: Initialisation Error
    [Wed Oct 10 14:08:50 2007|ldirectord] ldirectord is stopped for /etc/ha.d/ldirectord.cf
    [Wed Oct 10 14:08:50 2007|ldirectord] Exiting with exit_status 1: Initialisation Error
    [Wed Oct 10 14:11:47 2007|ldirectord.cf] ldirectord is stopped for /etc/ha.d/ldirectord.cf
    [Wed Oct 10 14:11:47 2007|ldirectord.cf] Exiting with exit_status 1: Initialisation Error
    [Wed Oct 10 14:11:48 2007|ldirectord.cf] ldirectord is stopped for /etc/ha.d/ldirectord.cf
    [Wed Oct 10 14:11:48 2007|ldirectord.cf] Exiting with exit_status 1: Initialisation Error

    ///////////////////////////////////
    hope u help me sooon

    Dogar
     
  4. falko

    falko Super Moderator ISPConfig Developer

    What's in /etc/ha.d/ldiractrof.cf?
     
  5. dogar

    dogar New Member

    hi falko. hope you must be fine...
    given bellow is my configration in ldirectrod.cf file


    checktimeout=10
    checkinterval=2
    autoreload=no
    quiescent=yes

    virtual=192.168.100.100:80
    fallback=127.0.0.1:80
    real=10.0.0.1:80 masq
    service=http
    request="index.html"
    receive="Test Page"
    scheduler=wlc
    persistent=600
    protocol=tcp
    checktype=negotiate

    reply me as soon as posible

    Bilal
     
    Last edited: Nov 2, 2007
  6. falko

    falko Super Moderator ISPConfig Developer

    Do you have spaces/tabs in front of each line after
    Code:
    virtual=192.168.100.100:80
    ?
     
  7. dogar

    dogar New Member

    Hay Falko!

    a great thanks for ur nice help in this issue,(ldirector).
    dear i have one more problem for complete this task.

    I have done spaces/tabs in front of each line in ldirector.cf

    virtual=192.168.100.100:80

    now service of ldirector has stared successfuly.

    but when i want for checking following steps ,,,
    i am fail.

    5 Test The Load Balancers

    now check both load balancers work as expected:

    loadb1/loadb2:

    ip addr sh eth0

    The active load balancer should list the virtual IP address (192.168.100.100):
    1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
    inet6 ::1/128 scope host
    valid_lft forever preferred_lft forever
    2: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:0b:cd:ff:d0:32 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.30/8 brd 10.255.255.255 scope global eth1
    inet 192.168.100.100/24 brd 192.168.100.255 scope global eth1
    inet6 fe80::20b:cdff:feff:d032/64 scope link
    valid_lft forever preferred_lft forever
    3: sit0: <NOARP> mtu 1480 qdisc noop
    link/sit 0.0.0.0 brd 0.0.0.0

    The hot-standby should show this:

    1: link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
    inet 192.168.100.100/32 brd 255.255.255.255 scope global lo
    inet6 ::1/128 scope host
    valid_lft forever preferred_lft forever
    2: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:30:84:37:83:18 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.21/8 brd 10.255.255.255 scope global eth1
    inet6 fe80::230:84ff:fe37:8318/64 scope link
    valid_lft forever preferred_lft forever
    3: sit0: <NOARP> mtu 1480 qdisc noop
    link/sit 0.0.0.0 brd 0.0.0.0

    ldirectord ldirectord.cf status

    Output on the active load balancer:

    ldirectord for /etc/ha.d/ldirectord.cf is running with pid: 5650

    Output on the passive load balancer:

    ldirector is stopped for /etc/ha.d/ldirector.cf

    ipvsadm -L -n

    Output on the active load balancer:


    IP Virtual Server version 1.2.0 (size=4096)
    Prot LocalAddress:port Scheduler Flags
    -> RemoteAddress:port Forward Weight ActiveConn InActConn


    Output on the hot-standby:
    IP Virtual Server version 1.2.0 (size=4096)
    Prot LocalAddress:port Scheduler Flags
    -> RemoteAddress:port Forward Weight ActiveConn InActConn



    7 Further Testing
    You can now access the web site that is hosted by the two Apache nodes by typing http://192.168.100.100 in your browser.

    still not response.



    plz compare my out-put with ur document results ...

    waiting for ur quick and nice reply..

    thanks again.
     
    Last edited: Nov 6, 2007
  8. falko

    falko Super Moderator ISPConfig Developer

    Is your client PC in the 192.168.100.x subnet? Because if it's in the 10.0.0.x subnet, then it cannot access 192.168.100.x.
     
  9. dogar

    dogar New Member

    Hay Falko!

    again.
    a great thanks for ur nice help in this issue,
    dear i have done heatbeat job successfully.
    Which I checked it.

    Dear I have still problem in running and testing in ldirector.
    I am 100% sure that my heartbeat is running and it working properly but my ldirector is not running, according to my above configuration.
    Which also repeate in ldirector.cf


    checktimeout=10
    checkinterval=2
    autoreload=no
    logfile="local0"
    quiescent=no
    virtual=10.0.0.41:80
    real=192.169.100.12:80 masq
    real=192.169.100.13:80 masq
    #real=10.0.0.21:80 gate
    fallback=127.0.0.1:80
    service=http
    request="ldirector.html"
    receive="test page"
    scheduler=rr
    protocol=tcp
    checktype=negotiate


    Plz follow my existing network which describe in below.

    Real server1 Real server2

    IP=192.168.100.13 | IP=192.168.100.12

    VIP=192.168.100.100
    Internal N.W
    ____________________________________________

    IP=192.168.100.17 IP=192.168.100.16

    Linux-Director1 Linux-Director2

    IP=10.0.0.17 IP=10.0.0.16


    ______________________________________________
    External N.W
    VIP=10.0.0.41

    Client

    IP= 10.0.0.25 GW=10.0.0.41
    in above class C network is internal network and classs A is external network

    In my existing Network.
    I can access (ping) to both Linux-Directors as well as Real-Server. But I cant access appachi pages from my client,

    Pls help me in that specific point that where I am doing mistake.
     
    Last edited: Nov 12, 2007
  10. fazi_puri

    fazi_puri New Member

    plz help me in this......

    hey guyz my other tests are fine but the problem is in the below test......

    Further Testing
    You can now access the web site that is hosted by the two Apache nodes by typing http://(virtual ip) in your browser.

    still not response.


    can anybody help me with this????????????
     
  11. fazi_puri

    fazi_puri New Member

    hey falko

    plz also explain this a bit more

    Is your client PC in the 192.168.100.x subnet? Because if it's in the 10.0.0.x subnet, then it cannot access 192.168.100.x.
     

Share This Page