cancel
Showing results for 
Search instead for 
Did you mean: 

NTP Client is not synch

 
Marco_ALT
Esteemed Contributor

NTP Client is not synch

Hello

I've installed the NTP client on Linux machine and i have an NTP server on linux as well.

i configured /etc/ntp.conf to include the NTP server parameters but the NTP client is not synch with the server time.

i ran the following command
$ntpq -p
: timed out, nothing received
***Request timed out

i also ran this command
$ntpq -p

remote refid st t when poll reach delay offset jitter
==============================================================================
LOCAL(0) LOCAL(0) 10 l 26 64 377 0.000 0.000 0.001
* .GPS. 1 u 657 1024 377 2.685 -1.569 0.398


can anyone help with this?


thanks
9 REPLIES
Jeeshan
Honored Contributor

Re: NTP Client is not synch

post this output

#cat /etc/ntp/step-tickers
a warrior never quits
Marco_ALT
Esteemed Contributor

Re: NTP Client is not synch

$cat step-tickers

127.127.1.0
Matti_Kurkela
Honored Contributor

Re: NTP Client is not synch

The "ntpq -p" output would indicate your server has its UTC time pretty well in sync with the UTC time of the NTP server: the offset value is very small.

Run "date -u" on both machines to compare the UTC times. If they agree, check the timezone settings. When NTP is properly in sync, bad local time is usually caused by bad timezone settings.

You can use "zdump -v /etc/localtime |more" to verify the timezone data.

Your NTP server is probably set to reject any configuration requests, including requests to view the configuration information. Check the "restrict" lines in the ntp.conf of the NTP server machine. Make sure you understand the current configuration, and change it if necessary.

http://support.ntp.org/bin/view/Support/AccessRestrictions

If your problem is not with the timezone, more information would be nice.
Please run "date; date -u" on both the client and the NTP server.

MK
MK
Marco_ALT
Esteemed Contributor

Re: NTP Client is not synch

Hello

i could not understand the output of "zdump -v /etc/localtime |more" can u please help with it

i ran the command from /usr/sbin on the NTP client.

$zdump -v /etc/localtime |more
/etc/localtime -9223372036854775808 = NULL
/etc/localtime -9223372036854689408 = NULL
/etc/localtime Wed Dec 31 20:33:51 1919 UTC = Wed Dec 31 23:59:59 1919 AST isdst=0 gmtoff=12368
/etc/localtime Wed Dec 31 20:33:52 1919 UTC = Thu Jan 1 00:33:52 1920 AST isdst=0 gmtoff=14400
/etc/localtime Wed May 31 19:59:59 1972 UTC = Wed May 31 23:59:59 1972 AST isdst=0 gmtoff=14400
/etc/localtime Wed May 31 20:00:00 1972 UTC = Wed May 31 23:00:00 1972 AST isdst=0 gmtoff=10800
/etc/localtime 9223372036854689407 = NULL
/etc/localtime 9223372036854775807 = NULL


thanks

Jeeshan
Honored Contributor

Re: NTP Client is not synch

In NTP server you don't need to use step-tickers file. But in ntp client machine you have to mention the NTP server IP address not the source.

zdump output shows the time zone changes value for your zone.
a warrior never quits
Matti_Kurkela
Honored Contributor

Re: NTP Client is not synch

Apparently your country/timezone does not use Daylight Saving Time, so the last line with time values has the current rule.

/etc/localtime Wed May 31 20:00:00 1972 UTC = Wed May 31 23:00:00 1972 AST isdst=0 gmtoff=10800

Since the last day of May 1972, your country/timezone has been exactly 3 hours ahead of the UTC time (= east of UK). "gmtoff" is the UTC offset in seconds: 3 h * 60 min/h * 60 sec/min = 10800 sec.

Wait a minute... your profile says you're in the USA, so this indicates your timezone is probably set incorrectly. Unless you're maintaining a Turkish server?

Find a correct timezone file in /usr/share/zoneinfo directory and copy it over /etc/localtime. (I guess the /usr/share/zoneinfo/America sub-directory is the one most useful to you.)

NOTE: last week a co-worker had some problems with the timezone settings of a RHEL4 server. Apparently the graphical timezone selection tool may have a bug: it looked like the tool had updated the timezone name in /etc/sysconfig/clock, but not the actual timezone data in /etc/localtime.

If you wish to use the graphical tool and it does not seem to update /etc/localtime, try deleting the /etc/localtime file first: maybe the bug is that the tool does not want to _overwrite_ an existing localtime file.

If you confirm this bug in your system, please tell me the name and version of your Linux distribution: it would useful to know the range of versions in which the GUI tool can malfunction.

MK
MK
Marco_ALT
Esteemed Contributor

Re: NTP Client is not synch

hello

we're using a GPS based NTP server from SPECTRACOM.

the time zone is in turkey :)


how i can check if the NTP is correctly configured?

thanks
Uday Joshi_1
Occasional Visitor

Re: NTP Client is not synch

Try to sync by SAm.

Definately it will take some time but this will work.
Matti_Kurkela
Honored Contributor

Re: NTP Client is not synch

(Uday: this is Linux, not HP-UX. Linux does not have sam.)

Read the NTP configuration file /etc/ntp.conf on the NTP server.

Pay extra attention to any "restrict" configuration lines and if necessary, allow your client machine to access more NTP features on the server.

The logic of the "restrict" keyword is a bit tricky. Read the NTP documentation to understand what the various restrictions actually mean.

http://support.ntp.org/bin/view/Support/AccessRestrictions

The fact that your "ntpq -p " did not produce any results suggests that your NTP server has a line like:
restrict noquery

that matches your NTP client.

MK
MK