FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 04-13-2011, 08:22 PM
Mailing List
 
Default CentOs 5.6 and Time Sync

On 4/13/2011 3:35 PM, Cal Webster wrote:


I'm running the same kernel and ntp versions and I'm having no problems
at all on ntp servers or clients.

If my previous suggestions didn't help maybe you could share contents of
the following files and output of some commands so the list can see what
you've got.

/etc/ntp.conf
/etc/ntp/ntpservers
/etc/ntp/step-tickers
/var/lib/ntp/drift


grep ntpd /var/log/messages*
(please remove repeated messages for clarity)

Most recent entries in /var/log/ntpd.log

SELinux could also be playing a role.

Are you running SELinux enabled, permissive, or disabled?
What mode was it running before it stopped working?
Are there any possibly related "avc" messages in /var/log/messages
or /var/audit/audit.log?

./Cal


/etc/ntp;

restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict -6 ::1
server 0.centos.pool.ntp.org
server 1.centos.pool.ntp.org
server 2.centos.pool.ntp.org
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
driftfile /var/lib/ntp/drift
keys /etc/ntp/keys

There is no /etc/ntp/ntpservers

/etc/ntp/step-tickers is an empty file.

/var/lib/ntp/drift;
-65.219

I have no /var/log/ntpd.log

/varlog/messages; This is the log using stock updated kernel.

Apr 12 03:32:35 Server ntpd[2797]: synchronized to LOCAL(0), stratum 10
Apr 12 03:33:36 Server ntpd[2797]: synchronized to 173.9.142.98, stratum 2
Apr 12 15:51:56 Server ntpd[2797]: time reset +43208.248852 s
Apr 12 15:51:56 Server ntpd[2797]: kernel time sync enabled 0001
Apr 12 15:56:03 Server ntpd[2797]: synchronized to LOCAL(0), stratum 10
Apr 12 15:56:26 Server ntpd[2797]: synchronized to 169.229.70.183, stratum 3
Apr 12 16:00:22 Server ntpd[2797]: synchronized to 173.9.142.98, stratum 2
Apr 12 16:16:59 Server ntpd[2797]: synchronized to 169.229.70.183, stratum 2
Apr 12 16:16:57 Server ntpd[2797]: time reset -1.830305 s
Apr 12 16:20:27 Server ntpd[2797]: synchronized to LOCAL(0), stratum 10
Apr 12 16:22:35 Server ntpd[2797]: synchronized to 169.229.70.183, stratum 2
Apr 12 16:28:01 Server ntpd[2797]: synchronized to 173.9.142.98, stratum 2
Apr 12 16:32:29 Server ntpd[2797]: synchronized to 169.229.70.183, stratum 3
Apr 12 16:36:36 Server ntpd[2797]: synchronized to 173.9.142.98, stratum 2
Apr 12 16:40:05 Server ntpd[2797]: synchronized to 169.229.70.183, stratum 3
Apr 12 16:41:57 Server ntpd[2797]: synchronized to LOCAL(0), stratum 10
Apr 12 16:42:09 Server ntpd[2797]: synchronized to 173.9.142.98, stratum 2
Apr 12 16:47:28 Server ntpd[2797]: synchronized to LOCAL(0), stratum 10
Apr 12 16:48:28 Server ntpd[2797]: synchronized to 169.229.70.183, stratum 3
Apr 12 16:51:44 Server ntpd[2797]: synchronized to 173.9.142.98, stratum 2
Apr 12 16:53:52 Server ntpd[2797]: synchronized to 173.193.227.67, stratum 4
Apr 12 16:58:06 Server ntpd[2797]: synchronized to 169.229.70.183, stratum 3
Apr 12 17:00:18 Server ntpd[2797]: synchronized to LOCAL(0), stratum 10
Apr 12 17:04:31 Server ntpd[2797]: synchronized to 169.229.70.183, stratum 3
Apr 12 17:06:44 Server ntpd[2797]: synchronized to LOCAL(0), stratum 10
Apr 12 19:54:46 Server ntpd[2797]: ntpd exiting on signal 15
Apr 13 03:01:24 Server ntpd[2409]: ntpd 4.2.2p1@1.1570-o Sat Dec 19
00:56:13 UTC 2009 (1)

