ntp server cannot sync clients
hi all,
maybe you guys can help since i've tried almost everything here. I have 2 servers that act as ntp servers, both in cluster. i've configued to each client 2 servers and only one of the servers doing me an hard time, the other works perfectly. here's some output from the client: Code:
[root@host1 ~]# ntpq -p Code:
[root@host1 ~]# cat /etc/ntp.conf Code:
[root@ntp1 etc]# ntpq -p 10x |
Hi,
I had various problems with ntpd, on an irregular basis. It worked most of the time, then it broke for no apparent reason (at least, I couldn't find it). I switched to chrony that proved to be much more reliable for me, no problems so far. So maybe this could be an option for you, too. |
Quote:
for me its not an option to use chrony. besides this issue ntpd working properly for me. so I rather solve this issue. 10x anyway |
Is the configuration file you posted a client's or ntp2's?
Quote:
Quote:
|
Quote:
The conf file above is from the client. As for the restrict line, Im not sure thats the prob since i am using the same conf file both servers and the other one(ntp2) can accept incoming queries and works just fine, so im doubt that will help but i will try anyway at monday. and btw, no fw behind these servers |
I am far from being an expert with ntp. However, since you have confirmed that the configuration files are all the same then my assumptions are correct. ntp2 only appears to be working since it references the local clock on all the computers. With out uncommenting the restrict line quoted in my other post your servers will not be able to accept connections from clients and the reason you can not connect to ntp1.
Should be: Quote:
|
Is this a standalone network? If not then you should sync the servers to some known time source.
As another test stop the ntp service on a client and run the ntpdate command using ntp2. If the command completes without finding a suitable server then ntp2 is not working. |
Quote:
the network is S/A indeed. not internet connectivity. today I made the change you recommanded about restrict line in both ntp servers : Code:
restrict 172.17.201.0 mask 255.255.255.192 nomodify notrap Code:
[root@host1 ~]# ntpq -p Code:
[root@host1 ~]# ntpdate -b ntp2 Code:
[root@host1 ~]# ntpq -p |
I might of confused you a bit. The servers should have these setting too. Changing stratum 10 to 2 is necessary so the clients will sync to the servers.
server 127.127.0.1 fudge 127.127.0.1 stratum 2 Adding the following line to each server will sync them together. peer ntp2 (to sync ntp1 to ntp2, use ntp1 on ntp2) Did you change the clients as suggests in post #6? |
Quote:
and the servers with stratum 2. but still after a while im getting same result : Code:
[root@host1 ~]# ntpq -p |
Post your ntp.conf files for the servers and clients. Maybe I have missed something.
Quote:
Quote:
|
Quote:
btw, my ntp servers and my clients are in different subnets. 172.17.200.x for the clients and my servers are in 172.17.201.x anyway, my client's ntp.conf : Code:
Permit time synchronization with our time source, but do not Code:
# Permit time synchronization with our time source, but do not |
Quote:
Quote:
And since you are on a standalone network try Quote:
|
Quote:
Code:
[root@host1 ~]# ntpq -p |
It appears that the client is communicating with ntp1. The poll time is 1024 seconds so it will take awhile to get anywhere.
I believe that the ntp1 time difference is greater then ntp2. Do you really need two time servers. If so you might want to try setting them up as peers or syncing ntp2 to ntp1. |
All times are GMT -5. The time now is 09:49 AM. |