Can’t Connect to NTP Server Using ntpq, What Am I Doing Wrong?

0
2
Asked By CuriousCat92 On

Hey everyone, I'm really stuck trying to query a single NTP server with the ntpq command. Every time I try to run it like this: `ntpq -p x.x.x.x` or `ntpq -c rv x.x.x.x`, I keep getting a "timed out" error. Is it even feasible to test just one server with ntpq? Should I be using ntpdate instead or just run ntpq without specifying an IP? Just so you know, my ntpd service is working fine since `ntpd -gq` runs smoothly. I also think there might be some restrictions related to the /etc/ntp.conf file allowing only localhost connections when I give an external IP in the ntpq command. What do you all think?

3 Answers

Answered By NerdyNavigator88 On

First off, you should check your connectivity to the server using `ntpdate`. In my experience, that command is an easier way to confirm if you can reach the NTP server. If `ntpdate` works and gives you the correct time, then there might be a different issue like configuration problems or network settings to look into.

Answered By NerdyNavigator88 On
Answered By TechieTommy55 On

According to the man page for ntpq, when you use the `-p` option, it gives you a list of the peers the server is aware of. This means that if you're passing an IP, it's supposed to show the current status of that NTP server. But what are you trying to actually "test" with that? Seems like there might be a misunderstanding of what information you expect.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.