Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #186980

Re: sudo slow on DNS lookup, with invalid resolv.conf entries

From Gene Heskett <gheskett@shentel.net>
Newsgroups linux.debian.user
Subject Re: sudo slow on DNS lookup, with invalid resolv.conf entries
Date 2017-09-19 00:10 +0200
Message-ID <urcoO-3Yv-3@gated-at.bofh.it> (permalink)
References <uq1lM-5ih-9@gated-at.bofh.it> <uqYc9-2wo-1@gated-at.bofh.it> <ur7fs-fa-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Monday 18 September 2017 12:39:12 Reco wrote:

> 	Hi.
>
> On Mon, Sep 18, 2017 at 08:50:36AM +0200, deloptes wrote:
> > Gene Heskett wrote:
> > > 127.0.0.1 localhost.localdomain localhost
> >
> > Sorry but I did not understand if the problem is there or if the
> > problem is that it is not there?
>
> Long story short, OP has a misbehaving Debian stretch installation
> with the hostname (as in - /proc/sys/kernel/hostname) set to
> 'localhost.localdomain'.
> /etc/hosts lacks such entry.
> /etc/resolv.conf points to an absent DNS.
>
> The result is - every execution of sudo has an added 30-second
> execution time 'bonus'.
>
> > I guess this is put there at time of installation. I'll check few
> > virtual machines later to see how it was written.
>
> If the user chooses conventional hostname (even 'debian') during the
> installation - sure, they should put a record in /etc/hosts. Unsure
> about stretch, but they did so since etch.
>
> The question is - since 'localhost.localdomain' is special, what
> happens if such hostname is chosen during the installation?
>
> > IMO if you have working resolver it shouldn't matter much.
>
> Please read this thread's subject one more time. Last three words
> especially.
>
> Reco

The OP, if he has a router, should point resolv.conf  at it for the dns 
entry. The router will fwd the request to his ISP's dns servers. This 
will NOT resolve local names, so a hosts file with those translations is 
a good idea.

resolv.conf in that event, should have the nameservers address, and the 
search order "hosts dns", something like this:
nameserver 192.168.XX.1
search 	host	dns
domain	coyote.den

where the XX is the block his local network is in in the 192.168.xx.nn 
space. And if network mangler is installed, it should be stopped.

In either event, as long as the machine stays where it is, I'd become 
root and issue:
chattr +i resolv.conf just so N-M can't tear up a perfectly functioning 
network connection.

But thats just me. I like things that Just Work(TM).

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

sudo slow on DNS lookup, with invalid resolv.conf entries "x9p" <debian-user@x9pneu.com> - 2017-09-15 18:10 +0200
  Re: sudo slow on DNS lookup, with invalid resolv.conf entries Reco <recoverym4n@gmail.com> - 2017-09-15 19:00 +0200
    Re: sudo slow on DNS lookup, with invalid resolv.conf entries "x9p" <debian-user@x9pneu.com> - 2017-09-15 21:30 +0200
      Re: sudo slow on DNS lookup, with invalid resolv.conf entries Reco <recoverym4n@gmail.com> - 2017-09-15 22:00 +0200
        Re: sudo slow on DNS lookup, with invalid resolv.conf entries "x9p" <debian-user@x9pneu.com> - 2017-09-15 23:10 +0200
          Re: sudo slow on DNS lookup, with invalid resolv.conf entries Reco <recoverym4n@gmail.com> - 2017-09-15 23:20 +0200
            Re: sudo slow on DNS lookup, with invalid resolv.conf entries "x9p" <debian-user@x9pneu.com> - 2017-09-15 23:40 +0200
              Re: sudo slow on DNS lookup, with invalid resolv.conf entries Reco <recoverym4n@gmail.com> - 2017-09-16 00:10 +0200
                Re: sudo slow on DNS lookup, with invalid resolv.conf entries "x9p" <debian-user@x9pneu.com> - 2017-09-16 01:20 +0200
                Re: sudo slow on DNS lookup, with invalid resolv.conf entries Gene Heskett <gheskett@shentel.net> - 2017-09-16 02:10 +0200
                Re: sudo slow on DNS lookup, with invalid resolv.conf entries "x9p" <debian-user@x9pneu.com> - 2017-09-17 22:40 +0200
                Re: sudo slow on DNS lookup, with invalid resolv.conf entries deloptes <deloptes@gmail.com> - 2017-09-17 23:00 +0200
                Re: sudo slow on DNS lookup, with invalid resolv.conf entries Brian <ad44@cityscape.co.uk> - 2017-09-18 00:10 +0200
                Re: sudo slow on DNS lookup, with invalid resolv.conf entries Gene Heskett <gheskett@shentel.net> - 2017-09-18 00:50 +0200
                Re: sudo slow on DNS lookup, with invalid resolv.conf entries deloptes <deloptes@gmail.com> - 2017-09-18 01:00 +0200
                Re: sudo slow on DNS lookup, with invalid resolv.conf entries Gene Heskett <gheskett@shentel.net> - 2017-09-18 01:10 +0200
                Re: sudo slow on DNS lookup, with invalid resolv.conf entries deloptes <deloptes@gmail.com> - 2017-09-18 09:00 +0200
                Re: sudo slow on DNS lookup, with invalid resolv.conf entries Reco <recoverym4n@gmail.com> - 2017-09-18 18:40 +0200
                Re: sudo slow on DNS lookup, with invalid resolv.conf entries deloptes <deloptes@gmail.com> - 2017-09-18 20:20 +0200
                Re: sudo slow on DNS lookup, with invalid resolv.conf entries Brian <ad44@cityscape.co.uk> - 2017-09-18 20:50 +0200
                Re: sudo slow on DNS lookup, with invalid resolv.conf entries Reco <recoverym4n@gmail.com> - 2017-09-18 22:50 +0200
                Re: sudo slow on DNS lookup, with invalid resolv.conf entries Brian <ad44@cityscape.co.uk> - 2017-09-19 00:00 +0200
                Re: sudo slow on DNS lookup, with invalid resolv.conf entries "x9p" <debian-user@x9pneu.com> - 2017-09-18 22:50 +0200
                Re: sudo slow on DNS lookup, with invalid resolv.conf entries Brian <ad44@cityscape.co.uk> - 2017-09-19 00:00 +0200
                Re: sudo slow on DNS lookup, with invalid resolv.conf entries deloptes <deloptes@gmail.com> - 2017-09-18 23:00 +0200
                Re: sudo slow on DNS lookup, with invalid resolv.conf entries Brian <ad44@cityscape.co.uk> - 2017-09-19 00:00 +0200
                Re: sudo slow on DNS lookup, with invalid resolv.conf entries Gene Heskett <gheskett@shentel.net> - 2017-09-19 00:10 +0200
                Re: sudo slow on DNS lookup, with invalid resolv.conf entries Gene Heskett <gheskett@shentel.net> - 2017-09-18 00:50 +0200
                Re: sudo slow on DNS lookup, with invalid resolv.conf entries Brian <ad44@cityscape.co.uk> - 2017-09-18 01:20 +0200
  Re: sudo slow on DNS lookup, with invalid resolv.conf entries Dan Ritter <dsr@randomstring.org> - 2017-09-15 23:10 +0200
    Re: sudo slow on DNS lookup, with invalid resolv.conf entries "x9p" <debian-user@x9pneu.com> - 2017-09-15 23:40 +0200

csiph-web