track script doesn't work after keepalived updatekeepalived doesn't listen on virtual IPkeepalived track_script doesn't seem to runkeepalived master cannot reclaim virtual IP after recoveredKeepalived notify script isn't executedkeepalived doesn't assign the virtual IPDoes keepalived work with team driver?Why doesn't keepalived track_script restart keepalived when HAProxy drops out?IPVS (keepalived) doesn't balance UDP connectionskeepalived HA: float VIP when a service failure doesn't workkeepalived doesn't detect loss of virtual IP

Multi tool use
Multi tool use

Why were the Night's Watch required to be celibate?

Opposite of "Squeaky wheel gets the grease"

What is the intuition behind uniform continuity?

Asking bank to reduce APR instead of increasing credit limit

Racetrack designers, assemble!

Double integral bounds of integration polar change of coordinate

California: "For quality assurance, this phone call is being recorded"

If a problem only occurs randomly once in every N times on average, how many tests do I have to perform to be certain that it's now fixed?

How does increase in volume change the speed of reaction in production of NO2?

Creating Fictional Slavic Place Names

The deliberate use of misleading terminology

Is having a hidden directory under /etc safe?

What if you don't bring your credit card or debit for incidentals?

Expenditure in Poland - Forex doesn't have Zloty

Select row of data if next row contains zero

Did airlines fly their aircraft slower in response to oil prices in the 1970s?

What caused the tendency for conservatives to not support climate change regulations?

Is the capacitor drawn or wired wrongly?

Could IPv6 make NAT / port numbers redundant?

Rotated Position of Integers

The term for the person/group a political party aligns themselves with to appear concerned about the general public

Where can I find the list of all tendons in the human body?

Starting VLC from command line always puts the window behind other windows

How can I grammatically understand "Wir über uns"?



track script doesn't work after keepalived update


keepalived doesn't listen on virtual IPkeepalived track_script doesn't seem to runkeepalived master cannot reclaim virtual IP after recoveredKeepalived notify script isn't executedkeepalived doesn't assign the virtual IPDoes keepalived work with team driver?Why doesn't keepalived track_script restart keepalived when HAProxy drops out?IPVS (keepalived) doesn't balance UDP connectionskeepalived HA: float VIP when a service failure doesn't workkeepalived doesn't detect loss of virtual IP






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I recently updated my keepalived cluster from version 1.2.10 to 1.2.13.
I noticed that my tracking script, which basicly just pings another system,doesn't work anymore. I use a simple bash script and return a 0 if everything is fine and the reciever is online, and 1 if the reciever isn't available.

If the Script returns a 1 the cluster changes and another router becomes active, otherwise everything is ok.

keepalived.conf:



global_defs 
router_id r_id


vrrp_script chk_myscript
script "/etc/keepalived/chk_available.sh"
interval 4 # check every 4 seconds
fall 2 # require 2 failures for KO


vrrp_instance r_id
state MASTER
interface enp0s3
virtual_router_id 10
priority 101
advert_int 1
authentication
auth_type PASS
auth_pass password

virtual_ipaddress
10.0.25.3/24 dev enp0s3

track_script
chk_myscript




Script:



#!/bin/sh
ping_return()

ping -c2 8.8.8.8 > /dev/null #it's just an example ip
if [ $? -eq 0 ]
then
return 0
else
return 1
fi

ping_return


After the starting proccess of keepalived the log messages told me this:



VRRP sockpool: [ifindex(2), proto(112), unicast(0), fd(10,11)]
ROUTER keepalived_vrrp[2800]: Using LinkWatch kernel netlink reflector...
ROUTER keepalived_vrrp[2801]: VRRP_Instance(INSTANCE) NOW in FAULT state


I've already read the changelog because I thought I could get some helpful information. But there wasn't anything useful (at least for a total newbie like me).



My question now is:

Why doesn't keepalived work like in the former version and what do I have to do to let keepalive do it's work again?










