ntpq is showing connection refused

Latest response

sbj2drmmnwapf02:~# ntpq -p
ntpq: read: Connection refused

sbj2drmmnwapf02:~# cat /etc/ntp.conf
restrict -4 default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict -6 ::1
restrict 10.68.226.0 mask 255.255.255.0 nomodify notrap

driftfile /var/lib/ntp/ntp.drift
logfile /var/log/ntp.log

server 127.127.1.0 # local clock

server 10.68.226.161 iburst prefer

server 10.84.36.11 iburst prefer

#server 10.84.36.203 iburst prefer

Same configuration is working in another server

Responses

Someone please can help me out.

Is your server RHEL 6 or 7?

service ntpd restart

Hi Chandan,

As Dev said before it is common to see the connection refused when the service is down. Please refer this Red Hat KB : https://access.redhat.com/solutions/222033

In case of RHEL7.x and above: # systemctl restart ntpd.service OR # systemctl restart chronyd.service