LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-20-2014, 11:43 AM   #1
Laedrus
LQ Newbie
 
Registered: May 2007
Location: Brazil
Distribution: Debian and RHEL
Posts: 7

Rep: Reputation: 0
NTP - ntpdate works but does not update system clock


Hi,

That's pretty odd, first time I see it. I've seen ntpd not doing its job but never ntpdate not helping, this is how it looks like :


Quote:
20 Feb 10:16:24 ntpdate[23877]: step time server 1.2.3.4 offset -2770.341672 sec
[root@bugzilla ~]# ntpdate 1.2.3.4
20 Feb 10:16:24 ntpdate[23878]: step time server 1.2.3.4 offset -2770.341754 sec
[root@bugzilla ~]# ntpdate 0.centos.pool.ntp.org
20 Feb 10:16:40 ntpdate[23881]: step time server 142.54.181.202 offset -2770.345091 sec
[root@bugzilla ~]# ntpdate 0.centos.pool.ntp.org
20 Feb 10:16:43 ntpdate[23882]: step time server 142.54.181.202 offset -2770.345357 sec
[root@bugzilla ~]# service ntpd status
ntpd is stopped
OBS:1.2.3.4 is the campus NTP server, disguised.

But as you see, not even the official CentOS servers help. It is something client side.

Has anyone seen this before?

Let me know if ntp.conf can give any clue, ommited it to not send a lot of junk to the thread at first.

Thanks,
Samir
 
Old 02-20-2014, 12:03 PM   #2
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,978
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
The hardware clock maybe?

What does...

Code:
hwclock --show
 
1 members found this post helpful.
Old 02-20-2014, 01:18 PM   #3
Laedrus
LQ Newbie
 
Registered: May 2007
Location: Brazil
Distribution: Debian and RHEL
Posts: 7

Original Poster
Rep: Reputation: 0
Ah, a very important detail that I forgot to include : It's a Xen VM.

I also heard of Xen VMs clocks misbehaving before, but not like that and nothing that ntpd running wouldn't solve.

Thanks for the idea hwclock gave me an error :
Code:
[root@bugzilla ~]# hwclock --show
Cannot access the Hardware Clock via any known method.
Use the --debug option to see the details of our search for an access method.
As well as in other hardware machines I had. I decided to check in the host machine, and it also had a big skew. This time ntpdate worked as expected and ntpd running and active in chkconfig will keep things working in the long run.

Then as the VM would stay stuck in the same bad skew, I tried rebooting it to see if it would restore it to a decent state. It did, after reboot ntpd got the right date and ntpdate showed a small skew :
Code:
[root@bugzilla ~]# ntpdate 131.215.145.254
20 Feb 11:12:54 ntpdate[2474]: adjust time server 131.215.145.254 offset -0.004173 sec
That solves my problem, it's a pity that I didn't manage to find the reason to share here for people with the same problem in the future. Bottom line is that solving the issue in the host and rebooting the VM helped.

Thanks!
 
Old 02-20-2014, 01:27 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 21,212

Rep: Reputation: 3972Reputation: 3972Reputation: 3972Reputation: 3972Reputation: 3972Reputation: 3972Reputation: 3972Reputation: 3972Reputation: 3972Reputation: 3972Reputation: 3972
A VM does not have access to the hardware clock.

This might shed some light...
http://www.novell.com/documentation/...a/b9qzhq5.html
 
1 members found this post helpful.
Old 02-20-2014, 04:25 PM   #5
Laedrus
LQ Newbie
 
Registered: May 2007
Location: Brazil
Distribution: Debian and RHEL
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks Michael, that is some helpful documentation to understand how it happened. Marking the thread as solved.
 
Old 02-21-2014, 06:57 AM   #6
yo8rxp
Member
 
Registered: Jul 2009
Location: Romania
Distribution: Ubuntu 10.04 Gnome 2
Posts: 102

Rep: Reputation: 31
Well ntp cannot update system clock at once if delay is too big ! ( one hour as i remember), set up date manually once and it will do the job.
 
Old 02-21-2014, 07:08 AM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 21,212

Rep: Reputation: 3972Reputation: 3972Reputation: 3972Reputation: 3972Reputation: 3972Reputation: 3972Reputation: 3972Reputation: 3972Reputation: 3972Reputation: 3972Reputation: 3972
The maximum offset is actually 1024 seconds.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NTP offset value too high with ntpdate Rohit_4739 Linux - Newbie 1 04-04-2013 09:10 AM
[SOLVED] ntp safely on server, ntpdate? --debian GreggT Linux - Server 5 06-30-2012 05:14 PM
ntpdate XXX works ; ntpdate -q XXX don't works - ntpd stays on local oudoubah Linux - Software 5 12-12-2011 07:28 AM
Difficulty getting NTP to sync the system clock on SuSE Linux 8. sombre1 Linux - Software 2 10-10-2009 07:21 AM
ntp hell: System clock runs twice as fast as it should do jimieee Linux - Software 0 01-23-2004 05:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration