You are correct that Kamailio does not use the
libc resolver /
libresolv, but rather its own resolver, which ignores /etc/hosts.
-- Alex
On 5/19/20 10:42 AM, George Diamantopoulos wrote:
Hello all,
I've come across this today when trying to setup DMQ replication:
root@sbcpub0-stage-lhe0-cn1:/root# systemctl restart kamailio
root@sbcpub0-stage-lhe0-cn1:/root# kamcmd dmq.list_nodes
{
host: 172.30.154.189
port: 5090
resolved_ip: 172.30.154.189
status: active
last_notification: 0
local: 1
}
root@sbcpub0-stage-lhe0-cn1:/root# getent hosts
dmq-ng.services.domain.com <http://dmq-ng.services.domain.com>
172.30.154.189
dmq-ng.services.domain.com
<http://dmq-ng.services.domain.com>
172.17.130.13
dmq-ng.services.domain.com
<http://dmq-ng.services.domain.com>
root@sbcpub0-stage-lhe0-cn1:/root# grep dmq-ng /etc/kamailio/*
/etc/kamailio/kamailio-module-params.cfg:modparam("dmq",
"notification_address", "sip:dmq-ng.services.domain.com:5090
<http://dmq-ng.services.domain.com:5090>")
In another case, where the resolving IPs for the DMQ service hostname
were listed as A records in DNS, this worked as expected.
In this case, the second host of the DMQ group is not listed in
dmq.list_nodes, despite its being set in /etc/hosts, as shown by the
getent command.
Doesn't kamailio use nss for hostname resolution? Am I missing
something else? Thanks!
BR,
George
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users(a)lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
Web:
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users(a)lists.kamailio.org