Keep getting 'Failed to perform async DNS resolution' error from pjsip/unbound resolver


#1

Hello,

Not sure why but I keep getting this error and pjsip can’t register if I specify tel.lu as my provider:

ERROR[21495]: res_resolver_unbound.c:306 unbound_resolver_resolve: Failed to perform async DNS resolution of ‘tel.lu’

This is followed by:

WARNING[25535]: res_pjsip_outbound_registration.c:796 schedule_retry: No response received from ‘sip:tel.lu:5060’ on registration attempt to ‘sip:mynumber@tel.lu:5060’, retrying in ‘60’

(If I enter the tel.lu IP, pjsip will try to register correctly.)

DNS resolution on the system seems to work fine. “host tel.lu” and “dig tel.lu” both return the correct IP for me. Other things I’ve tried:

  • adding an entry for tel.lu in /etc/hosts but res_resolver_unbound seems to ignore it.
  • specifying Google’s 8.8.8.8 nameserver in /etc/asterisk/resolver_unbound.conf (using the nameserver= option).
  • upping the debug logging in /etc/asterisk/resolver_unbound.conf but that doesn’t give me any more data (same with core set debug 65535 and core set verbose 65535).

At this point I’m out of ideas on how else to debug this and hoping somebody here is smarter than me.

System:
Debian 9
Kernel: 4.19.0-2-amd64
Asterisk: 16.2.1~dfsg-1 (Debian-provided package)


#2

Does it happen all the time? Is it sporadic?


#3

Happens all the time. I’ve restarted Asterisk numerous times now and simply cannot get this error to go away. (Internet link has been reset in between as well.)


#4

I think I’ve managed to work around the issue by blacklisting res_resolver_unbound.so, I added this to modules.conf and now pjsip is able to register correctly using the DNS name:

noload => res_resolver_unbound.so