Hello,<br><br>Both options (dns_cache_init=no and use_dns_cache=no) worked for me.<br>I think that the internal resolver is used only if cache is enabled.<br>Thank you!<br><br clear="all">Santiago Soares<br>Fone: (41) 8488-0537<br>
<br><br><div class="gmail_quote">On Wed, Sep 1, 2010 at 2:09 PM, Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im"><br>
<br>
On 9/1/10 7:01 PM, Andrei Pelinescu-Onciul wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
On Sep 01, 2010 at 18:49, Klaus Darilion<<a href="mailto:klaus.mailinglists@pernau.at" target="_blank">klaus.mailinglists@pernau.at</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
kamailio>= 3.0 is based on ser's core which has implemented its own<br>
caching resolver library. I do not know if there is a way to disable<br>
it complete and use the system's stub resolver. You could try the<br>
"use_dns_cache" option:<br>
<a href="http://sip-router.org/wiki/cookbooks/core-cookbook/devel#dns_parameters" target="_blank">http://sip-router.org/wiki/cookbooks/core-cookbook/devel#dns_parameters</a><br>
</blockquote>
Yes, if you disable the dns cache it will use the system resolver.<br>
</blockquote>
<br></div>
when the cache is enabled and the record is not cached, will first dns query find the records in /etc/hosts and then cache it? Or in other words, if a query to internal cache fails, then is used the system resolver?<br>
<br>
Just for sake of completing info in this thread, disabling completely the internal cache is by global parameter:<br>
dns_cache_init=no<br>
<br>
Thanks,<br><font color="#888888">
Daniel</font><div><div></div><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
It's also used during the initial startup phase, when the dns cache is<br>
not yet fully initialized.<br>
<br>
You could also leave the cache enabled and add/remove records by hand<br>
(using sercmd or xmlrpc) using the dns rpcs (e.g. dns_add_a,<br>
dns.add_srv, dns.delete_a a.s.o, for more info see<br>
<a href="http://sip-router.org/docbook/sip-router/branch/master/rpc_list/rpc_list.html#dns.add_a" target="_blank">http://sip-router.org/docbook/sip-router/branch/master/rpc_list/rpc_list.html#dns.add_a</a><br>
).<br>
<br>
Andrei<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
regards<br>
klaus<br>
<br>
Am 01.09.2010 17:10, schrieb Santiago Soares:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hello,<br>
<br>
I'm using kamailio as a simple load balancer.<br>
My dispatcher list is something like that:<br>
<br>
1 sip:server1:5060<br>
1 sip:server2:5060<br>
2 sip:server1:5060<br>
<br>
and /etc/hosts is<br>
<br>
10.1.1.1 server1<br>
10.1.1.2 server2<br>
<br>
When I want to do some maintenance task in one of the servers, server2,<br>
for exemple, I simply change /etc/hosts like that:<br>
<br>
10.1.1.1 server1<br>
10.1.1.1 server2<br>
<br>
And all the traffic is redirected to server 1. It's a simple yet<br>
effective way to remove a server from balancing.<br>
The thing is that it works on kamailio 1.5.3, but on kamailio 3.0.3 it<br>
doesn't work, since kamailio appears to resolv names only by DNS.<br>
I receive this message on startup:<br>
<br>
Sep 1 12:04:32 install /usr/local/sbin/kamailio[16077]: ERROR:<br>
dispatcher [dispatch.c:241]: could not resolve server1<br>
Sep 1 12:04:32 install /usr/local/sbin/kamailio[16077]: ERROR:<br>
dispatcher [dispatcher.c:247]: no dispatching list loaded from file<br>
Sep 1 12:04:32 install /usr/local/sbin/kamailio[16077]: ERROR:<core><br>
[sr_module.c:874]: init_mod(): Error while initializing module dispatcher<br>
<br>
<br>
Is there any way to avoid this behavior, and force kamailio to use<br>
/etc/hosts?<br>
<br>
Thank you.<br>
<br>
Santiago Soares<br>
Fone: (41) 8488-0537<br>
<br>
<br>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
</blockquote>
<br></div></div><div class="im">
-- <br>
Daniel-Constantin Mierla<br>
<a href="http://www.asipto.com/" target="_blank">http://www.asipto.com/</a><br>
<br>
<br>
_______________________________________________<br></div><div><div></div><div class="h5">
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</div></div></blockquote></div><br>