1748138 Members
3643 Online
108758 Solutions
New Discussion юеВ

Re: Ntp problem

 
Fadia Almarei
Super Advisor

Ntp problem

Dear All

I have number of redhat Linux AS v.4 servers, i have one server configered as an ntp server and the other take time from i, every thing wa fine until we change the time to winter time and the sychronization start not to work fine, i will attache the ntp.conf file for ntp server and one of the clients, the message which i get when i start the ntpd service in the server is

[root@RADIUS ~]# service ntpd start
ntpd: Synchronizing with time server: [FAILED]
Starting ntpd: [ OK ]



so what is the cause of the problem and how to solve it.

BR;
Fadia
fadia.marei
8 REPLIES 8
Ivan Ferreira
Honored Contributor

Re: Ntp problem

I don't know if the file posted is from client or server. What I can see is that you have a very strict "restrict" rules. If this the server file, then clients are not allowed to sync with this server.

The [FAILED] part tries to do:

ntpdate -b

So you can manually try that command. If it fails, then you should adjust your restrict rules.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Rob Leadbeater
Honored Contributor

Re: Ntp problem

Hi,

Another thing to mention is that NTP should have no effect on daylight saving times.

Can you confirm whether the change to winter time was done manually or automatically via the machines timezone...

What might be happening is that the clients failed to sync, because the time differential is now too great...

Cheers,

Rob
Steven E. Protter
Exalted Contributor

Re: Ntp problem

Shalom,

I common problem with RH Linux is the default firewall configuration doesn't permit ntp.

service iptables stop

test again.

Also ntp won't work if the system time is off more than a few hours. Adjust system time and try again.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
James R. Ferguson
Acclaimed Contributor

Re: Ntp problem

Hi Fadia:

> every thing wa fine until we change the time to winter time and the sychronization start not to work fine,

If you are *manually* changing the server's time instead of letting the daylight saving rules handle the shift, then that is the reason for the NTP failure.

NTP assumes UTC (GMT) time. It is your *local* timezone that defines the positive or negative time offset form UTC that you then perceive as the correct local time.

NTP will abandon synchronization, or simply fail to establish it in the first place, if the difference time (in UTC) is larger than a about 1000 seconds.

If you are manually adjusting your time, configure the proper timezone for your server; adjust your clock to the correct UTC time; restart NTP and enjoy doing nothing as the daylight savings times shift in and out.

Regards!

...JRF...
Fadia Almarei
Super Advisor

Re: Ntp problem

thanks to all for the answer

the i change the time manually as our time zone do is not restricted to be change autumaticly (Asia/Gaza) , so i change the time manually at which the synchronization start not to work , but i want my system to be synchronized with itself not with the time server , the big problem that the client servers can not make synchronization with this local time server which gives me the difference in time.

BR;
Fadia
fadia.marei
Alex Jenner
Advisor

Re: Ntp problem

I think the best solution is to always use NTP in the proper way and don't change the time of the system clock.

So first step, if timezone rules in RedHat are wrong for Asia/Gaza then I suggest you look for a more recent tzdata RPM that has the correct rules and install in all servers.

I heard something about Egypt changing it's daylight saving rules due to change in the start of Ramadan. Is Gaza also changing it's rules too?

For example, if you have RH EL 4 then do a search for: tzdata-2007f-1.el4.noarch.rpm

When you install the rpm, you can use zdump to check the rules:

e.g.
# zdump -v /usr/share/zoneinfo/Asia/Gaza | grep 2007
# zdump -v /etc/localtime | grep 2007

If the first zdump check is correct but the second isn't, you might need to manually copy /usr/share/zoneinfo/Asia/Gaza to /etc/localtime

If those still rules in 2007f still aren't correct then the second step I would suggest, is getting tzdata2007g source... or maybe 2007h is the latest now... you can get that from:

ftp://elsie.nci.nih.gov/pub/

Then use 'zic' to make the new zone files.

If you need help to use zic... please ask.

Step 3, if rules in tzdata2007h source still aren't right... you can edit the rules in the 'asia' file in the source.

Then use 'zic' to build the zone files.

Step 4, if none of this works, you can keep UTC the correct time and choose a different zone and run your servers in that zone - e.g Africa/Cairo or whatever place is running the same localtime as Asia/Gaza

Step 5, if you really insist that you don't want to do any of the above... and want to change the system clock so that URC is no longer correct, then the server that you decide to be the master, might need the following lines in /etc/ntp.conf

server 127.127.1.0
fudge 127.127.1.0 stratum 3

But I'd recommend you take a look at the other options with tzdata first.

I hope some of that helps.


skt_skt
Honored Contributor

Re: Ntp problem

..
skt_skt
Honored Contributor

Re: Ntp problem

i did install tzdata-2007h-1.el2_1 on my RHEL 2.1 server and all the errdata(20 other packages) reported are also updated.

I preparing for the Brzil(BRT) DST change expected on Oct 14.