share|improve this question
























  • Is this your real script? Because there's a bug, and it has nothing to do with the keepalived upgrade. You call ping_return, but the function is called ping_test.

    – Oliver
    Jul 31 '15 at 9:10











  • I'm sorry. I copied it wrong. Of course I call ping_return at the end. The problem is really the ping. Keepalived semms to not know what to do with the ping. When I call that little script on the shell, it works perfectly. /edit: updated function name

    – Sascha R.
    Jul 31 '15 at 9:53











  • Update: I deleted the newer version of keepalived and installed the former version. After the installation I saw the same behavior of keepalived, which is strange.

    – Sascha R.
    Aug 7 '15 at 12:20











  • What I'd do to narrow down the problem: What happens if you remove the script altogether? What happens if you use /bin/true instead of the script? Could it be a simple permissions problem?

    – Oliver
    Aug 7 '15 at 13:49











  • It's not a permission problem. The problem is "systemctl start keepalived". When I start keepalived via systemctl, keepalived enters into fault state and the process dies. When I start keepalived with "keepalived -D" it works perfectly. My tracking script sections works and everything is fine. I am presently trying to understand why systemctl got this problem.

    – Sascha R.
    Aug 7 '15 at 14:02


















0















I recently updated my keepalived cluster from version 1.2.10 to 1.2.13.
I noticed that my tracking script, which basicly just pings another system,doesn't work anymore. I use a simple bash script and return a 0 if everything is fine and the reciever is online, and 1 if the reciever isn't available.

If the Script returns a 1 the cluster changes and another router becomes active, otherwise everything is ok.

keepalived.conf:



global_defs 
router_id r_id


vrrp_script chk_myscript
script "/etc/keepalived/chk_available.sh"
interval 4 # check every 4 seconds
fall 2 # require 2 failures for KO


vrrp_instance r_id
state MASTER
interface enp0s3
virtual_router_id 10
priority 101
advert_int 1
authentication
auth_type PASS
auth_pass password

virtual_ipaddress
10.0.25.3/24 dev enp0s3

track_script
chk_myscript




Script:



#!/bin/sh
ping_return()

ping -c2 8.8.8.8 > /dev/null #it's just an example ip
if [ $? -eq 0 ]
then
return 0
else
return 1
fi

ping_return


After the starting proccess of keepalived the log messages told me this:



VRRP sockpool: [ifindex(2), proto(112), unicast(0), fd(10,11)]
ROUTER keepalived_vrrp[2800]: Using LinkWatch kernel netlink reflector...
ROUTER keepalived_vrrp[2801]: VRRP_Instance(INSTANCE) NOW in FAULT state


I've already read the changelog because I thought I could get some helpful information. But there wasn't anything useful (at least for a total newbie like me).



My question now is:

Why doesn't keepalived work like in the former version and what do I have to do to let keepalive do it's work again?










share|improve this question
























  • Is this your real script? Because there's a bug, and it has nothing to do with the keepalived upgrade. You call ping_return, but the function is called ping_test.

    – Oliver
    Jul 31 '15 at 9:10











  • I'm sorry. I copied it wrong. Of course I call ping_return at the end. The problem is really the ping. Keepalived semms to not know what to do with the ping. When I call that little script on the shell, it works perfectly. /edit: updated function name

    – Sascha R.
    Jul 31 '15 at 9:53











  • Update: I deleted the newer version of keepalived and installed the former version. After the installation I saw the same behavior of keepalived, which is strange.

    – Sascha R.
    Aug 7 '15 at 12:20











  • What I'd do to narrow down the problem: What happens if you remove the script altogether? What happens if you use /bin/true instead of the script? Could it be a simple permissions problem?

    – Oliver
    Aug 7 '15 at 13:49











  • It's not a permission problem. The problem is "systemctl start keepalived". When I start keepalived via systemctl, keepalived enters into fault state and the process dies. When I start keepalived with "keepalived -D" it works perfectly. My tracking script sections works and everything is fine. I am presently trying to understand why systemctl got this problem.

    – Sascha R.
    Aug 7 '15 at 14:02














0












0








0








I recently updated my keepalived cluster from version 1.2.10 to 1.2.13.
I noticed that my tracking script, which basicly just pings another system,doesn't work anymore. I use a simple bash script and return a 0 if everything is fine and the reciever is online, and 1 if the reciever isn't available.

If the Script returns a 1 the cluster changes and another router becomes active, otherwise everything is ok.

