keepalived script problem.

Fredrik Månsson fredrik.mansson at staff.spray.se
Thu Oct 28 13:55:27 BST 2004


> > My keepalive version is: 1.1.7.
> > Distribution is Debian 3.0.
> > I have 2 NICs, Intel(R) PRO/100 Network Driver - version 2.3.38-k1.
> > My kernel is 2.4.26p3-lvs (NAT and conntrack disabled).
> > No SMP set.
> 
> Ok.  Looks good.  I forgot to ask, can you post your 
> keepalived.conf file?
> 

My keepalived.conf is pretty big. I am apologize in advance for sending it to the whole list.. :\

! Configuration File for keepalived

! GLOBAL CONFIGURATION
global_defs {
   lvs_id searchlvs1.lan.mycorp.net
}

! VRRPD CONFIGURATION
vrrp_instance vlan_157 {
    state MASTER
    interface eth0
    track_interface {                                   # Interface state we monitor
      eth1
    }
    virtual_router_id 157
    priority 101
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1157
    }
    virtual_ipaddress_excluded {
        x.y.z.200                                  # phpfe-de.vip.mycorp.net # G1
        x.y.z.204                                  # phpfe-fr.vip.mycorp.net # G2
        x.y.z.203                                  # phpfe-es.vip.mycorp.net # G2
        x.y.z.209                                  # phpfe-se.vip.mycorp.net # G2
        x.y.z.211                                  # phpfe-no.vip.mycorp.net # G2
        x.y.z.212                                  # phpfe-ru.vip.mycorp.net # G2
        x.y.z.208                                  # phpfe-pa.vip.mycorp.net # G2
        x.y.z.206                                  # phpfe-nl.vip.mycorp.net # G3
        x.y.z.207                                  # phpfe-uk.vip.mycorp.net # G3
        x.y.z.210                                  # phpfe-dk.vip.mycorp.net # G3
        x.y.z.205                                  # phpfe-it.vip.mycorp.net # G3
        x.y.z.214                                  # phpfe-ie.vip.mycorp.net # G3
        x.y.z.201                                  # phpfe-be.vip.mycorp.net # G3
        x.y.z.202                                  # phpfe-ch.vip.mycorp.net # G3
        x.y.z.213                                  # phpfe-at.vip.mycorp.net # G3
    }

    virtual_ipaddress {  
        x.y.z.220                                  # cache-squid.vip.mycorp.net
        x.y.z.221                                  # nocache-squid.vip.mycorp.net
        x.y.z.222                                  # ivw-search.vip.mycorp.net
        x.y.z.223                                  # bulkkiti-collector.vip.mycorp.net  # fc
        x.y.z.224                                  # allesklar-collector.vip.mycorp.net # fc
        x.y.z.225                                  # extrel-collector.vip.mycorp.net    # fc
        x.y.z.227                                  # query-checker.vip.mycorp.net
        x.y.z.228                                  # bulkkiti-retriever.vip.mycorp.net  # fr
        x.y.z.229                                  # allesklar-retriever.vip.mycorp.net # fr
        x.y.z.230                                  # related-retriever.vip.mycorp.net   # fr
        x.y.z.231                                  # extended-retriever.vip.mycorp.net  # fr 
        x.y.z.232                                  # staticfe.vip.mycorp.net 
        x.y.z.233                                  # staticbe.vip.mycorp.net 
    }
}

virtual_server x.y.z.224 6200 { #allesklar-collector.vip.mycorp.net
    delay_loop 6
    lb_algo rr 
    lb_kind DR
    protocol TCP

    real_server x.y.z.40 6200 { #server628
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }

    }
    real_server x.y.z.41 6200 { #server629
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }

    }
    real_server x.y.z.66 6200 { #servera654
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }

    }
    real_server x.y.z.67 6200 { #server655
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }

    }
}

virtual_server x.y.z.229 7200 { #allesklar-retriever.vip.mycorp.net
    delay_loop 6
    lb_algo rr 
    lb_kind DR
    protocol TCP

    real_server x.y.z.43 7200 { #slyca631
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }

    }
    real_server x.y.z.44 7200 { #slyca632
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }

    }
    real_server x.y.z.47 7200 { #slyca635
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }

    }
    real_server x.y.z.48 7200 { #slyca636
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }

    }
}