Apr 13 03:01:24 Server ntpd[2410]: precision = 1.000 usec
Apr 13 03:01:24 Server ntpd[2410]: Listening on interface wildcard,
0.0.0.0#123 Disabled
Apr 13 03:01:24 Server ntpd[2410]: Listening on interface wildcard,
::#123 Disabled
Apr 13 03:01:24 Server ntpd[2410]: Listening on interface lo, ::1#123
Enabled
Apr 13 03:01:24 Server ntpd[2410]: Listening on interface eth0,
fe80::218:8bff:fe80:67db#123 Enabled
Apr 13 03:01:24 Server ntpd[2410]: Listening on interface lo,
127.0.0.1#123 Enabled
Apr 13 03:01:24 Server ntpd[2410]: Listening on interface eth0,
192.168.2.1#123 Enabled

Apr 13 03:01:24 Server ntpd[2410]: kernel time sync status 0040
Apr 13 03:01:30 Server ntpd[2410]: frequency initialized 0.000 PPM from
/var/lib/ntp/drift

Apr 13 07:04:44 Server ntpd[2410]: synchronized to LOCAL(0), stratum 10
Apr 13 07:04:44 Server ntpd[2410]: kernel time sync enabled 0001
Apr 13 07:11:09 Server ntpd[2410]: synchronized to 208.75.88.4, stratum 2
Apr 13 07:17:34 Server ntpd[2410]: synchronized to 64.6.144.6, stratum 2
Apr 13 07:42:59 Server ntpd[2410]: time reset -27.586767 s
Apr 13 07:46:35 Server ntpd[2410]: synchronized to LOCAL(0), stratum 10
Apr 13 07:47:38 Server ntpd[2410]: synchronized to 199.249.224.123,
stratum 2

Apr 13 07:51:53 Server ntpd[2410]: synchronized to 64.6.144.6, stratum 2
Apr 13 09:27:19 Server ntpd[2410]: ntpd exiting on signal 15
Apr 13 09:27:19 Server ntpd[6743]: ntpd 4.2.2p1@1.1570-o Sat Dec 19
00:56:13 UTC 2009 (1)


Selinux is disabled, and just a note also. This is a stock install of
of ntp. I never had to do any fudging with it cause it just worked up
until the update.


I also have no /var/log/audit/audit.log.

tia.

Brian

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-13-2011, 09:07 PM
"Denniston, Todd A CIV NAVSURFWARCENDIV Crane"
 
Default CentOs 5.6 and Time Sync

> -----Original Message-----
> From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On
> Behalf Of Mailing List
> Sent: Wednesday, April 13, 2011 16:23
> To: CentOS mailing list
> Subject: Re: [CentOS] CentOs 5.6 and Time Sync
>
> /etc/ntp;
>
> restrict default kod nomodify notrap nopeer noquery
> restrict -6 default kod nomodify notrap nopeer noquery
> restrict 127.0.0.1
> restrict -6 ::1
> server 0.centos.pool.ntp.org
> server 1.centos.pool.ntp.org
> server 2.centos.pool.ntp.org
> server 127.127.1.0 # local clock
> fudge 127.127.1.0 stratum 10
> driftfile /var/lib/ntp/drift
> keys /etc/ntp/keys
>
> There is no /etc/ntp/ntpservers
>
> /etc/ntp/step-tickers is an empty file.
>
> /var/lib/ntp/drift;
> -65.219
>
> I have no /var/log/ntpd.log
>
> /varlog/messages; This is the log using stock updated kernel.
>
> Apr 12 03:32:35 Server ntpd[2797]: synchronized to LOCAL(0), stratum
10
> Apr 12 03:33:36 Server ntpd[2797]: synchronized to 173.9.142.98,
> stratum 2
> Apr 12 15:51:56 Server ntpd[2797]: time reset +43208.248852 s

Wow! That is a big jump.

> Apr 12 15:51:56 Server ntpd[2797]: kernel time sync enabled 0001
> Apr 12 15:56:03 Server ntpd[2797]: synchronized to LOCAL(0), stratum
10
> Apr 12 15:56:26 Server ntpd[2797]: synchronized to 169.229.70.183,
> stratum 3
> Apr 12 16:00:22 Server ntpd[2797]: synchronized to 173.9.142.98,
> stratum 2
> Apr 12 16:16:59 Server ntpd[2797]: synchronized to 169.229.70.183,
> stratum 2
> Apr 12 16:16:57 Server ntpd[2797]: time reset -1.830305 s
> Apr 12 16:20:27 Server ntpd[2797]: synchronized to LOCAL(0), stratum
10

<SNIP log of ntpd jumping from server to server (fairly often) including
LOCAL host>

It seems that the connections to the external ntp servers are not good
enough to keep you off LOCAL, and once on local you will drift at the
rate the system last had, and that drift rate can be quite large when
the system is first trying to come into sync. (and often quite a bit
larger than the steady state drift rate once synced)