keepalived.conf:



global_defs 
router_id r_id


vrrp_script chk_myscript
script "/etc/keepalived/chk_available.sh"
interval 4 # check every 4 seconds
fall 2 # require 2 failures for KO


vrrp_instance r_id
state MASTER
interface enp0s3
virtual_router_id 10
priority 101
advert_int 1
authentication
auth_type PASS
auth_pass password

virtual_ipaddress
10.0.25.3/24 dev enp0s3

track_script
chk_myscript




Script:



#!/bin/sh
ping_return()

ping -c2 8.8.8.8 > /dev/null #it's just an example ip
if [ $? -eq 0 ]
then
return 0
else
return 1
fi

ping_return


After the starting proccess of keepalived the log messages told me this:



VRRP sockpool: [ifindex(2), proto(112), unicast(0), fd(10,11)]
ROUTER keepalived_vrrp[2800]: Using LinkWatch kernel netlink reflector...
ROUTER keepalived_vrrp[2801]: VRRP_Instance(INSTANCE) NOW in FAULT state


I've already read the changelog because I thought I could get some helpful information. But there wasn't anything useful (at least for a total newbie like me).



My question now is:

Why doesn't keepalived work like in the former version and what do I have to do to let keepalive do it's work again?










share|improve this question
















I recently updated my keepalived cluster from version 1.2.10 to 1.2.13.
I noticed that my tracking script, which basicly just pings another system,doesn't work anymore. I use a simple bash script and return a 0 if everything is fine and the reciever is online, and 1 if the reciever isn't available.

If the Script returns a 1 the cluster changes and another router becomes active, otherwise everything is ok.

keepalived.conf:



global_defs 
router_id r_id


vrrp_script chk_myscript
script "/etc/keepalived/chk_available.sh"
interval 4 # check every 4 seconds
fall 2 # require 2 failures for KO


vrrp_instance r_id
state MASTER
interface enp0s3
virtual_router_id 10
priority 101
advert_int 1
authentication
auth_type PASS
auth_pass password

virtual_ipaddress
10.0.25.3/24 dev enp0s3

track_script
chk_myscript




Script:



#!/bin/sh
ping_return()

ping -c2 8.8.8.8 > /dev/null #it's just an example ip
if [ $? -eq 0 ]
then
return 0
else
return 1
fi

ping_return


After the starting proccess of keepalived the log messages told me this:



VRRP sockpool: [ifindex(2), proto(112), unicast(0), fd(10,11)]
ROUTER keepalived_vrrp[2800]: Using LinkWatch kernel netlink reflector...
ROUTER keepalived_vrrp[2801]: VRRP_Instance(INSTANCE) NOW in FAULT state


I've already read the changelog because I thought I could get some helpful information. But there wasn't anything useful (at least for a total newbie like me).



My question now is:

Why doesn't keepalived work like in the former version and what do I have to do to let keepalive do it's work again?







centos7 keepalived






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 7 '15 at 10:48







Sascha R.

















asked Jul 29 '15 at 15:37









Sascha R.Sascha R.

286211




