0

SSH and sudo were starting very slowly because /etc/hostname and /etc/hosts did not match. After adding a line for the hostname in the hosts file, the initial 2-4 second delay no longer occurs.

At first I was surpised the mis-configured hosts file caused delays with SSH and sudo. I was SSH'ing to the server with a direct IP address, and sudo did not seem to require a hostname lookup. However, I read they were both doing reverse DNS lookups. (sudo also helpfully reported it was unable to resolve the host)

What other network operations will be slowed down by such a mis-configured hosts file? For example, could a mis-configured hosts file slow down connections to an Apache Tomcat server with Spring hosted on that server?

Leftium
  • 293
  • 2
  • 8

2 Answers2

2

Anything performing a reverse DNS lookup will be slowed down only if you are lucky, rest of the time they'll create a havoc. Ping and traceroute will behave funny. If you are running a mail server then there is a high probability that your mails will be treated as spam by gmail and other reputed providers.

Basically it is your trust rating which you are compromising.

Aditya Patawari
  • 1,065
  • 10
  • 23
0

Were your DNS servers correct in /etc/resolv.conf? If so, this shouldn't really have had any major effect. If your DNS servers were also broken, this could result in significant delays as software waiting for the timeout for DNS queries.

devicenull
  • 5,622
  • 1
  • 26
  • 31
  • There is a working nameserver listed in /etc/resolv.conf, but I forgot to mention the folks here like to change the hostname without actually registering it in DNS. – Leftium Dec 30 '11 at 03:21