I will describe this problem details in shell interaction records:

$ host `hostname`
Host myhost.local not found: 3(NXDOMAIN)

$ cat /etc/hosts | grep localhost myhost.local

$ ping `hostname` # stuck about 5 seconds (maybe a DNS query timeout)
PING localhost ( 56 data bytes
64 bytes from icmp_seq=0 ttl=64 time=0.108 ms
64 bytes from icmp_seq=1 ttl=64 time=0.028 ms
  • This problem did have some side effects: stackoverflow.com/questions/37971955/… – bitweaver Nov 30 '16 at 3:42
  • do you get the same behaviour when you do ping localhost – Deesbek Nov 30 '16 at 3:50
  • @Deesbek ping localhost has no delay on my machine – bitweaver Nov 30 '16 at 3:53
  • interesting. Any reason why you are running hostname. I get the exact same output to all the same commands as you or at least could do had I set my hostname to myhost.local. I would try setting your domain to a resolvable domain. In any case I cannot replicate your delay. – Deesbek Nov 30 '16 at 3:57

You must log in to answer this question.

Browse other questions tagged .