0

I have set up ntpd on CENTOS, I am trying to get it to pull time from a Windows domain contoller

if i run the command:

ntpdate dc3.mydomaain.local 

this works fine and updates the host with the correct time

but in the /etc/ntp.conf I have set:

server dc3.mydomain.local 

but the time never updates, it always stays on the incorrect time (it seems to be pulling time from the ESXi host on reboot unless i set it with ntpdate) I have unticked the box to get the time from the host.

NTPD is running

-bash-3.2# service ntpd status
 ntpd (pid  4182) is running...

any way i can check why ntpd is not pulling the time, when ntpdate works fine?

any other tips on ow to get my centos box pulling time from my DC?

update: here is the output of:

ntpq -pcrv

please note that the ip address show is the ip of DC1, yet DC3 is the only ntp server listed in the ntp.conf

ntpq -pcrv


-bash-3.2# ntpq -pcrv
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 dc3.domai 10.1.1.2        2 u   29   64  377    0.567  -4263.4  10.392
assID=0 status=c011 sync_alarm, sync_unspec, 1 event, event_restart,
version="ntpd [email protected] Mon Dec  9 14:38:21 UTC 2013 (1)",
processor="i686", system="Linux/3.10.23-xxxx-std-ipv6-32", leap=11,
stratum=16, precision=-20, rootdelay=0.000, rootdispersion=2356.905,
peer=0, refid=INIT,
reftime=00000000.00000000  Thu, Feb  7 2036 17:28:16.000, poll=6,
clock=d81ce655.d5ce975b  Mon, Nov 24 2014 10:03:49.835, state=1,
offset=0.000, frequency=-0.140, jitter=0.001, noise=0.001,
stability=0.000, tai=0

-bash-3.2# date

2
  • You can use ntpq and ntpstat to check the status of ntpd. Nov 22, 2014 at 11:57
  • Post the output of ntpq -pcrv when the box is up and ntpd is running and not working correctly.
    – dfc
    Nov 22, 2014 at 20:43

1 Answer 1

1

Can you please post your ntp.conf file.

A few things stand out with the info you provided already...

DC3 will show the ip 10.1.1.2 as that what DC3 is configured (or getting) the time from.

The Offset is too big - -4263.4, you also show sync_alarm and a massive rootdispersion=2356.905 and refid=INIT

Something looks to be broken in your time setup. I would check the 2 other boxes DC1 & 3 to ensure they are getting the correct time. I would also add at least 3 ntp servers to your config file to ensure stability and reliability. NTP needs more than one server to compare against, vote and pick the 'best' time source from. If this is a virtual server then there are other things you need to do to keep ntp in check on linux.

As an example here is my output from ntpq -pcrv (Server data made anonymous)

 remote           refid          st t when poll reach   delay   offset  jitter
==============================================================================
 PRIVATE         .STEP.          16 u    - 1024    0    0.000    0.000   0.000
-PRIVATE1        .GPS.            1 u   55   64  377   29.585    0.071   0.312
-PRIVATE2        .GPS.            1 u   40   64  377    9.468    0.209   0.129
-PRIVATE3        1.1.1.1          2 u   12   64  377    6.943   -0.270   0.142
-PRIVATE5        .PPS.            1 u   20   64  377   16.383   -0.531   0.197
+PRIVATE6        .DCFa.           1 u   22   64  377    8.661   -0.036   0.126
-ISP1            2.2.2.2          2 u   36   64  377   11.720   -0.027   0.280
#PRIVATE7        .GPS.            1 u   47   64  377   24.781   -1.405   1.118
+ISP2            .PPS.            1 u    4   64  377    6.012    0.062   0.154
-ISP3            .PPS.            1 u   14   64  377   13.993   -0.463   0.206
-ISP4            .CDMA.           1 u   57   64  377   71.712   -0.109   0.249
 ntp.mcast.net   .MCST.          16 u    -   64    0    0.000    0.000   0.002
 LOCAL(0)        .LOCL.          10 l  69d   64    0    0.000    0.000   0.000
xSHM(0)          .GPS.            0 l    9   16  377    0.000  -25.278   7.907
*SHM(1)          .PPS.            0 l   11   16  377    0.000   -0.030   0.060
associd=0 status=0488 leap_none, sync_uhf_radio, 8 events, no_sys_peer,
version="ntpd [email protected] Sat Nov 23 18:21:48 UTC 2013 (1)",
processor="x86_64", system="Linux/3.13.3-1.el6.elrepo.x86_64", leap=00,
stratum=1, precision=-19, rootdelay=0.000, rootdisp=0.435, refid=PPS,
reftime=d81f71b3.9b5a018c  Tue, Nov 25 2014 21:22:59.606,
clock=d81f71be.1f3892d4  Tue, Nov 25 2014 21:23:10.121, peer=28309, tc=4,
mintc=3, offset=-0.021, frequency=-69.212, sys_jitter=0.031,
clk_jitter=0.145, clk_wander=0.031

Have a look at the documentation on the ntp webpage

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .