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
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;
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
add a comment |
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
Is this your real script? Because there's a bug, and it has nothing to do with the keepalived upgrade. You callping_return
, but the function is calledping_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
add a comment |
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
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
centos7 keepalived
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 callping_return
, but the function is calledping_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
add a comment |
Is this your real script? Because there's a bug, and it has nothing to do with the keepalived upgrade. You callping_return
, but the function is calledping_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
add a comment |
1 Answer
1
active
oldest
votes
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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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
add a comment |
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
add a comment |
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
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
edited Apr 21 '17 at 20:06
chicks
3,08072033
3,08072033
answered Apr 21 '17 at 19:05
noobnoob
1
1
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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 calledping_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