Diagnosing DNS lookup problems - possible bad nsswitch.conf or other problem

Clash Royale CLAN TAG#URR8PPP up vote
1
down vote
favorite
tl:dr my ubuntu 16.04 system often struggles to resolve DNS that my colleagues (mostly using OSX/mac) have no problems with. We're all using 8.8.8.8 from the same wifi network. The domains in question are AWS urls that are frequently created or updated. Having read this question - I fear my nsswitch.conf doesn't make sense.
/etc/nsswitch.conf contains the line:
hosts: files mdns4_minimal [NOTFOUND=return] dns
Does that look right? If I understand rightly it will check (in order) hosts file, mdns (local dns?) then fail before it would check dns servers?
running the command nmcli dev show | grep DNS (from this question - how to know what dns I am using) returns the following:
IP4.DNS[1]: 8.8.8.8
IP4.DNS[2]: 8.8.4.4
I've also checked my hostfile doesn't contain any unexpected clashing entries. Where else should I look for clues?
The DNS lookups fail consistently (ie - it's not a slow DNS server that fails on the first attempt until a value is cached).
An example failed nslookup (with the domain changed to remove work domain) looks like:
> nslookup example.somedomain.com: 127.0.1.1
Address: 127.0.1.1#53
Non-authoritative answer:
*** Can't find example.somedomain.com: No answer
Online nslookup tools can resolve the urls correctly, and reveal that the time to live is 59 seconds, pretty short but not crazy.
Edit: More information (which I don't really understand, but may help an expert) after reading a few more questions:
the above nslookup seems to be using a local DNS server (127.0.1.1) using nslookup but explicitly setting the dns server resolved the URLs correctly:
> nslookup example.somedomain.com 8.8.8.8
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
Name: example.somedomain.com
Address: 10.116.[blah].[blah]
Name: example.somedomain.com
Address: 10.116.[blah].[blah]
/etc/NetworkManager/NetworkManager.conf looks like the following:
[main]
plugins=ifupdown,keyfile,ofono
dns=dnsmasq
[ifupdown]
managed=false
16.04 dns
add a comment |Â
up vote
1
down vote
favorite
tl:dr my ubuntu 16.04 system often struggles to resolve DNS that my colleagues (mostly using OSX/mac) have no problems with. We're all using 8.8.8.8 from the same wifi network. The domains in question are AWS urls that are frequently created or updated. Having read this question - I fear my nsswitch.conf doesn't make sense.
/etc/nsswitch.conf contains the line:
hosts: files mdns4_minimal [NOTFOUND=return] dns
Does that look right? If I understand rightly it will check (in order) hosts file, mdns (local dns?) then fail before it would check dns servers?
running the command nmcli dev show | grep DNS (from this question - how to know what dns I am using) returns the following:
IP4.DNS[1]: 8.8.8.8
IP4.DNS[2]: 8.8.4.4
I've also checked my hostfile doesn't contain any unexpected clashing entries. Where else should I look for clues?
The DNS lookups fail consistently (ie - it's not a slow DNS server that fails on the first attempt until a value is cached).
An example failed nslookup (with the domain changed to remove work domain) looks like:
> nslookup example.somedomain.com: 127.0.1.1
Address: 127.0.1.1#53
Non-authoritative answer:
*** Can't find example.somedomain.com: No answer
Online nslookup tools can resolve the urls correctly, and reveal that the time to live is 59 seconds, pretty short but not crazy.
Edit: More information (which I don't really understand, but may help an expert) after reading a few more questions:
the above nslookup seems to be using a local DNS server (127.0.1.1) using nslookup but explicitly setting the dns server resolved the URLs correctly:
> nslookup example.somedomain.com 8.8.8.8
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
Name: example.somedomain.com
Address: 10.116.[blah].[blah]
Name: example.somedomain.com
Address: 10.116.[blah].[blah]
/etc/NetworkManager/NetworkManager.conf looks like the following:
[main]
plugins=ifupdown,keyfile,ofono
dns=dnsmasq
[ifupdown]
managed=false
16.04 dns
1
Try disabling dnsmasq by commenting out dns in NetworkManager.conf.#dns=dnsmasq
â user822833
May 9 at 17:49
That seems to have worked. @MikaelSchultz Want to make it an answer?
â Andrew M
May 22 at 14:19
Nice to hear that it worked. Sure I can make it an answer as well :)
â user822833
May 22 at 14:32
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
tl:dr my ubuntu 16.04 system often struggles to resolve DNS that my colleagues (mostly using OSX/mac) have no problems with. We're all using 8.8.8.8 from the same wifi network. The domains in question are AWS urls that are frequently created or updated. Having read this question - I fear my nsswitch.conf doesn't make sense.
/etc/nsswitch.conf contains the line:
hosts: files mdns4_minimal [NOTFOUND=return] dns
Does that look right? If I understand rightly it will check (in order) hosts file, mdns (local dns?) then fail before it would check dns servers?
running the command nmcli dev show | grep DNS (from this question - how to know what dns I am using) returns the following:
IP4.DNS[1]: 8.8.8.8
IP4.DNS[2]: 8.8.4.4
I've also checked my hostfile doesn't contain any unexpected clashing entries. Where else should I look for clues?
The DNS lookups fail consistently (ie - it's not a slow DNS server that fails on the first attempt until a value is cached).
An example failed nslookup (with the domain changed to remove work domain) looks like:
> nslookup example.somedomain.com: 127.0.1.1
Address: 127.0.1.1#53
Non-authoritative answer:
*** Can't find example.somedomain.com: No answer
Online nslookup tools can resolve the urls correctly, and reveal that the time to live is 59 seconds, pretty short but not crazy.
Edit: More information (which I don't really understand, but may help an expert) after reading a few more questions:
the above nslookup seems to be using a local DNS server (127.0.1.1) using nslookup but explicitly setting the dns server resolved the URLs correctly:
> nslookup example.somedomain.com 8.8.8.8
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
Name: example.somedomain.com
Address: 10.116.[blah].[blah]
Name: example.somedomain.com
Address: 10.116.[blah].[blah]
/etc/NetworkManager/NetworkManager.conf looks like the following:
[main]
plugins=ifupdown,keyfile,ofono
dns=dnsmasq
[ifupdown]
managed=false
16.04 dns
tl:dr my ubuntu 16.04 system often struggles to resolve DNS that my colleagues (mostly using OSX/mac) have no problems with. We're all using 8.8.8.8 from the same wifi network. The domains in question are AWS urls that are frequently created or updated. Having read this question - I fear my nsswitch.conf doesn't make sense.
/etc/nsswitch.conf contains the line:
hosts: files mdns4_minimal [NOTFOUND=return] dns
Does that look right? If I understand rightly it will check (in order) hosts file, mdns (local dns?) then fail before it would check dns servers?
running the command nmcli dev show | grep DNS (from this question - how to know what dns I am using) returns the following:
IP4.DNS[1]: 8.8.8.8
IP4.DNS[2]: 8.8.4.4
I've also checked my hostfile doesn't contain any unexpected clashing entries. Where else should I look for clues?
The DNS lookups fail consistently (ie - it's not a slow DNS server that fails on the first attempt until a value is cached).
An example failed nslookup (with the domain changed to remove work domain) looks like:
> nslookup example.somedomain.com: 127.0.1.1
Address: 127.0.1.1#53
Non-authoritative answer:
*** Can't find example.somedomain.com: No answer
Online nslookup tools can resolve the urls correctly, and reveal that the time to live is 59 seconds, pretty short but not crazy.
Edit: More information (which I don't really understand, but may help an expert) after reading a few more questions:
the above nslookup seems to be using a local DNS server (127.0.1.1) using nslookup but explicitly setting the dns server resolved the URLs correctly:
> nslookup example.somedomain.com 8.8.8.8
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
Name: example.somedomain.com
Address: 10.116.[blah].[blah]
Name: example.somedomain.com
Address: 10.116.[blah].[blah]
/etc/NetworkManager/NetworkManager.conf looks like the following:
[main]
plugins=ifupdown,keyfile,ofono
dns=dnsmasq
[ifupdown]
managed=false
16.04 dns
edited May 9 at 14:39
asked May 9 at 14:07
Andrew M
6001622
6001622
1
Try disabling dnsmasq by commenting out dns in NetworkManager.conf.#dns=dnsmasq
â user822833
May 9 at 17:49
That seems to have worked. @MikaelSchultz Want to make it an answer?
â Andrew M
May 22 at 14:19
Nice to hear that it worked. Sure I can make it an answer as well :)
â user822833
May 22 at 14:32
add a comment |Â
1
Try disabling dnsmasq by commenting out dns in NetworkManager.conf.#dns=dnsmasq
â user822833
May 9 at 17:49
That seems to have worked. @MikaelSchultz Want to make it an answer?
â Andrew M
May 22 at 14:19
Nice to hear that it worked. Sure I can make it an answer as well :)
â user822833
May 22 at 14:32
1
1
Try disabling dnsmasq by commenting out dns in NetworkManager.conf.
#dns=dnsmasqâ user822833
May 9 at 17:49
Try disabling dnsmasq by commenting out dns in NetworkManager.conf.
#dns=dnsmasqâ user822833
May 9 at 17:49
That seems to have worked. @MikaelSchultz Want to make it an answer?
â Andrew M
May 22 at 14:19
That seems to have worked. @MikaelSchultz Want to make it an answer?
â Andrew M
May 22 at 14:19
Nice to hear that it worked. Sure I can make it an answer as well :)
â user822833
May 22 at 14:32
Nice to hear that it worked. Sure I can make it an answer as well :)
â user822833
May 22 at 14:32
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
There seems to be an issue with the local DNS cache mechanism provided by dnsmasq (which runs at localhost, 127.0.1.1). Not sure exactly what but if you disable the dnsmasq cache and always ask the primary (8.8.8.8) and secondary (8.8.4.4) DNS servers directly instead it might work better.
To disable dnsmasq you edit the file /etc/NetworkManager/NetworkManager.conf and comment out dns=dnsmasq like in the config below:
[main]
plugins=ifupdown,keyfile,ofono
#dns=dnsmasq
Hope it works out for you :)
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
There seems to be an issue with the local DNS cache mechanism provided by dnsmasq (which runs at localhost, 127.0.1.1). Not sure exactly what but if you disable the dnsmasq cache and always ask the primary (8.8.8.8) and secondary (8.8.4.4) DNS servers directly instead it might work better.
To disable dnsmasq you edit the file /etc/NetworkManager/NetworkManager.conf and comment out dns=dnsmasq like in the config below:
[main]
plugins=ifupdown,keyfile,ofono
#dns=dnsmasq
Hope it works out for you :)
add a comment |Â
up vote
1
down vote
accepted
There seems to be an issue with the local DNS cache mechanism provided by dnsmasq (which runs at localhost, 127.0.1.1). Not sure exactly what but if you disable the dnsmasq cache and always ask the primary (8.8.8.8) and secondary (8.8.4.4) DNS servers directly instead it might work better.
To disable dnsmasq you edit the file /etc/NetworkManager/NetworkManager.conf and comment out dns=dnsmasq like in the config below:
[main]
plugins=ifupdown,keyfile,ofono
#dns=dnsmasq
Hope it works out for you :)
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
There seems to be an issue with the local DNS cache mechanism provided by dnsmasq (which runs at localhost, 127.0.1.1). Not sure exactly what but if you disable the dnsmasq cache and always ask the primary (8.8.8.8) and secondary (8.8.4.4) DNS servers directly instead it might work better.
To disable dnsmasq you edit the file /etc/NetworkManager/NetworkManager.conf and comment out dns=dnsmasq like in the config below:
[main]
plugins=ifupdown,keyfile,ofono
#dns=dnsmasq
Hope it works out for you :)
There seems to be an issue with the local DNS cache mechanism provided by dnsmasq (which runs at localhost, 127.0.1.1). Not sure exactly what but if you disable the dnsmasq cache and always ask the primary (8.8.8.8) and secondary (8.8.4.4) DNS servers directly instead it might work better.
To disable dnsmasq you edit the file /etc/NetworkManager/NetworkManager.conf and comment out dns=dnsmasq like in the config below:
[main]
plugins=ifupdown,keyfile,ofono
#dns=dnsmasq
Hope it works out for you :)
edited May 22 at 14:45
answered May 22 at 14:40
user822833
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1034064%2fdiagnosing-dns-lookup-problems-possible-bad-nsswitch-conf-or-other-problem%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
Try disabling dnsmasq by commenting out dns in NetworkManager.conf.
#dns=dnsmasqâ user822833
May 9 at 17:49
That seems to have worked. @MikaelSchultz Want to make it an answer?
â Andrew M
May 22 at 14:19
Nice to hear that it worked. Sure I can make it an answer as well :)
â user822833
May 22 at 14:32