virtual_server x.y.z.223 6100 { #bulkkiti-collector.vip.mycorp.net
    delay_loop 6
    lb_algo rr 
    lb_kind DR
    protocol TCP

    real_server x.y.z.40 6100 { #server628
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }

    }
    real_server x.y.z.41 6100 { #server629
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }

    }
    real_server x.y.z.66 6100 { #servera654
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }

    }
    real_server x.y.z.67 6100 { #server655
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }
    }
}

virtual_server x.y.z.228 7100 { #bulkkiti-retriever.vip.mycorp.net
    delay_loop 6
    lb_algo rr 
    lb_kind DR
    protocol TCP

    real_server x.y.z.43 7100 { #slyca631
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }

    }
    real_server x.y.z.44 7100 { #slyca632
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }

    }
    real_server x.y.z.47 7100 { #slyca635
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }

    }
    real_server x.y.z.48 7100 { #slyca636
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }
    }
}

virtual_server x.y.z.225 6300 { #extrel-collector.vip.mycorp.net
    delay_loop 6
    lb_algo rr 
    lb_kind DR
    protocol TCP

    real_server x.y.z.40 6300 { #server628
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }

    }
    real_server x.y.z.41 6300 { #server629
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }

    }
    real_server x.y.z.66 6300 { #servera654
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }

    }
    real_server x.y.z.67 6300 { #server655
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }
    }
}

virtual_server x.y.z.231 7300 { #extended-retriever.vip.mycorp.net
    delay_loop 6
    lb_algo rr 
    lb_kind DR
    protocol TCP

    real_server x.y.z.43 7300 { #slyca631
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }

    }
    real_server x.y.z.44 7300 { #slyca632
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }

    }
    real_server x.y.z.47 7300 { #slyca635
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }

    }
    real_server x.y.z.48 7300 { #slyca636
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }
    }
}

virtual_server x.y.z.230 7400 { #related-retriever.vip.mycorp.net
    delay_loop 6
    lb_algo rr 
    lb_kind DR
    protocol TCP

    real_server x.y.z.43 7400 { #slyca631
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }

    }
    real_server x.y.z.44 7400 { #slyca632
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }

    }
    real_server x.y.z.47 7400 { #slyca635
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }

    }
    real_server x.y.z.48 7400 { #slyca636
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }
    }
}

virtual_server x.y.z.220 3030 { #cache-squid.vip.mycorp.net
    delay_loop 6
    lb_algo rr 
    lb_kind DR
    protocol TCP

    real_server x.y.z.27 3030 { #server616
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }

    }
    real_server x.y.z.28 3030 { #server617
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }

    }
    real_server x.y.z.29 3030 { #server618
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }

    }
    real_server x.y.z.30 3030 { #server619
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }

    }
}

virtual_server x.y.z.222 80 { #ivw-search.vip.mycorp.net
    delay_loop 6
    lb_algo rr 
    lb_kind DR
    protocol TCP

}

virtual_server x.y.z.221 3060 { #nocache-squid.vip.mycorp.net
    delay_loop 6
    lb_algo rr 
    lb_kind DR
    protocol TCP

    real_server x.y.z.31 3060 { #server620
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }

    }
    real_server x.y.z.32 3060 { #server621
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }

    }
}

##this is for isolation, if needed
#virtual_server_group G0 { 
#     x.y.z.208 80 # phpfe-pa.vip.mycorp.net
#}
#
#virtual_server group G0 {
#    delay_loop 6
#    lb_algo rr 
#    lb_kind DR
#    protocol TCP
#
#    real_server x.y.z.11 80 { #server600
#        weight 1
#        HTTP_GET {
#            url { 
#              path /_SYS_/lb.htm
#              digest 0cfae383362bc63d7ac429a5755fef05
#            }
#            connect_port 80
#            connect_timeout 10
#            delay_before_retry 3
#       }
#    }
#}
    
