<div dir="ltr">Hi Paolo,<div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><span style="font-family:tahoma,sans-serif;font-size:12.800000190734863px">kamailio "resolves" A host but does not query the DNS</span></blockquote><div><br></div><div>What do you mean by this?</div><div> </div><div>I am not overly familiar with Kamailio's DNS internals, but what do you see if you run the following commands?</div><div><br></div><div><font face="monospace, monospace">kamcmd dns.lookup SRV _sip._udp.<span style="font-size:12.800000190734863px">dmq-router-service.paolo.svc.</span><wbr style="font-size:12.800000190734863px"><span style="font-size:12.800000190734863px">cluster.local</span></font></div><div><font face="monospace, monospace"><span style="font-size:12.800000190734863px"><br></span></font></div><div><div><font face="monospace, monospace">kamcmd dns.lookup A <span style="font-size:12.800000190734863px">dmq-router-service.paolo.svc.</span><wbr style="font-size:12.800000190734863px"><span style="font-size:12.800000190734863px">cluster.local</span></font></div></div><div><span style="font-family:tahoma,sans-serif;font-size:12.800000190734863px"><br></span></div><div><font face="tahoma, sans-serif"><span style="font-size:12.800000190734863px">Cheers,</span></font></div><div><font face="tahoma, sans-serif"><span style="font-size:12.800000190734863px"><br></span></font></div><div><font face="tahoma, sans-serif"><span style="font-size:12.800000190734863px">Charles</span></font></div><div><span style="font-family:tahoma,sans-serif;font-size:12.800000190734863px"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 2 August 2018 at 13:27, Paolo Visintin - evosip.cloud <span dir="ltr"><<a href="mailto:paolo.visintin@evosip.cloud" target="_blank">paolo.visintin@evosip.cloud</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">Hello again! </div><div class="gmail_default" style="font-family:tahoma,sans-serif">Another interesting thing found running in debug=3</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default"><font face="tahoma, sans-serif">0(710) DEBUG: dmq [notification_peer.c:240]: get_dmq_host_list(): adding DMQ node A host dmq-router-service=sip:<a href="http://42.100.109.113:5062" target="_blank">42.100.<wbr>109.113:5062</a></font><br></div><div class="gmail_default"><font face="tahoma, sans-serif"><br></font></div><div class="gmail_default"><font face="tahoma, sans-serif">so , kamailio "resolves" A host but does not query the DNS</font></div><div class="gmail_default"><font face="tahoma, sans-serif">this is dump of dns request inside kamailio container:</font></div><div class="gmail_default"><font face="tahoma, sans-serif"><br></font></div><div class="gmail_default"><font face="tahoma, sans-serif"><div class="gmail_default">147 0.597474 10.42.1.251 → 10.96.0.10 DNS 102 Standard query 0xf31d SRV dmq-router-service.paolo.svc.<wbr>cluster.local</div><div class="gmail_default">151 0.598306 10.96.0.10 → 10.42.1.251 DNS 155 Standard query response 0xf31d SRV dmq-router-service.paolo.svc.<wbr>cluster.local SRV 10 100 0 3934376365383035.dmq-router-<wbr>service.paolo.svc.cluster.<wbr>local A 172.28.0.240</div><div class="gmail_default">156 0.598538 10.42.1.251 → 10.96.0.10 DNS 102 Standard query 0x1904 A dmq-router-service.paolo.svc.<wbr>cluster.local</div><div class="gmail_default">163 0.599275 10.96.0.10 → 10.42.1.251 DNS 118 Standard query response 0x1904 A dmq-router-service.paolo.svc.<wbr>cluster.local A 172.28.0.240</div></font></div><div class="gmail_default"><font face="tahoma, sans-serif"><br></font></div><div class="gmail_default"><font face="tahoma, sans-serif"><br></font></div></div><div class="gmail_extra"><br clear="all"><div><div class="m_6211467972410242955gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><font face="tahoma, sans-serif"><b>Paolo Visintin</b></font></div><div><font face="tahoma, sans-serif"><i>CTO</i></font></div><div><font face="tahoma, sans-serif"><a href="http://evosip.cloud" target="_blank">evosip.cloud</a></font></div><img src="https://pbs.twimg.com/profile_images/994977366991687680/3zZpsQqs_400x400.jpg" alt="Risultati immagini per evosip" width="96" height="96"><br></div></div></div><div><div class="h5">
<br><div class="gmail_quote">2018-08-02 0:24 GMT+02:00 Paolo Visintin - evosip.cloud <span dir="ltr"><<a href="mailto:paolo.visintin@evosip.cloud" target="_blank">paolo.visintin@evosip.cloud</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Hello Charles, </div><div class="gmail_default" style="font-family:tahoma,sans-serif">sorry for late reply, we've had some issues rebuilding docker images with kamailo nightly build!</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">We are running on our local, private on premise kubernetes cluster so connections from outside is simply impossible (in dev we are using a "closed" network system)</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">I've just tried to : </div><div class="gmail_default" style="font-family:tahoma,sans-serif">- open a tcpdump trace in the instance tracing only the DMQ port defined [5062] - (tcpdump -i eth0 port 5062)</div><div class="gmail_default" style="font-family:tahoma,sans-serif">- packet coming from nowhere</div><div class="gmail_default" style="font-family:tahoma,sans-serif">- started kamailio ($kamailio -f $PATH_KAMAILIO_CFG -m 512 -DD -E -e)</div><div class="gmail_default" style="font-family:tahoma,sans-serif">- seeing this in tcpdump : </div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><div class="gmail_default">root@router-0:/# tcpdump -i eth0 port 5062</div><div class="gmail_default">tcpdump: verbose output suppressed, use -v or -vv for full protocol decode</div><div class="gmail_default">listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes</div><div class="gmail_default">22:06:44.966991 IP router-0.router.paolo.svc.clus<wbr>ter.local.5062 > 42.100.109.113.5062: UDP, length 497</div><div class="gmail_default">22:06:45.572084 IP router-0.router.paolo.svc.clus<wbr>ter.local.5062 > 42.100.109.113.5062: UDP, length 497</div><div class="gmail_default">22:06:46.571875 IP router-0.router.paolo.svc.clus<wbr>ter.local.5062 > 42.100.109.113.5062: UDP, length 497</div><div class="gmail_default"><br></div><div class="gmail_default">so seems that kamailio is trying to contact the foreign ip</div><div class="gmail_default"><br></div><div class="gmail_default">if i check inside the configuration: </div><div class="gmail_default"><div class="gmail_default">modparam("dmq", "server_address", DMQ_SERVER_ADDRESS)</div><div class="gmail_default">modparam("dmq", "notification_address", DMQ_NOTIFICATION_ADDRESS)</div><span><div class="gmail_default">modparam("dmq", "multi_notify", 1)</div><div class="gmail_default">modparam("dmq", "num_workers", 4)</div><div class="gmail_default">modparam("dmq", "ping_interval", 15)</div><div class="gmail_default"><br></div><div class="gmail_default"><br></div></span><div class="gmail_default">...</div><div class="gmail_default"><br></div><div class="gmail_default"><div class="gmail_default"> if(is_method("KDMQ") && dst_port == DMQ_PORT){</div><div class="gmail_default"> dmq_handle_message();</div><div class="gmail_default"> exit;</div><div class="gmail_default"> }</div></div></div><div class="gmail_default"><br></div></div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_default" style="font-family:tahoma,sans-serif">and in DMQ_NOTIFICATION_ADDRESS I have : </div><div class="gmail_default" style="font-family:tahoma,sans-serif">#!define DMQ_NOTIFICATION_ADDRESS "sip:dmq-router-service:5062"</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">dmq-router-service DNS resolves: </div><div class="gmail_default"><font face="tahoma, sans-serif">> dmq-router-service.paolo.svc.c<wbr>luster.local</font></div><span><div class="gmail_default"><font face="tahoma, sans-serif">Server:<span style="white-space:pre-wrap"> </span>10.96.0.10</font></div><div class="gmail_default"><font face="tahoma, sans-serif">Address:<span style="white-space:pre-wrap"> </span>10.96.0.10#53</font></div><div class="gmail_default"><font face="tahoma, sans-serif"><br></font></div><div class="gmail_default"><font face="tahoma, sans-serif">Non-authoritative answer:</font></div></span><div class="gmail_default"><font face="tahoma, sans-serif">Name:<span style="white-space:pre-wrap"> </span>dmq-router-service.paolo.svc.c<wbr>luster.local</font></div><div class="gmail_default"><font face="tahoma, sans-serif">Address: 172.28.0.240</font><span style="font-family:tahoma,sans-serif"></span></div><div class="gmail_default"><span style="font-family:tahoma,sans-serif"><br></span></div><div class="gmail_default"><span style="font-family:tahoma,sans-serif"><br></span></div><div class="gmail_default"><span style="font-family:tahoma,sans-serif">so -nowhere- i am able to find <span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">42.100.109.113</span></span></div><div class="gmail_default"><span style="font-family:tahoma,sans-serif"><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></span></div><div class="gmail_default"><span style="font-family:tahoma,sans-serif"><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></span></div></div><div class="gmail_extra"><div class="gmail_default" style="font-family:tahoma,sans-serif">and in kamailio log: </div><div class="gmail_default" style="font-family:tahoma,sans-serif">13(821) ERROR: dmq [notification_peer.c:599]: notification_resp_callback_f()<wbr>: deleting server sip:<a href="http://42.100.109.113:5062" target="_blank">42.100.109.113:5062</a> because of failed request</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"></div><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_default" style="font-family:tahoma,sans-serif">Cheers,</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Paolo</div><div><div class="m_6211467972410242955h5"><br><div class="gmail_quote">2018-07-26 18:14 GMT+02:00 Charles Chance <span dir="ltr"><<a href="mailto:charles.chance@sipcentric.com" target="_blank">charles.chance@sipcentric.com</a><wbr>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Aleksandar,<div><br></div><div>The initial depopulation of the nodes (following a period of 'pending' state) is due to no response being received from them. Are you able to trace the messages to/from one of them to confirm what is happening there?</div><div><br></div><div>As for the unrecognised IP, I'm afraid I can't answer that one. It must be coming from somewhere - it's just a case of finding out where. Following the initial population/depopulation of the node list, DMQ simply repeats the process over and over until it eventually connects to one or more other nodes. Are you running on a public cloud somewhere or is it your own, locally running Kubernetes cluster?</div><div><br></div><div>Cheers,</div><div><br></div><div>Charles</div><div><br></div></div><div class="gmail_extra"><div><div class="m_6211467972410242955m_3284521185130030470gmail-h5"><br><div class="gmail_quote">On 26 July 2018 at 15:30, Aleksandar Sosic <span dir="ltr"><<a href="mailto:alex.sosic@evosip.cloud" target="_blank">alex.sosic@evosip.cloud</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Charles,<br>
<br>
We're so glad about the improvements you just committed! Thanks!<br>
<br>
Now I'm using the latest nightly: 5.2.0~dev6+0~20180726010431.11<wbr>65+xenial<br>
Kamailio starts even if the DNS record does not exist at first, that's<br>
great. I'm having this nodes up and running:<br>
```<br>
proxy-66f79498cc-8ws6d 3/3 Running 0<br>
4m 172.28.1.4<br>
proxy-66f79498cc-b68dd 3/3 Running 0<br>
4m 172.28.1.5<br>
proxy-66f79498cc-lhbxg 3/3 Running 0<br>
4m 172.28.1.6<br>
proxy-66f79498cc-png6p 3/3 Running 0<br>
4m 172.28.1.7<br>
```<br>
<br>
In those 4-5 minutes I've experienced a population and depopulation of<br>
the dmq nodes.<br>
<br>
For example:<br>
```<br>
kamcmd> dmq.list_nodes<br>
{<br>
host: 172.28.1.4<br>
port: 5061<br>
resolved_ip: 172.28.1.4<br>
status: pending<br>
last_notification: 0<br>
local: 0<br>
}<br>
{<br>
host: 172.28.1.6<br>
port: 5061<br>
resolved_ip: 172.28.1.6<br>
status: pending<br>
last_notification: 0<br>
local: 0<br>
}<br>
{<br>
host: 40.100.109.113<br>
port: 5061<br>
resolved_ip: 40.100.109.113<br>
status: pending<br>
last_notification: 0<br>
local: 0<br>
}<br>
{<br>
host: 172.28.1.5<br>
port: 5061<br>
resolved_ip: 172.28.1.5<br>
<span>status: active<br>
last_notification: 0<br>
local: 1<br>
}<br>
```<br>
<br>
</span>And after a few seconds only the loca node itself:<br>
```<br>
kamcmd> dmq.list_nodes<br>
{<br>
host: 172.28.1.5<br>
port: 5061<br>
resolved_ip: 172.28.1.5<br>
<span>status: active<br>
last_notification: 0<br>
local: 1<br>
}<br>
```<br>
</span>And then again the 3 nodes and the 40.100.109.113 which is a Microsoft<br>
IP and I don't know what's doing that IP into my dmq server list.<br>
<br>
The DNS record is this:<br>
```<br>
root@proxy-66f79498cc-b68dd:/# nslookup dmq-proxy-service<br>
<span>Server: 10.96.0.10<br>
Address: 10.96.0.10#53<br>
<br>
Non-authoritative answer:<br>
</span>Name: dmq-proxy-service.alex.svc.clu<wbr>ster.local<br>
Address: 172.28.1.7<br>
Name: dmq-proxy-service.alex.svc.clu<wbr>ster.local<br>
Address: 172.28.1.6<br>
Name: dmq-proxy-service.alex.svc.clu<wbr>ster.local<br>
Address: 172.28.1.5<br>
Name: dmq-proxy-service.alex.svc.clu<wbr>ster.local<br>
Address: 172.28.1.4<br>
```<br>
Any clues why that ip is in the dmq nodes list? And why .7 is missing?<br>
Kind regards,<br>
<span class="m_6211467972410242955m_3284521185130030470gmail-m_543497129463863544im m_6211467972410242955m_3284521185130030470gmail-m_543497129463863544HOEnZb">--<br>
Aleksandar Sosic<br>
mail: alex.sosic@evosip.cloud<br>
<br>
</span><span class="m_6211467972410242955m_3284521185130030470gmail-m_543497129463863544im m_6211467972410242955m_3284521185130030470gmail-m_543497129463863544HOEnZb">On Wed, Jul 25, 2018 at 3:06 PM Charles Chance<br>
<<a href="mailto:charles.chance@sipcentric.com" target="_blank">charles.chance@sipcentric.com</a><wbr>> wrote:<br>
><br>
> Hi,<br>
><br>
> I have just pushed some changes to master - one of these allows startup to continue even if initial node resolution fails.<br>
><br>
> There are some other improvements, too, which I have been planning to push for some time and which should also help in your situation.<br>
><br>
> Can you try again with these changes applied and let me know the outcome?<br>
><br>
> Cheers,<br>
><br>
> Charles<br>
<br>
</span><div class="m_6211467972410242955m_3284521185130030470gmail-m_543497129463863544HOEnZb"><div class="m_6211467972410242955m_3284521185130030470gmail-m_543497129463863544h5">______________________________<wbr>_________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi<wbr>-bin/mailman/listinfo/sr-users</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="m_6211467972410242955m_3284521185130030470gmail-">-- <br><div class="m_6211467972410242955m_3284521185130030470gmail-m_543497129463863544gmail_signature"><div dir="ltr"><div><div dir="ltr"><font face="arial, helvetica, sans-serif"><b><font size="2">Charles Chance</font></b><br><font size="2">Managing Director</font></font><br><div><font face="arial, helvetica, sans-serif"><font size="2"><br></font></font></div><div><font face="arial, helvetica, sans-serif"><font size="2">t. 0330 120 1200 m. 07932 063 891</font></font></div></div></div></div></div>
</span></div><div class="m_6211467972410242955m_3284521185130030470gmail-HOEnZb"><div class="m_6211467972410242955m_3284521185130030470gmail-h5">
<br>
<div><font color="gray" style="font-size:10pt;font-family:Helvetica,Arial,sans-serif">Sipcentric Ltd.
Company registered in England & Wales no. 7365592.</font><span style="font-size:10pt;font-family:Helvetica,Arial,sans-serif"> </span><font color="gray" style="font-size:10pt;font-family:Helvetica,Arial,sans-serif">Registered
office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, Birmingham Science Park, Birmingham B7 4BB.</font></div></div></div><br>______________________________<wbr>_________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi<wbr>-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div></div></div></div>
</blockquote></div><br></div></div></div>
<br>______________________________<wbr>_________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><font face="arial, helvetica, sans-serif"><b><font size="2">Charles Chance</font></b><br><font size="2">Managing Director</font></font><br><div><font face="arial, helvetica, sans-serif"><font size="2"><br></font></font></div><div><font face="arial, helvetica, sans-serif"><font size="2">t. 0330 120 1200 m. 07932 063 891</font></font></div></div></div></div></div>
</div>
<br>
<div><font color="gray" style="font-size:10pt;font-family:Helvetica,Arial,sans-serif">Sipcentric Ltd.
Company registered in England & Wales no. 7365592.</font><span style="font-size:10pt;font-family:Helvetica,Arial,sans-serif"> </span><font color="gray" style="font-size:10pt;font-family:Helvetica,Arial,sans-serif">Registered
office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, Birmingham Science Park, Birmingham B7 4BB.</font></div>