Description

Ka servers A(172.22.247.37) and B(172.22.247.232) use the keepalive module to check if each other's status is available. When one server such as B is down, server A will still send about 16 OPTIONS messages. When A sends the 14th or 15th OPTIONS, ka on A will change B's status to down. At this point, if B restarts, B will reply 200OK to A’s OPTIONS message, and A will change B's status to alive, but A will not send OPTIONS message to B any more. Even if B dies later, B's status will be alive on A forever.

ps: if B is restart at the 14th OPTIONS or earlier, A will correctly send heartbeat OPTIONS to B later. if B is restart at the 16th or later, A will not change B's status to alive, and certainly will not sends OPTIONS to B anymore, but this is correct isn't it?

question is obviously B’s status is alive on A, but A sends no OPTIONS to B.

Troubleshooting

image
image

Reproduction

  1. set keepalive config ant A
loadmodule "keepalive.so"
modparam("keepalive","ping_interval",3)
modparam("keepalive","destination","172.22.247.232")

use ka_is_alive function check B's status.
2. restart A server and confirm that the OPTIONS status is correct.
3. stop the B server until the number of retran messages reaches 15.
4. restart B server, and check OPTIONS

Log Messages

image

SIP Traffic

image
at the time that the arrow points to, 172.22.247.232's status is 1(refers to the log above). but notice that there is no OPTIONS message to 172.22.247.232 anymore.
image
image

Possible Solutions

Additional Information

Linux localhost.localdomain 3.10.0-1127.el7.x86_64 #1 SMP Tue Mar 31 23:36:51 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
kamailio 5.5.2


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: <kamailio/kamailio/issues/3028@github.com>