>
> Selinux is disabled, and just a note also. This is a stock install
> of
> of ntp. I never had to do any fudging with it cause it just worked up
> until the update.
>
> I also have no /var/log/audit/audit.log.
>
> tia.
>
> Brian

We still don't know why the machine is losing time, but it might help to
have some more data to compare with
IIRC you indicated you had two other servers in your environment that
were still keeping time good...
I would suggest adding something like:
echo "server myotherserver" >> /etc/ntp.conf
echo "restrict myotherserver mask 255.255.255.255 notrap" >>
/etc/ntp.conf

you may also have to add restrict a line on "myotherserver" such that
your "timeloosingserver" can get info, i.e. on myotherserver
echo "restrict timeloosingserver mask 255.255.255.255 nomodify notrap"
>> /etc/ntp.conf

[please evaluate the above restrict lines to verify they are good enough
security for your environment, I am doing them from memory]

so that you have a local host which is not bouncing all over the place,
with respect to connectivity, to check against.


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-13-2011, 09:24 PM
Cal Webster
 
Default CentOs 5.6 and Time Sync

On Wed, 2011-04-13 at 16:22 -0400, Mailing List wrote:
> On 4/13/2011 3:35 PM, Cal Webster wrote:
> >
> > I'm running the same kernel and ntp versions and I'm having no problems
> > at all on ntp servers or clients.
> >
> > If my previous suggestions didn't help maybe you could share contents of
> > the following files and output of some commands so the list can see what
> > you've got.
> >
> > /etc/ntp.conf
> > /etc/ntp/ntpservers
> > /etc/ntp/step-tickers
> > /var/lib/ntp/drift
> >
> >
> > grep ntpd /var/log/messages*
> > (please remove repeated messages for clarity)
> >
> > Most recent entries in /var/log/ntpd.log
> >
> > SELinux could also be playing a role.
> >
> > Are you running SELinux enabled, permissive, or disabled?
> > What mode was it running before it stopped working?
> > Are there any possibly related "avc" messages in /var/log/messages
> > or /var/audit/audit.log?
> >
> > ./Cal
> >
> /etc/ntp;
>
> restrict default kod nomodify notrap nopeer noquery
> restrict -6 default kod nomodify notrap nopeer noquery
> restrict 127.0.0.1
> restrict -6 ::1
> server 0.centos.pool.ntp.org
> server 1.centos.pool.ntp.org
> server 2.centos.pool.ntp.org
> server 127.127.1.0 # local clock
> fudge 127.127.1.0 stratum 10
> driftfile /var/lib/ntp/drift
> keys /etc/ntp/keys
>
> There is no /etc/ntp/ntpservers
>
> /etc/ntp/step-tickers is an empty file.
>
> /var/lib/ntp/drift;
> -65.219
>
> I have no /var/log/ntpd.log
>
> /varlog/messages; This is the log using stock updated kernel.
>
> Apr 12 03:32:35 Server ntpd[2797]: synchronized to LOCAL(0), stratum 10
> Apr 12 03:33:36 Server ntpd[2797]: synchronized to 173.9.142.98, stratum 2
> Apr 12 15:51:56 Server ntpd[2797]: time reset +43208.248852 s
> Apr 12 15:51:56 Server ntpd[2797]: kernel time sync enabled 0001
> Apr 12 15:56:03 Server ntpd[2797]: synchronized to LOCAL(0), stratum 10
> Apr 12 15:56:26 Server ntpd[2797]: synchronized to 169.229.70.183, stratum 3
> Apr 12 16:00:22 Server ntpd[2797]: synchronized to 173.9.142.98, stratum 2
> Apr 12 16:16:59 Server ntpd[2797]: synchronized to 169.229.70.183, stratum 2
> Apr 12 16:16:57 Server ntpd[2797]: time reset -1.830305 s
> Apr 12 16:20:27 Server ntpd[2797]: synchronized to LOCAL(0), stratum 10
> Apr 12 16:22:35 Server ntpd[2797]: synchronized to 169.229.70.183, stratum 2
> Apr 12 16:28:01 Server ntpd[2797]: synchronized to 173.9.142.98, stratum 2
> Apr 12 16:32:29 Server ntpd[2797]: synchronized to 169.229.70.183, stratum 3
> Apr 12 16:36:36 Server ntpd[2797]: synchronized to 173.9.142.98, stratum 2
> Apr 12 16:40:05 Server ntpd[2797]: synchronized to 169.229.70.183, stratum 3
> Apr 12 16:41:57 Server ntpd[2797]: synchronized to LOCAL(0), stratum 10
> Apr 12 16:42:09 Server ntpd[2797]: synchronized to 173.9.142.98, stratum 2
> Apr 12 16:47:28 Server ntpd[2797]: synchronized to LOCAL(0), stratum 10
> Apr 12 16:48:28 Server ntpd[2797]: synchronized to 169.229.70.183, stratum 3
> Apr 12 16:51:44 Server ntpd[2797]: synchronized to 173.9.142.98, stratum 2
> Apr 12 16:53:52 Server ntpd[2797]: synchronized to 173.193.227.67, stratum 4
> Apr 12 16:58:06 Server ntpd[2797]: synchronized to 169.229.70.183, stratum 3
> Apr 12 17:00:18 Server ntpd[2797]: synchronized to LOCAL(0), stratum 10
> Apr 12 17:04:31 Server ntpd[2797]: synchronized to 169.229.70.183, stratum 3
> Apr 12 17:06:44 Server ntpd[2797]: synchronized to LOCAL(0), stratum 10
> Apr 12 19:54:46 Server ntpd[2797]: ntpd exiting on signal 15
> Apr 13 03:01:24 Server ntpd[2409]: ntpd 4.2.2p1@1.1570-o Sat Dec 19
> 00:56:13 UTC 2009 (1)
> Apr 13 03:01:24 Server ntpd[2410]: precision = 1.000 usec
> Apr 13 03:01:24 Server ntpd[2410]: Listening on interface wildcard,
> 0.0.0.0#123 Disabled
> Apr 13 03:01:24 Server ntpd[2410]: Listening on interface wildcard,
> ::#123 Disabled
> Apr 13 03:01:24 Server ntpd[2410]: Listening on interface lo, ::1#123
> Enabled
> Apr 13 03:01:24 Server ntpd[2410]: Listening on interface eth0,
> fe80::218:8bff:fe80:67db#123 Enabled
> Apr 13 03:01:24 Server ntpd[2410]: Listening on interface lo,
> 127.0.0.1#123 Enabled
> Apr 13 03:01:24 Server ntpd[2410]: Listening on interface eth0,
> 192.168.2.1#123 Enabled
> Apr 13 03:01:24 Server ntpd[2410]: kernel time sync status 0040
> Apr 13 03:01:30 Server ntpd[2410]: frequency initialized 0.000 PPM from
> /var/lib/ntp/drift
> Apr 13 07:04:44 Server ntpd[2410]: synchronized to LOCAL(0), stratum 10
> Apr 13 07:04:44 Server ntpd[2410]: kernel time sync enabled 0001
> Apr 13 07:11:09 Server ntpd[2410]: synchronized to 208.75.88.4, stratum 2
> Apr 13 07:17:34 Server ntpd[2410]: synchronized to 64.6.144.6, stratum 2
> Apr 13 07:42:59 Server ntpd[2410]: time reset -27.586767 s
> Apr 13 07:46:35 Server ntpd[2410]: synchronized to LOCAL(0), stratum 10
> Apr 13 07:47:38 Server ntpd[2410]: synchronized to 199.249.224.123,
> stratum 2
> Apr 13 07:51:53 Server ntpd[2410]: synchronized to 64.6.144.6, stratum 2
> Apr 13 09:27:19 Server ntpd[2410]: ntpd exiting on signal 15
> Apr 13 09:27:19 Server ntpd[6743]: ntpd 4.2.2p1@1.1570-o Sat Dec 19
> 00:56:13 UTC 2009 (1)
>
> Selinux is disabled, and just a note also. This is a stock install of
> of ntp. I never had to do any fudging with it cause it just worked up
> until the update.
>
> I also have no /var/log/audit/audit.log.