virtual_server_group G1 { 
    x.y.z.200 80 # phpfe-de.vip.mycorp.net
}

virtual_server group G1 {
    delay_loop 6
    lb_algo rr 
    lb_kind DR
    protocol TCP

    real_server x.y.z.11 80 { #server600
        weight 1
        HTTP_GET {
            url {
              path /_SYS_/lb.htm
              digest 0cfae383362bc63d7ac429a5755fef05
            }
            connect_port 80
            connect_timeout 10
            delay_before_retry 3
       }
    }

    real_server x.y.z.12 80 { #server601
        weight 1
        HTTP_GET {
            url { 
              path /_SYS_/lb.htm
              digest 0cfae383362bc63d7ac429a5755fef05
            }
            connect_port 80
            connect_timeout 10
            delay_before_retry 3
        }

    }

    real_server x.y.z.22 80 { #server611
        weight 1
        HTTP_GET {
            url { 
              path /_SYS_/lb.htm
              digest 0cfae383362bc63d7ac429a5755fef05
            }
            connect_port 80
            connect_timeout 10
            delay_before_retry 3
        }

    }
    real_server x.y.z.23 80 { #server612
        weight 1
        HTTP_GET {
            url { 
              path /_SYS_/lb.htm
              digest 0cfae383362bc63d7ac429a5755fef05
            }
            connect_port 80
            connect_timeout 10
            delay_before_retry 3
        }

    }
    real_server x.y.z.45 80 { #server633
        weight 1
        HTTP_GET {
            url { 
              path /_SYS_/lb.htm
              digest 0cfae383362bc63d7ac429a5755fef05
            }
            connect_port 80
            connect_timeout 10
            delay_before_retry 3
        }

    }
    real_server x.y.z.26 80 { #server615
        weight 1
        HTTP_GET {
            url { 
              path /_SYS_/lb.htm
              digest 0cfae383362bc63d7ac429a5755fef05
            }
            connect_port 80
            connect_timeout 10
            delay_before_retry 3
        }

    }
}


virtual_server_group G2 { 
    x.y.z.204 80 # phpfe-fr.vip.mycorp.net
    x.y.z.203 80 # phpfe-es.vip.mycorp.net
    x.y.z.209 80 # phpfe-se.vip.mycorp.net
    x.y.z.211 80 # phpfe-no.vip.mycorp.net
    x.y.z.212 80 # phpfe-ru.vip.mycorp.net
    x.y.z.208 80 # phpfe-pa.vip.mycorp.net
}


virtual_server group G2 {
    delay_loop 6
    lb_algo rr 
    lb_kind DR
    protocol TCP

    real_server x.y.z.13 80 { #server602
        weight 1
        HTTP_GET {
            url { 
              path /_SYS_/lb.htm
              digest 0cfae383362bc63d7ac429a5755fef05
            }
            connect_port 80
            connect_timeout 10
            delay_before_retry 3
        }

    }
    real_server x.y.z.14 80 { #server603
        weight 1
        HTTP_GET {
            url { 
              path /_SYS_/lb.htm
              digest 0cfae383362bc63d7ac429a5755fef05
            }
            connect_port 80
            connect_timeout 10
            delay_before_retry 3
        }

    }
    real_server x.y.z.24 80 { #server613
        weight 1
        HTTP_GET {
            url { 
              path /_SYS_/lb.htm
              digest 0cfae383362bc63d7ac429a5755fef05
            }
            connect_port 80
            connect_timeout 10
            delay_before_retry 3
        }

    }
}


virtual_server_group G3 { 
    x.y.z.206 80 # phpfe-nl.vip.mycorp.net
    x.y.z.207 80 # phpfe-uk.vip.mycorp.net
    x.y.z.210 80 # phpfe-dk.vip.mycorp.net
    x.y.z.205 80 # phpfe-it.vip.mycorp.net
    x.y.z.214 80 # phpfe-ie.vip.mycorp.net
    x.y.z.201 80 # phpfe-be.vip.mycorp.net
    x.y.z.202 80 # phpfe-ch.vip.mycorp.net
    x.y.z.213 80 # phpfe-at.vip.mycorp.net
}


