ntpd client and RHEL 6

I have just stumbled upon an issue by using the ntpd client on a RHEL 6 system, in which the client peer could not synchronise to the ntpd server. The ntpdate -q my_ntpd_server worked just fine, but the output from ntpq -p on the client was:

 # ntpq -p
 localhost: timed out, nothing received
 ***Request timed out

The problem was causing /etc/hosts file and the default identical alias (hostname) for localhost, for both IPv4 and IPv6:   localhost localhost.localdomain localhost4 localhost4.localdomain4
 ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

So, to resolve this issue I had to remove localhost from IPv6 and leave only localhost6 since I am not using it. I’m aware that this is not the most elegant solution, but works for me now as I am not using IPv6.

Comments are closed.