Hi, in my Leap installation I don’t seem to get the ntp timeserver working. I can start it and then I see the PC time is synchronized with a clock which I have here which receives a signal from the DCF77 atomic clock. But after as very short while the PC clock starts racing again. Now it is 3 minutes ahead of the atomic clock again, meaning ntp is not working.
I copied some text from the ntp.log file.
This is from early this morning:
9 Apr 06:32:35 ntpd[1807]: Listen and drop on 0 v6wildcard ::]:123 9 Apr 06:32:35 ntpd[1807]: Listen and drop on 1 v4wildcard 0.0.0.0:123
9 Apr 06:32:35 ntpd[1807]: Listen normally on 2 lo 127.0.0.1:123
9 Apr 06:32:35 ntpd[1807]: Listen normally on 3 eth0 192.168.2.15:123
9 Apr 06:32:35 ntpd[1807]: Listen normally on 4 eth1 192.168.56.101:123
9 Apr 06:32:35 ntpd[1807]: Listen normally on 5 lo ::1]:123
9 Apr 06:32:35 ntpd[1807]: Listen normally on 6 eth0 [fe80::a00:27ff:fe76:792c%2]:123
9 Apr 06:32:35 ntpd[1807]: Listen normally on 7 eth1 [fe80::a00:27ff:feb3:2f76%3]:123
9 Apr 06:32:35 ntpd[1807]: Listening on routing socket on fd #24 for interface updates
9 Apr 06:32:37 ntpd[1807]: receive: Unexpected origin timestamp from 46.249.37.170
9 Apr 06:44:20 ntpd[1807]: ntpd exiting on signal 15 (Terminated)
9 Apr 06:44:20 ntpd[1807]: 213.154.229.24 local addr 192.168.2.15 -> <null>
9 Apr 06:44:20 ntpd[1807]: 46.249.37.170 local addr 192.168.2.15 -> <null>
9 Apr 06:44:20 ntpd[1807]: 129.250.35.250 local addr 192.168.2.15 -> <null>
9 Apr 06:44:20 ntpd[1807]: 85.255.214.66 local addr 192.168.2.15 -> <null>
9 Apr 06:45:58 ntpd[1730]: Listen and drop on 0 v6wildcard ::]:123
9 Apr 06:45:58 ntpd[1730]: Listen and drop on 1 v4wildcard 0.0.0.0:123
9 Apr 06:45:58 ntpd[1730]: Listen normally on 2 lo 127.0.0.1:123
9 Apr 06:45:58 ntpd[1730]: Listen normally on 3 eth0 192.168.2.15:123
9 Apr 06:45:58 ntpd[1730]: Listen normally on 4 eth1 192.168.56.101:123
9 Apr 06:45:58 ntpd[1730]: Listen normally on 5 lo ::1]:123
9 Apr 06:45:58 ntpd[1730]: Listen normally on 6 eth0 [fe80::a00:27ff:fe76:792c%2]:123
9 Apr 06:45:58 ntpd[1730]: Listen normally on 7 eth1 [fe80::a00:27ff:feb3:2f76%3]:123
9 Apr 06:45:58 ntpd[1730]: Listening on routing socket on fd #24 for interface updates
This is some time later immediately after restarting ntp:
9 Apr 09:36:27 ntpd[1730]: ntpd exiting on signal 15 (Terminated) 9 Apr 09:36:27 ntpd[1730]: 94.228.220.14 local addr 192.168.2.15 -> <null>
9 Apr 09:36:27 ntpd[1730]: 92.63.172.80 local addr 192.168.2.15 -> <null>
9 Apr 09:36:27 ntpd[1730]: 82.94.235.106 local addr 192.168.2.15 -> <null>
9 Apr 09:36:27 ntpd[1730]: 146.185.139.19 local addr 192.168.2.15 -> <null>
9 Apr 09:36:27 ntpd[8369]: Listen and drop on 0 v6wildcard ::]:123
9 Apr 09:36:27 ntpd[8369]: Listen and drop on 1 v4wildcard 0.0.0.0:123
9 Apr 09:36:27 ntpd[8369]: Listen normally on 2 lo 127.0.0.1:123
9 Apr 09:36:27 ntpd[8369]: Listen normally on 3 eth0 192.168.2.15:123
9 Apr 09:36:27 ntpd[8369]: Listen normally on 4 eth1 192.168.56.101:123
9 Apr 09:36:27 ntpd[8369]: Listen normally on 5 lo ::1]:123
9 Apr 09:36:27 ntpd[8369]: Listen normally on 6 eth0 [fe80::a00:27ff:fe76:792c%2]:123
9 Apr 09:36:27 ntpd[8369]: Listen normally on 7 eth1 [fe80::a00:27ff:feb3:2f76%3]:123
9 Apr 09:36:27 ntpd[8369]: Listening on routing socket on fd #24 for interface updates
I discovered something else about the clock in my computer.
As host system I run LinuxMint 17.3 KDE without using an NTP server to make the clock run on time. It does however run exactly on time.
As guest in Virtualbox I run OpenSuse Leap 42.1 and I am trying to use the time server to keep the clock running on time. This doesn’t work.
Now, since this morning, some 4 hours ago, the clock is running 5 minutes ahead of schedule.
Host: no time server, clock is on time
Guest: no time server, clock is 5 minutes fast.
What is going on here?
Are you guys using the ntp time server? If so, how did you manage that?
YaST > Netork Services > NTP Configuration. In my case I normaly use the one my ISP provides. It being broken some tim ago, I switched to nl.pool.ntp.org (being in NL).
Further the defaults (Now and on Boot), Runtime configuration Policy: Auto and on th Secirity Settinfs Tab: Run NTP in Chroot jail).
And that works of course for years. But on a real system. I have no idea how this is supposed to work on a virtual system. (This is not in the Virtualization subforum) and if correcting the clock of the host and then adding corecting the clock of the client is a useful thing to do.
I can correct the clock in the OpenSuse guest as often as I want, it keeps running too fast.
Setting the ntp time server the way you described, which is exactly the way I did it, does not work. It will be off in no time, making the clock race again.
I am now doing a test with 3 VM guests:
Fedora 23: no ntp server - clock runs on time
Netrunner rolling release: no ntp server - clock runs on time
OpenSuse Leap: no ntp server - clocks runs way too fast
LinuxMint (host system): no ntp server - clock runs on time
So I still have 2 questions:
why can’t I use the ntp server the way it should be used?
why is the clock in OpenSuse racing?
@Henk: if you think this is more a subject for the virtualization section then please feel free to move it.
How are the LOCALE variable’s set? During install, did you opt for “Dutch” and use the correct time zone?
What happens if you disable ipV6? Mind the dutch ISP’s are shouting they’re ready, the actual situation “differs” :).
During installation I used English as language but I did set the timezone to The Netherlands. I like to use software in the English (American) language since using Dutch texts makes me feel a bit strange. Translations are not always good, plus English terms are so familiar that translating them sounds strange.
Even after a minute or so the clock is 7 seconds fast already. This is without IPv6 enabled.
This is the first (only) OS I use in a VM which has this problem.
What is going on here? Who can help me? Please.
And “faster” means that it doesn’t stay one minute ahead, but increased time difference, i.e. going to three minutes ahead in a couple of hours? I.e. seconds last less than a second?
Exactly, it is now 1 1/2 minute fast.
As I wrote earlier, this only happens with this VM, others run nicely on time without using ntp. PLus, I can enable ntp in those machines which I obviously can not do here.
I have been Googling around and found many forum threads of people having the same problem as I have. I’ve read many answers to the problem but not one worked for me. These forum threads are from all kind of forums, different distro’s but also from linux.com and unix.com.
All sorts of answers but as I said, not one is right for me.
It seems I have to live with it.
If somebody does have answers please do write them here, I will then try them to see if they work.
Thank you very much
Can somebody please tell me how (s)he set the time synchronization? Where did you do it and how? Did you use the kde settings -> regional settings -> date & time or did you use Yast -> Date & Time or Yast -> NTP configuration?
Please include the contents of /etc/ntp.conf.
For me right now it makes no difference what I do, with or without time synchronization, the clock keeps running way too fast.
I disabled the firewall, did not help, I enabled it again with port 123 open, no difference.
I am using a virtual machine, but the clocks in my other virtual machines al run fine, no problem there. One even without ntp cause the system won’t accept using a time server.
NTP should not have anything to do with the speed of the clock only setting the time to a source at some points
The clock speed In Linux Is software controlled and is based on the known frequency of the processor So if the processor is running faster then it reports to the OS then the clock will gain time. Over clocking maybe? Also check the VM settings
Thank you gogalthorp. This could explain the fact that the clock runs fast. I did overclock my 4GHz CPU by 10%.
But still remains the questions: why does ntp not set the clock on time AND why is the clock only running fast in OpenSuse Leap?
I have a template for all my virtual machines. When starting a new one I simply clone it, connect the downloaded ISO file to it, and in the settings section General I chose the correct Linux Distro in the Version field. Oh and during cloning I randomize the MAC address so I don’t get problems when using more than one VM at the same time.
This means all my VM’s use the exact same settings; only Leap is running too fast.
What could be an answer for the fact ntp does not correct the time? How did you set ntp and where did you set it:
KDE settings: Date and Time, or
Yast: Date and Time, or
Yast: ntp section?
Thanks again for the tip about the overclocking. I never would have searched it there.
KDE date and time nor Yast > Date and time have anything to do with NTP.
They set the date and time in UTC for the system clock (when you change that) and specify the time zone for a user (KDE) and the system process environment resp when you change that).
Fom the moment on the time is set (in msecs since 1970:01:01 00:00 UTC), CPU cycles are used to step it forward (like gogalthorpe explained). Now this can get out of step with reality a bit. And that can be corrected by using NTP. But NTP only corrects those very minor steps and only with intervals. When UP finds out that the clock deviates to much, it will not correct, because that would lead to actions on the system being timed e.g. in reverse order (logging with earlier time stamps, databases loosing sequences).
This is the short story (read about NTP when you like to know more). But imho, when your system runs away the amount you describe, NTP will not correct that (it will only try to correct with minimal steps at a time, but that will be more then nullified when the system keeps racing).
Henk, now you’ve really lost me completely. You write, if I understand you correctly: KDE date and time nor Yast > Date and time have anything to do with NTP.
Picture 1 shows the KDE settings -> Regional Settings -> Date and Time. In here it is possible to use: Set date and time automatically.
Picture 2 shows YAST -> Date and Time. It says: Synchronize with NTP server.
Picture 3 shows YAST -> NTP Configuration.
What can I set in pics 1 and 2 other than the time: to set it automatically. Isn’t that NTP? Or am I hallucinating?
Okay, my clock runs fast. But if I could set ntp to adjust it, say every minute, like ntp configuration let’s you do, then the correction is not that large. But somehow I can not set the interval to anything lower than 5 minutes. Well, I can chose 1 minute, but the next time I look it is 5 minutes again.
At the moment I use Leap in a VM, but I am afraid to install it in the real world when this matter is not solved. It would mean my computer will always be way too fast. Stopping overclocking is not an option. From day 1 I use this home made computer I use the extra 10% CPU frequency.
Other system are not disturbed by the fact I overclocked my CPU. Why OpenSuse can’t handle it?
I have no idea what KDE means with “Set date and time automatically”. KDE has sometimes the idea that it has to mix user settings with systems settings. When you then try to change a systems setting it starts asking for the root password. I normaly do not use KDE for systems configuration (the only exception I know is the displaymanager, because YaST has no section for it).
Also I do not know what that “automatically” means. When people talk about computers and use the word “automaticaly”, it normaly means that they have no idea what is happening and in fact they mean “magicaly”.
It could be that it does configure and/or start/stop NTP. Try it. But as you already experienced that NTP does not help in your case, I do not think it is very usefull.
It could however also be that KDE means to use the same timezone settings as the system default.
When you click to change date/time/NTP usage, you get a screen where you can also configure NTP (on/off and server). It is only to make it easy to configure that in one screen and not being forced to go specifcaly to the NTP screen of YaST. YaST is there to make things easy.
Again it is all the same. As NTP does not help you, it will not help when you configure it from a different utility.
NTP is not to be used to constantly set the time (only once at boot at the most). It is designed to correct slight frequency deviations.
What we try to tell you all the time that NTP will not correct such a large time difference. No matter if you configure and start it manualy, using YaST > System > Date and Time, YaST Network Services > NTP Configuration, KDE configuration or any combination of them. They all come down to a configuration in /etc/ntp.conf and enable/disabling starting/stopping the deamon.
We try to tell you all the time that you should concentrate on your real problem: system (kernel) clock is to fast. I have never seen anybody complaining about that in these forums. And when you want help from people here on your real problem (system clock running to fast in a VM with overclocked hardware where other VM systems run corret), You better start a thread in the Virtualization forum with a good title (the present NTP complanit does not cover your problem) and a good description. You should of course mention that you tried to correct the fast running using NTP, but that that, for understandable reasons, does not work.
Hi
I would guess it’s to do with kernel configuration on openSUSE and the host system kernel.
If you look at Leap;
fgrep "HZ" /boot/config-3.12.53-60.30-default
CONFIG_NO_HZ_COMMON=y
# CONFIG_HZ_PERIODIC is not set
CONFIG_NO_HZ_IDLE=y
# CONFIG_NO_HZ_FULL is not set
CONFIG_NO_HZ=y
# CONFIG_RCU_FAST_NO_HZ is not set
# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
# CONFIG_HZ_300 is not set
# CONFIG_HZ_1000 is not set
CONFIG_HZ=250