virtual_server group G3 {
    delay_loop 6
    lb_algo rr 
    lb_kind DR
    protocol TCP

    real_server x.y.z.15 80 { #server604
        weight 1
        HTTP_GET {
            url { 
              path /_SYS_/lb.htm
              digest 0cfae383362bc63d7ac429a5755fef05
            }
            connect_port 80
            connect_timeout 10
            delay_before_retry 3
        }

    }
    real_server x.y.z.16 80 { #server605
        weight 1
        HTTP_GET {
            url { 
              path /_SYS_/lb.htm
              digest 0cfae383362bc63d7ac429a5755fef05
            }
            connect_port 80
            connect_timeout 10
            delay_before_retry 3
        }

    }
    real_server x.y.z.25 80 { #server614
        weight 1
        HTTP_GET {
            url { 
              path /_SYS_/lb.htm
              digest 0cfae383362bc63d7ac429a5755fef05
            }
            connect_port 80
            connect_timeout 10
            delay_before_retry 3
        }

    }
}

virtual_server x.y.z.227 6500 { #query-checker.vip.mycorp.net
    delay_loop 6
    lb_algo rr 
    lb_kind DR
    protocol TCP

    real_server x.y.z.36 6500 { #slyca624
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }
    }
    real_server x.y.z.37 6500 { #slyca625
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }
    }
    real_server x.y.z.38 6500 { #slyca626
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }
    }
    real_server x.y.z.39 6500 { #slyca627
        weight 1
        TCP_CHECK {
            connect_timeout 3
        }
    }
}

virtual_server x.y.z.232 80 { #staticfe.vip.mycorp.net
    delay_loop 6
    lb_algo rr 
    lb_kind DR
    protocol TCP

    real_server x.y.z.64 80 { #server652
        weight 1
        TCP_CHECK {
            connect_port 3010
            connect_timeout 3
        }
    }
    real_server x.y.z.65 80 { #server653
        weight 1
        TCP_CHECK {
            connect_port 3010
            connect_timeout 3
        }
    }
}

virtual_server x.y.z.233 80 { #staticbe.vip.mycorp.net
    delay_loop 6
    lb_algo rr 
    lb_kind DR
    protocol TCP

    real_server x.y.z.33 80 { #server622
        weight 1
        HTTP_GET {
            url {
                path /_SYS_/lb.htm
                 digest 0cfae383362bc63d7ac429a5755fef05
            }
            connect_port 8070
            connect_timeout 10
            delay_before_retry 3
        }   
    }
    real_server x.y.z.34 80 { #server623
        weight 1
        HTTP_GET {
            url {
              path /_SYS_/lb.htm
              digest 0cfae383362bc63d7ac429a5755fef05
            }
            connect_port 8070
            connect_timeout 10
            delay_before_retry 3
        }
    }
}

Maybe my _large_ configuration have something to do with these log entires?
Oct 25 15:53:14 searchlvs1 Keepalived_healthcheckers: IPVS : Service already exists
Oct 25 15:53:14 searchlvs1 Keepalived_healthcheckers: IPVS : Destination already exists
Just a thought, If keepalived not are able to clean the configuration after itself when it is going down for restart... 

> > Oct 25 15:53:12 searchlvs1 Keepalived_vrrp: Watchdog: Error 
> > reading to /tmp/.vrrp wdog socket
> 
> This is a common problem.  You are using both vrrp and 
> healthchecker, right?
> Here are some interesting threads for you to read:
> 
> http://marc.theaimsgroup.com/?l=keepalived-devel&m=109241321010899&w=2
> http://marc.theaimsgroup.com/?l=keepalived-devel&m=109165262509861&w=2
> 
> Without a configuration I can't be sure, but you can try 
> modifying your init
> script to run two separate daemons:
>   keepalived --vrrp
>   keepalived --check

I am not sure if I understand the diffrence between running one or two separate deamons. Can anyone give me a brief explanation or give me a link to such a document.

Thank you.
Regards Fredrik.


More information about the lvs-users mailing list