Linux: ls takes forever on local volume

A strange issue, A simple ls on local volumes take forever to complete.
Using strace gave a clue:

# strace -fiqttvx ls -l /opt
<snip>
10:26:37.917133 [002aa7a2] connect(4, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("142.216.0.1")}, 28) = 0
<snip>
10:26:47.912239 [002aa7a2] connect(4, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("142.216.0.1")}, 28) = 0
...

A socket on 142.216.0.1 is open and runs to timeout. Tcpdump gave more details:

# tcpdump host 142.216.0.1
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
10:26:30.356929 IP 142.216.47.158.33198 > 142.216.0.1.domain: ...
10:26:50.358702 IP 142.216.47.158.33199 > 142.216.0.1.domain: ...
10:26:50.358728 IP 142.216.47.158.33198 > 142.216.0.1.domain: ...
...

The wanted port is "domain" (=53); that's a DNS request.
Checking /etc/resolv.conf gave the answer :

# cat /etc/resolv.conf
nameserver 142.216.0.1

Resolv.conf was not pointing on the DNS. Correcting the file has immediate effect.

Comments

Popular Posts