I don't have any CentOS machines with direct Internet connections but I
compared your config and logs to my internal machines and an external
FC12 box.

Your time resets are wildly fulctuating between +720 min (12 hours) and
-2 seconds over the course of only one hour, according to the log. I
have no way of knowing how much actual time had elapsed but the ntp
daemon decided the step threshold had been exceeded and reset the time
according to its time source.

If you are indeed getting good time from the ntp pool, then either your
local system clock is malfunctioning or the kernel driver is getting bad
clock readings. Even network outages would not produce such a large
range of resets in such a short period.

I'd be interested to see the output of:

ntpq -c pe -c as

You might try commenting out the local clock entries in /etc/ntp.conf
and see if that changes your symptoms.

#server 127.127.1.0 # local clock
#fudge 127.127.1.0 stratum 10

./Cal

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-13-2011, 09:42 PM
Mailing List
 
Default CentOs 5.6 and Time Sync

On 4/13/2011 5:24 PM, Cal Webster wrote:

ntpq -c pe -c as

root > ~# ntpq -c pe -c as
remote refid st t when poll reach delay offset
jitter

================================================== ============================
bindcat.fhsu.ed 132.163.4.101 2 u 1015 1024 377 49.987 -15082.
6919.88
216.45.57.38 108.71.253.18 2 u 998 1024 377 83.112 -15139.
6900.14
javanese.kjsl.c 69.36.224.15 2 u 1 1024 377 109.083 -29233.
7285.83
*LOCAL(0) .LOCL. 10 l 13 64 377 0.000 0.000
0.001


