0

I'm using Ubuntu 14.04 LTS. My problem appeared last week.

My DNS lookups randomly takes 15.525 seconds. But once in a while, it will be very fast like it used to be.

I've been using this solution to monitor the timings.

Here is an exemple of the results i have :

  DNS lookup                          :  15,525
  Connect to server (TCP)             :  15,543
  Connect to server (HTTP/S)          :  0,000
  Time from start until transfer began:  15,544
  Time for redirection (if any)       :  0,000
  Total time before transfer started  :  15,557

         Total time                   :  15,557
         Size of download (bytes)     :  266
         Average d/l speed (bytes/s)  :  17,000

When i try a DNS request like this, 3 cases might happens:

  • it taks a few millisconds like it should

or

  • it takes exactly 15.525 seconds

... which makes me think that something is causing a delay. However, i've been trying to solve this for 2 days and cannot what is causing the delay. I know that the problem is software related since my coworkers have no issue and we are on the same switch.

Here is the the content of /etc/resolv.conf :

nameserver 8.8.8.8
nameserver 8.8.4.4

.. and the content of /etc/NetworkManager/NetworkManager.conf :

[main]
plugins=ifupdown,keyfile,ofono
#dns=dnsmasq

[ifupdown]
managed=false

Thank you for your help, I'm having a hard time working in this conditions!

EDIT:

Result of nmcli dev show enp2s0 | grep -i dns :

IP4.DNS[1]:                             8.8.8.8
IP4.DNS[2]:                             8.8.4.4

Content of /etc/network/interfaces

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

Result of tail /etc/resolvconf/resolv.conf.d/* :

==> /etc/resolvconf/resolv.conf.d/head <==
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
tail: cannot open '/etc/resolvconf/resolv.conf.d/original' for reading: No such file or directory

==> /etc/resolvconf/resolv.conf.d/tail

Result of dig google.com

; <<>> DiG 9.10.3-P4-Ubuntu <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 63228
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: Message has 4 extra bytes at end

;; QUESTION SECTION:
;google.com.            IN  A

;; ANSWER SECTION:
google.com.     60  IN  A   216.58.204.142

;; Query time: 0 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Fri Oct 20 15:59:06 CEST 2017
;; MSG SIZE  rcvd: 48

Result of cat /etc/nsswitch.conf :

passwd:         compat
group:          compat
shadow:         compat
gshadow:        files

hosts:          files mdns4_minimal [NOTFOUND=return] dns myhostname
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

Result of cat /etc/hosts :

127.0.0.1   localhost
127.0.1.1   pelomeduda
127.0.0.1   // sorry cannot show this (company name)


# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
10
  • What a strange error. Did you check all the locations for futher DNS servers which might be configured? nmcli dev list iface <interfacename>, /etc/network/interfaces and /etc/resolvconf/resolv.conf.d/*?
    – malte
    Oct 20, 2017 at 10:41
  • Thanks @malte , I edited my post with the results. What should i look for in /etc/resolvconf/resolv.conf.d? I have 4 files: base, head, original, and tail
    – pelomedusa
    Oct 20, 2017 at 11:52
  • tail /etc/resolvconf/resolv.conf.d/* should be sufficient. Do you also use IPv6? Full disclosure: I'm fishing in the dark here. ;)
    – malte
    Oct 20, 2017 at 13:28
  • @Malte no problem, i really appreciate your help. I disabled IPv6 yesterday, but it did not solve anything. I also noticed that dig seems to be working properly! It uses 8.8.4.4 (Google) as a DNS.
    – pelomedusa
    Oct 20, 2017 at 13:54
  • That's even more strange. Does it work all the time? If so it might have something todo with the configuration for the http database in your /etc/nsswitch.conf and the /etc/hosts file. But this is also a wild guess.
    – malte
    Oct 20, 2017 at 14:21

0

You must log in to answer this question.

Browse other questions tagged .