<p></p>
<h3 dir="auto">Description</h3>
<p dir="auto">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.</p>
<p dir="auto">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?</p>
<p dir="auto">question is obviously B’s status is alive on A, but A sends no OPTIONS to B.</p>
<h3 dir="auto">Troubleshooting</h3>
<p dir="auto"><a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/26111722/154245407-93f3ac77-3c22-4129-9877-9efa317007a5.png"><img src="https://user-images.githubusercontent.com/26111722/154245407-93f3ac77-3c22-4129-9877-9efa317007a5.png" alt="image" style="max-width: 100%;"></a><br>
<a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/26111722/154245553-d19c8121-27ef-448b-933d-153843c61048.png"><img src="https://user-images.githubusercontent.com/26111722/154245553-d19c8121-27ef-448b-933d-153843c61048.png" alt="image" style="max-width: 100%;"></a></p>
<h4 dir="auto">Reproduction</h4>
<ol dir="auto">
<li>set keepalive config ant A</li>
</ol>
<pre><code>loadmodule "keepalive.so"
modparam("keepalive","ping_interval",3)
modparam("keepalive","destination","172.22.247.232")
</code></pre>
<p dir="auto">use ka_is_alive function check B's status.<br>
2. restart A server and confirm that the OPTIONS status is correct.<br>
3. stop the B server until the number of retran messages reaches 15.<br>
4. restart B server, and check OPTIONS</p>
<h4 dir="auto">Log Messages</h4>
<p dir="auto"><a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/26111722/154245407-93f3ac77-3c22-4129-9877-9efa317007a5.png"><img src="https://user-images.githubusercontent.com/26111722/154245407-93f3ac77-3c22-4129-9877-9efa317007a5.png" alt="image" style="max-width: 100%;"></a></p>
<h4 dir="auto">SIP Traffic</h4>
<p dir="auto"><a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/26111722/154245553-d19c8121-27ef-448b-933d-153843c61048.png"><img src="https://user-images.githubusercontent.com/26111722/154245553-d19c8121-27ef-448b-933d-153843c61048.png" alt="image" style="max-width: 100%;"></a><br>
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.<br>
<a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/26111722/154248962-fa6efd08-361c-4be1-b3cf-3c452d6b4e36.png"><img src="https://user-images.githubusercontent.com/26111722/154248962-fa6efd08-361c-4be1-b3cf-3c452d6b4e36.png" alt="image" style="max-width: 100%;"></a><br>
<a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/26111722/154249002-f1c6b80e-2880-4c6b-bfb0-4a0f3963c6b8.png"><img src="https://user-images.githubusercontent.com/26111722/154249002-f1c6b80e-2880-4c6b-bfb0-4a0f3963c6b8.png" alt="image" style="max-width: 100%;"></a></p>
<h3 dir="auto">Possible Solutions</h3>
<h3 dir="auto">Additional Information</h3>
<ul dir="auto">
<li><strong>Operating System</strong>:</li>
</ul>
<pre><code>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
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/3028">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZI2CTIDDL42DNHHEV3U3N63XANCNFSM5ORHQAPQ">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/ABO7UZJQQQULYS64DZUPNO3U3N63XA5CNFSM5ORHQAP2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4Q7QY2RQ.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><kamailio/kamailio/issues/3028</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/3028",
"url": "https://github.com/kamailio/kamailio/issues/3028",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>