286211












  • Is this your real script? Because there's a bug, and it has nothing to do with the keepalived upgrade. You call ping_return, but the function is called ping_test.

    – Oliver
    Jul 31 '15 at 9:10











  • I'm sorry. I copied it wrong. Of course I call ping_return at the end. The problem is really the ping. Keepalived semms to not know what to do with the ping. When I call that little script on the shell, it works perfectly. /edit: updated function name

    – Sascha R.
    Jul 31 '15 at 9:53











  • Update: I deleted the newer version of keepalived and installed the former version. After the installation I saw the same behavior of keepalived, which is strange.

    – Sascha R.
    Aug 7 '15 at 12:20











  • What I'd do to narrow down the problem: What happens if you remove the script altogether? What happens if you use /bin/true instead of the script? Could it be a simple permissions problem?

    – Oliver
    Aug 7 '15 at 13:49











  • It's not a permission problem. The problem is "systemctl start keepalived". When I start keepalived via systemctl, keepalived enters into fault state and the process dies. When I start keepalived with "keepalived -D" it works perfectly. My tracking script sections works and everything is fine. I am presently trying to understand why systemctl got this problem.

    – Sascha R.
    Aug 7 '15 at 14:02


















  • Is this your real script? Because there's a bug, and it has nothing to do with the keepalived upgrade. You call ping_return, but the function is called ping_test.

    – Oliver
    Jul 31 '15 at 9:10











  • I'm sorry. I copied it wrong. Of course I call ping_return at the end. The problem is really the ping. Keepalived semms to not know what to do with the ping. When I call that little script on the shell, it works perfectly. /edit: updated function name

    – Sascha R.
    Jul 31 '15 at 9:53











  • Update: I deleted the newer version of keepalived and installed the former version. After the installation I saw the same behavior of keepalived, which is strange.

    – Sascha R.
    Aug 7 '15 at 12:20











  • What I'd do to narrow down the problem: What happens if you remove the script altogether? What happens if you use /bin/true instead of the script? Could it be a simple permissions problem?

    – Oliver
    Aug 7 '15 at 13:49











  • It's not a permission problem. The problem is "systemctl start keepalived". When I start keepalived via systemctl, keepalived enters into fault state and the process dies. When I start keepalived with "keepalived -D" it works perfectly. My tracking script sections works and everything is fine. I am presently trying to understand why systemctl got this problem.

    – Sascha R.
    Aug 7 '15 at 14:02

















Is this your real script? Because there's a bug, and it has nothing to do with the keepalived upgrade. You call ping_return, but the function is called ping_test.

– Oliver
Jul 31 '15 at 9:10





Is this your real script? Because there's a bug, and it has nothing to do with the keepalived upgrade. You call ping_return, but the function is called ping_test.

– Oliver
Jul 31 '15 at 9:10













I'm sorry. I copied it wrong. Of course I call ping_return at the end. The problem is really the ping. Keepalived semms to not know what to do with the ping. When I call that little script on the shell, it works perfectly. /edit: updated function name

– Sascha R.
Jul 31 '15 at 9:53





I'm sorry. I copied it wrong. Of course I call ping_return at the end. The problem is really the ping. Keepalived semms to not know what to do with the ping. When I call that little script on the shell, it works perfectly. /edit: updated function name

– Sascha R.
Jul 31 '15 at 9:53













Update: I deleted the newer version of keepalived and installed the former version. After the installation I saw the same behavior of keepalived, which is strange.

– Sascha R.
Aug 7 '15 at 12:20





Update: I deleted the newer version of keepalived and installed the former version. After the installation I saw the same behavior of keepalived, which is strange.

– Sascha R.
Aug 7 '15 at 12:20













What I'd do to narrow down the problem: What happens if you remove the script altogether? What happens if you use /bin/true instead of the script? Could it be a simple permissions problem?

– Oliver
Aug 7 '15 at 13:49





What I'd do to narrow down the problem: What happens if you remove the script altogether? What happens if you use /bin/true instead of the script? Could it be a simple permissions problem?

– Oliver
Aug 7 '15 at 13:49













It's not a permission problem. The problem is "systemctl start keepalived". When I start keepalived via systemctl, keepalived enters into fault state and the process dies. When I start keepalived with "keepalived -D" it works perfectly. My tracking script sections works and everything is fine. I am presently trying to understand why systemctl got this problem.

– Sascha R.
Aug 7 '15 at 14:02






It's not a permission problem. The problem is "systemctl start keepalived". When I start keepalived via systemctl, keepalived enters into fault state and the process dies. When I start keepalived with "keepalived -D" it works perfectly. My tracking script sections works and everything is fine. I am presently trying to understand why systemctl got this problem.

– Sascha R.
Aug 7 '15 at 14:02











1 Answer
1






active

oldest

votes


















0














The custom script is denied to execute by SELinux.



chcon -t keepalived_unconfined_script_exec_t /etc/keepalived/chk_available.sh


  • https://www.mankier.com/8/keepalived_selinux





