My server seems to be about 2 minutes ahead of the actual time.
I have set up System Time in webmin, but it doesn't seem to make any difference.
When I run ntpq -p
I get the following results:
============================================================================== barricade.rack9 209.51.161.238 2 u 23 64 7 28.644 -147114 13.491 jane.qotw.net 164.244.221.197 2 u 65 64 7 0.450 -147125 8.021 mail.honeycomb. 204.246.88.88 3 u 2 64 17 50.809 -147128 11.180 LOCAL(0) .LOCL. 10 l 13 64 7 0.000 0.000 0.001
I guess the -147""" is causing the problem, but I don't understand how to correct it. Also, none of these servers are the one I specified in "System Time."
I used the same ntp server on on my Windows 7 PC and the time is super-accurate.
I would appreciate your insight.
Comments
Submitted by andreychek on Thu, 12/05/2013 - 23:45 Comment #1
Howdy -- can you post a screenshot of the screen in Webmin -> Hardware -> System Time -> "Time server sync" screen?
Submitted by martynw on Fri, 12/06/2013 - 00:39 Pro Licensee Comment #2
Sure, here is a screen shot... Thanks.
Submitted by JamieCameron on Fri, 12/06/2013 - 01:36 Comment #3
The
ntpq
command uses timeservers that are set separately from the ones Webmin uses (on the page shown on that screenshot).If you click Sync and Apply, does it bring the time back into sync?
Submitted by martynw on Fri, 12/06/2013 - 10:24 Pro Licensee Comment #4
I tried to change the time (so that it was wrong) before clicking sync.
I get this message:
date: cannot set date: Operation not permitted Fri Dec 6 08:00:15 PST 2013
however it does appear to have changed the time.
If I then press sync, the time syncs but it is still about 2 minutes ahead of what it should be.
Incidentally, when I first entered an address in the "Timeserver hostnames or addresses" field, I got a message saying something like: "NTP or Time needs to be installed" so I installed NTP.
Submitted by JamieCameron on Fri, 12/06/2013 - 14:45 Comment #5
Are you running on a real system there, or a VM of some type? Because VMs often cannot set their own clocks - instead it is inherited from the host system.
Submitted by martynw on Sat, 12/07/2013 - 10:32 Pro Licensee Comment #6
So how does Webmin synchronize the time? How can I solve this issue? Perhaps I have some other time server running that is overriding Webmin?
Submitted by andreychek on Sat, 12/07/2013 - 11:26 Comment #7
What happens if you run this command on the command line:
ntpdate pool.ntp.org
After running that command, is your time set correctly? Or is it still off by two minutes?
Submitted by martynw on Sat, 12/07/2013 - 12:05 Pro Licensee Comment #8
It looks like it still has the 2 minute issue:
7 Dec 09:54:09 ntpdate[25366]: step time server 23.31.117.13 offset -130.561524 sec
i.e. it is actually 9:52.
Submitted by andreychek on Sat, 12/07/2013 - 12:10 Comment #9
It seems like there's a system problem of some type, as running ntpdate from the command line should immediately set the time correctly.
Is this a VPS of some sort? Or is this a dedicated server?
Submitted by martynw on Sat, 12/07/2013 - 12:22 Pro Licensee Comment #10
Its actually on Linode.
Submitted by JamieCameron on Sat, 12/07/2013 - 13:26 Comment #11
The issue may be that your VPS host is overriding the system time. You may want to ask Linode about this.
Submitted by martynw on Sat, 12/07/2013 - 14:07 Pro Licensee Comment #12
Thanks. Linode says: "We don't override it but you may have the ntp service running which might overwrite it. Just to be sure, I checked the time on the host and it was correct (all the hosts use ntp, as well). Also, the 'ntpdate' command will not work if the service is running."
Submitted by andreychek on Sat, 12/07/2013 - 14:15 Comment #13
You could try disabling the ntp service, if you like, and then run the ntpdate command afterwards.
Submitted by martynw on Sat, 12/07/2013 - 14:22 Pro Licensee Comment #14
I don't think it is running:
service ntpd stop Shutting down ntpd: [FAILED]
ntpdate pool.ntp.org 7 Dec 12:09:10 ntpdate[9254]: step time server 199.104.120.74 offset -129.565390 sec
which is still 2 minutes off.
Submitted by andreychek on Sat, 12/07/2013 - 14:26 Comment #15
What output do you receive if you run this command:
ps auxw | grep ntp
That will show if there's any NTP related service or command currently running.
Submitted by martynw on Sat, 12/07/2013 - 14:41 Pro Licensee Comment #16
I get ps auxw | grep ntp root 11185 0.0 0.0 4784 700 pts/0 S+ 12:25 0:00 grep ntp
When I started NTPD and run
ntpq ntpq> peers
remote refid st t when poll reach delay offset jitter38.88.55.66.hos 149.20.64.28 2 u 8 64 1 31.638 -129503 0.001 ec2-50-16-231-1 209.51.161.238 2 u 8 64 1 34.478 -129499 0.001 krillin.ecansol 204.9.54.119 2 u 7 64 1 41.521 -129503 0.001 LOCAL(0) .LOCL. 10 l 6 64 1 0.000 0.000 0.001
I am getting these weird servers that have massive offset rather than using the server that I specified in Webmin.
Is there an alternative to NTPD and NTPDATE?
Submitted by martynw on Sat, 12/07/2013 - 16:25 Pro Licensee Comment #17
I think you were right about the VPS.
They told me to do this:
"You can't use the date command like this unless you use a xen independent wallclock:
echo 1 > /proc/sys/xen/independent_wallclock nano /etc/sysctl.conf
Add the line:
xen.independent_wallclock=1
However, I would definitely recommend that you continue to use the ntp service instead."
and that seems to have worked. Do you know what they mean by "I would definitely recommend that you continue to use the ntp service instead."?
Submitted by andreychek on Sat, 12/07/2013 - 17:46 Comment #18
There's multiple ways to use NTP, and that's what they're referring to.
It should work just fine for you thought to go into Webmin, and use the interface within there to handle the time synchronization.