1834732 Members
2921 Online
110070 Solutions
New Discussion

ntpq -p doesn't work

 
Hanry Zhou
Super Advisor

ntpq -p doesn't work

I did everything I am supposed to do, but still "ntpq -p " is not working, and got following. Should not ntpq -p be working?
# ntpq -p
localhost: timed out, nothing received
***Request timed out


We are using "restric" clause on the time-server, so I have already added following on the time-server:
restrict client_ip ntpport nomodify
Should I restart anything on the time-server after I add this clause?

also, already made the appropriate chanegs in /etc/rc.config.d/netdaemons, and also added "server time-server-ip" in /etc/ntp.conf


I don't see any erros when restart "xntpd".

Please help. Thanks!
none
6 REPLIES 6
David Bellamy
Respected Contributor

Re: ntpq -p doesn't work

try ntpq -p
Hanry Zhou
Super Advisor

Re: ntpq -p doesn't work

I got the same:
ntpq -p time-server-ip
time-server-ip: timed out, nothing received
***Request timed out


I also tried ntpdate -d time-server-ip
and got following:
....
...
19 Jul 19:57:39 ntpdate[3383]: no server suitable for synchronization found
none
James R. Ferguson
Acclaimed Contributor

Re: ntpq -p doesn't work

Hi Hanry:

Perhaps your firewall isn't allowing the request.

Regards!

...JRF...
Hanry Zhou
Super Advisor

Re: ntpq -p doesn't work

No, they are all inside of the company, there are not any firewalls in between.

none
Hanry Zhou
Super Advisor

Re: ntpq -p doesn't work

After I add "server time-server-ip" in /etc/ntp.conf on time server, do I need to restart any daemons?
none
Bill Hassell
Honored Contributor

Re: ntpq -p doesn't work

ntpq -p IP-ADDRESS always works, regardless of how /etc/ntp.conf is configured, the ntpq program will poll the server specified and if the server is reachable (ie, ping) then it will reply -- unless it has a highly restricted configuration. Don't bother with xntpd, netdaemons and ntp.conf until you can get a response from your ntp server using ntpq -p IP-ADDRESS.

Now it is really important to get your network administrators involved -- for very obscure reasons, some network admins disable port 123 (the ntp port) through routers. You can try ping and traceroute but the only way to truly decipher a network resatriction is to use Wireshark to trace the ntpq query. That will tell you exactly what is happening.

Once fixed, all you'll need is the server line in ntp.conf. The netdaemons file is just used for bootup.


Bill Hassell, sysadmin