share|improve this answer

























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "2"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f709428%2ftrack-script-doesnt-work-after-keepalived-update%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    The custom script is denied to execute by SELinux.



    chcon -t keepalived_unconfined_script_exec_t /etc/keepalived/chk_available.sh


    • https://www.mankier.com/8/keepalived_selinux





    share|improve this answer





























      0














      The custom script is denied to execute by SELinux.



      chcon -t keepalived_unconfined_script_exec_t /etc/keepalived/chk_available.sh


      • https://www.mankier.com/8/keepalived_selinux





      share|improve this answer



























        0












        0








        0







        The custom script is denied to execute by SELinux.



        chcon -t keepalived_unconfined_script_exec_t /etc/keepalived/chk_available.sh


        • https://www.mankier.com/8/keepalived_selinux





        share|improve this answer















        The custom script is denied to execute by SELinux.



        chcon -t keepalived_unconfined_script_exec_t /etc/keepalived/chk_available.sh


        • https://www.mankier.com/8/keepalived_selinux






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Apr 21 '17 at 20:06









        chicks

        3,08072033




        3,08072033










        answered Apr 21 '17 at 19:05









        noobnoob

        1




        1



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Server Fault!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f709428%2ftrack-script-doesnt-work-after-keepalived-update%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            i YgQZSKBQCdD6et 8 Dx TTUmAuXnmJtc7VX,TMud SM
            dY Y5QzajHTYTfEaiNgv,cEnKxt58DjES yDhEa,NbYEfdHD

            Popular posts from this blog

            RemoteApp sporadic failureWindows 2008 RemoteAPP client disconnects within a matter of minutesWhat is the minimum version of RDP supported by Server 2012 RDS?How to configure a Remoteapp server to increase stabilityMicrosoft RemoteApp Active SessionRDWeb TS connection broken for some users post RemoteApp certificate changeRemote Desktop Licensing, RemoteAPPRDS 2012 R2 some users are not able to logon after changed date and time on Connection BrokersWhat happens during Remote Desktop logon, and is there any logging?After installing RDS on WinServer 2016 I still can only connect with two users?RD Connection via RDGW to Session host is not connecting

            Vilaño, A Laracha Índice Patrimonio | Lugares e parroquias | Véxase tamén | Menú de navegación43°14′52″N 8°36′03″O / 43.24775, -8.60070

            Cegueira Índice Epidemioloxía | Deficiencia visual | Tipos de cegueira | Principais causas de cegueira | Tratamento | Técnicas de adaptación e axudas | Vida dos cegos | Primeiros auxilios | Crenzas respecto das persoas cegas | Crenzas das persoas cegas | O neno deficiente visual | Aspectos psicolóxicos da cegueira | Notas | Véxase tamén | Menú de navegación54.054.154.436928256blindnessDicionario da Real Academia GalegaPortal das Palabras"International Standards: Visual Standards — Aspects and Ranges of Vision Loss with Emphasis on Population Surveys.""Visual impairment and blindness""Presentan un plan para previr a cegueira"o orixinalACCDV Associació Catalana de Cecs i Disminuïts Visuals - PMFTrachoma"Effect of gene therapy on visual function in Leber's congenital amaurosis"1844137110.1056/NEJMoa0802268Cans guía - os mellores amigos dos cegosArquivadoEscola de cans guía para cegos en Mortágua, PortugalArquivado"Tecnología para ciegos y deficientes visuales. Recopilación de recursos gratuitos en la Red""Colorino""‘COL.diesis’, escuchar los sonidos del color""COL.diesis: Transforming Colour into Melody and Implementing the Result in a Colour Sensor Device"o orixinal"Sistema de desarrollo de sinestesia color-sonido para invidentes utilizando un protocolo de audio""Enseñanza táctil - geometría y color. Juegos didácticos para niños ciegos y videntes""Sistema Constanz"L'ocupació laboral dels cecs a l'Estat espanyol està pràcticament equiparada a la de les persones amb visió, entrevista amb Pedro ZuritaONCE (Organización Nacional de Cegos de España)Prevención da cegueiraDescrición de deficiencias visuais (Disc@pnet)Braillín, un boneco atractivo para calquera neno, con ou sen discapacidade, que permite familiarizarse co sistema de escritura e lectura brailleAxudas Técnicas36838ID00897494007150-90057129528256DOID:1432HP:0000618D001766C10.597.751.941.162C97109C0155020