ind assID status conf reach auth condition last_event cnt
================================================== =========
1 26525 9044 yes yes none reject reachable 4
2 26526 9044 yes yes none reject reachable 4
3 26527 9044 yes yes none reject reachable 4
4 26528 9644 yes yes none sys.peer reachable 4
root > ~#

Right now everything is running as it should. I did indeed switch to
the CentOSplus kernel. And it is working as it should. I would need to
go back to the stiock updated kernel from the 5.5 - 5.6 upgrade..


Brian.


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-13-2011, 10:01 PM
Cal Webster
 
Default CentOs 5.6 and Time Sync

On Wed, 2011-04-13 at 17:42 -0400, Mailing List wrote:
> On 4/13/2011 5:24 PM, Cal Webster wrote:
> > ntpq -c pe -c as
> root > ~# ntpq -c pe -c as
> remote refid st t when poll reach delay offset
> jitter
> ================================================== ============================
> bindcat.fhsu.ed 132.163.4.101 2 u 1015 1024 377 49.987 -15082.
> 6919.88
> 216.45.57.38 108.71.253.18 2 u 998 1024 377 83.112 -15139.
> 6900.14
> javanese.kjsl.c 69.36.224.15 2 u 1 1024 377 109.083 -29233.
> 7285.83
> *LOCAL(0) .LOCL. 10 l 13 64 377 0.000 0.000
> 0.001
>
> ind assID status conf reach auth condition last_event cnt
> ================================================== =========
> 1 26525 9044 yes yes none reject reachable 4
> 2 26526 9044 yes yes none reject reachable 4
> 3 26527 9044 yes yes none reject reachable 4
> 4 26528 9644 yes yes none sys.peer reachable 4
> root > ~#
>
> Right now everything is running as it should. I did indeed switch to
> the CentOSplus kernel. And it is working as it should. I would need to
> go back to the stiock updated kernel from the 5.5 - 5.6 upgrade..
>
> Brian.

Your ntpq output tells me that all the ntp.org servers have been
rejected in favor of your (undisciplined) local clock. You should
disable it as a time source in ntp.conf as suggested previously. You
gain nothing by keeping it configured under your circumstances.

./Cal

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-13-2011, 10:27 PM
Mailing List
 
Default CentOs 5.6 and Time Sync

On 4/13/2011 6:01 PM, Cal Webster wrote:


Your ntpq output tells me that all the ntp.org servers have been
rejected in favor of your (undisciplined) local clock. You should
disable it as a time source in ntp.conf as suggested previously. You
gain nothing by keeping it configured under your circumstances.

./Cal

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos



I have removed the call to the local source as you suggested. I
have noticed now that the clock is moving ahead now that I am on the
CentOSPlus kernel. I'm going to leave it go over night and see how far
it will go ahead.. Thank you all for your help.


Brian.

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-13-2011, 10:39 PM
Peter Brady
 
Default CentOs 5.6 and Time Sync

On 14/04/11 7:42 AM, Mailing List wrote:
> remote refid st t when poll reach delay offset
> jitter
> ================================================== ============================
>
> bindcat.fhsu.ed 132.163.4.101 2 u 1015 1024 377 49.987 -15082.
> 6919.88
> 216.45.57.38 108.71.253.18 2 u 998 1024 377 83.112 -15139.
> 6900.14
> javanese.kjsl.c 69.36.224.15 2 u 1 1024 377 109.083 -29233.
> 7285.83
> *LOCAL(0) .LOCL. 10 l 13 64 377 0.000 0.000
> 0.001

<snip>

Glad you've got a fix but you should keep an eye on it.

If you look at the output for ntpq you have three stratum 2 servers
which differ by ~15s from both you and each other. Stratum 2 servers
should be a lot closer than 15s given that they are only one link
removed from some form of atomic clock.

Cheers
-pete
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 08:24 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org