[Bug 733626] New: NTP service dies a few minutes after bootup, leaving the clock one hour in the future
https://bugzilla.novell.com/show_bug.cgi?id=733626 https://bugzilla.novell.com/show_bug.cgi?id=733626#c0 Summary: NTP service dies a few minutes after bootup, leaving the clock one hour in the future Classification: openSUSE Product: openSUSE 12.1 Version: Final Platform: x86-64 OS/Version: SuSE Other Status: NEW Severity: Major Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: antoine.mechelynck@belgacom.net QAContact: qa@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0a1) Gecko/20111129 Firefox/11.0a1 SeaMonkey/2.8a1 A few minutes after bootup, ntp.service goes dead, leaving the system clock one hour in the future. If at this point I do systemctl reload-or-restart ntp.service the clock is reset to the right time and the NTP service remains up indefinitely. Reproducible: Always Steps to Reproduce: 1. Bootup in default runlevel (multiuser with X11) 2. Wait a few minutes 3. systemctl status ntp.service Actual Results: - ntp.service is "inactive (dead)" - there is no ntpd process running - the clock is one hour in the future Expected Results: ntpd should go on running and the clock should be set right Additional info: If I start working on /dev/tty1../dev/tty6 rather than logging immediately into X, my workflow will be interrupted (maybe in the middle of typing a command at the shell prompt) by system messages telling me that ntpd.service was "successfully" turned off. I may then notice (e.g. by doing systemctl status for a service started shortly before the messages) that my clock had already been off by one hour for some time before that. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=733626 https://bugzilla.novell.com/show_bug.cgi?id=733626#c zj jia <zjjia@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |zjjia@suse.com AssignedTo|bnc-team-screening@forge.pr |varkoly@suse.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=733626 https://bugzilla.novell.com/show_bug.cgi?id=733626#c1 Peter Varkoly <varkoly@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO InfoProvider| |antoine.mechelynck@belgacom | |.net --- Comment #1 from Peter Varkoly <varkoly@suse.com> 2012-01-04 12:59:34 UTC --- Please provide me the output of "systemctl is-enabled ntp.service" -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=733626 https://bugzilla.novell.com/show_bug.cgi?id=733626#c2 Tony Mechelynck <antoine.mechelynck@belgacom.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW InfoProvider|antoine.mechelynck@belgacom | |.net | --- Comment #2 from Tony Mechelynck <antoine.mechelynck@belgacom.net> 2012-01-07 07:46:57 CET --- (In reply to comment #1)
Please provide me the output of "systemctl is-enabled ntp.service"
ntp.service is not a native service, redirecting to /sbin/chkconfig. Executing /sbin/chkconfig ntp --level=5 ntp 235 enabled The symptoms have changed a little since I reported this bug: During bootup, I fleetingly see messages from ntpd run past on the text console, telling me that it failed to connect with any of (IIRC, I'm quoting from memory): 0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org At the end of the boot sequence, the ntp service remains enabled and running, but when the (KDE upstream) login screen comes up, its clock is almost always one hour late (the exception is after a "warm reboot", telinit 6 or equivalent). At that moment, logging in as root on /dev/tty1 and typing rcntp restart shows that ntpd succeeds to contact three time-guard servers but with an offset of -3600 on the first one. After that, hitting Ctrl-Alt-F7 shows that the login clock has been set right. I suspect that with the change from System V Init to systemd/systemctl, the following happened: (a) the ntp service became started too early, before my DSL-over-Ethernet connection could be functional; (b) saving the system clock into the CMOS at system shutdown time was forgotten, so that my CMOS clock (set to local time) is still running on "summer time" the way it was begin November before I upgraded to openSUSE 12.1. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=733626 https://bugzilla.novell.com/show_bug.cgi?id=733626#c3 --- Comment #3 from Tony Mechelynck <antoine.mechelynck@belgacom.net> 2012-01-07 07:49:53 CET --- s/one hour late/one hour early (i.e. in the future)/ -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=733626 https://bugzilla.novell.com/show_bug.cgi?id=733626#c4 --- Comment #4 from Tony Mechelynck <antoine.mechelynck@belgacom.net> 2012-01-11 10:29:21 CET --- Today I booted without X11, and suddenly something glared at me from the bootup log on /dev/tty1: the messages saying that ntpd couldn't connect with any time server were *followed* by the messages about starting the "Name Service Cache Daemon". Isn't that the wrong sequence? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=733626 https://bugzilla.novell.com/show_bug.cgi?id=733626#c Tony Mechelynck <antoine.mechelynck@belgacom.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|NTP service dies a few |NTP service starts, but |minutes after bootup, |leaves the clock one hour |leaving the clock one hour |in the future |in the future | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=733626 https://bugzilla.novell.com/show_bug.cgi?id=733626#c5 Peter Varkoly <varkoly@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CLOSED Resolution| |WORKSFORME --- Comment #5 from Peter Varkoly <varkoly@suse.com> 2012-01-12 07:43:12 UTC --- The sequence is OK: See /etc/init.d/nscd ### BEGIN INIT INFO # Provides: nscd # Required-Start: $remote_fs $time If you have not proper internet connection during the boot time it is not a good idea to start ntp as daemon. Since openSUSE 12.1 you can configure ntp to set the time periodicaly. Furhteremore, the best way to get the correct time is to keep the CMOS time in UTC. Setting CMOS in local time couses a lot of trouble. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=733626 https://bugzilla.novell.com/show_bug.cgi?id=733626#c6 --- Comment #6 from Tony Mechelynck <antoine.mechelynck@belgacom.net> 2012-01-12 21:46:24 CET --- (In reply to comment #5)
The sequence is OK: See /etc/init.d/nscd ### BEGIN INIT INFO # Provides: nscd # Required-Start: $remote_fs $time
If you have not proper internet connection during the boot time it is not a good idea to start ntp as daemon.
Under 11.4 there was no problem; and even now all my networks (lo, eth_s0_0 and a little later dsl0) are "started" (with a green "done" at the right side of the bootup screen) before the ntp service is launched. So why did it work under 11.4 with "true" Sys V init and why doesn't it work now with systemd as a supposedly "fully compatible drop-in replacement"?
Since openSUSE 12.1 you can configure ntp to set the time periodicaly.
How? Shall I add (and in which file in which format?) a cron job to run ntp every so often? And how often? And will that prevent the analog clock on the KDE login screen from showing the wrong time when booting to X11 at "runlevel 5" (or the systemd equivalent)?
Furhteremore, the best way to get the correct time is to keep the CMOS time in UTC. Setting CMOS in local time couses a lot of trouble.
I set it that way under SuSE 6 (6.4 IIRC) because at that time I was running double-boot, and Windows needs the clock on local time. It never gave me any problem until openSUSE 11.4 inclusive. Finally, why can't the shutdown routine (init 0 or init 6) store the current system time in the CMOS so that at next reboot the clock will be set right even if NTP cannot resolve the timeserver hostname to a dotted-quad IP address? (YaST tells me, under "Security and Users → Security Center and Hardening → Security Overview, that "Write back system time to the hardware clock" is "Enabled √") -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=733626 https://bugzilla.novell.com/show_bug.cgi?id=733626#c7 --- Comment #7 from Tony Mechelynck <antoine.mechelynck@belgacom.net> 2012-01-13 02:20:24 CET --- I solved my problem by means of "crontab -e": add the following two lines: # restart NTP srvice shortly after bootup @reboot root sleep 60; rcntp restart The one-minute delay is not really noticeable IMHO. I don't know exactly which file was modified (not /etc/crontab) but the change persists over a reboot (by means of "init -6"). I still think that the system scripts should be adjusted to give a DSL-over-Ethernet connection the time to be fully operational before starting the NTP service. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=733626 https://bugzilla.novell.com/show_bug.cgi?id=733626#c8 Bruno Friedmann <bruno@ioda-net.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bruno@ioda-net.ch --- Comment #8 from Bruno Friedmann <bruno@ioda-net.ch> 2012-01-15 08:29:04 UTC --- It's more than just ntp, each network service which should run behind a dsl connection are just in failure state behind systemd. the after remote_fs state is not respected. If you specify your static dsl public ip as one of the interface for ntp,named,apache,etc they will just failed, cause systemd start the services before the dsl is ready to serve. It's more dangerous, if you setup your service to listen ::* or * as the service start before (without crash) the new ip was ready, it doesn't listen on it. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=733626 https://bugzilla.novell.com/show_bug.cgi?id=733626#c9 --- Comment #9 from Tony Mechelynck <antoine.mechelynck@belgacom.net> 2012-01-15 11:32:47 CET --- In reply to comment #8: Of course, but (on my system) ntpd is the only network program which is started "automatically" at bootup. Other network programs (browser, mail-news-RSS client, chat, YaST, zypper, FTP client) have to wait for a login (usually an X11 login; for zypper, ftp and YaST cursesUI it could also be a /dev/tty* login), and human reaction times being what they are, this gives the DSL connection the time it needs to become operational. Currently I'm down to 15 seconds sleep in that cron@reboot job (comment #7), and it is still long enough for the "restarted" NTPD to connect successfully to the time servers. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=733626 https://bugzilla.novell.com/show_bug.cgi?id=733626#c10 Martin Jakl <martin.jakl@qbicon.cz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |REOPENED CC| |martin.jakl@qbicon.cz Resolution|WORKSFORME | --- Comment #10 from Martin Jakl <martin.jakl@qbicon.cz> 2012-04-03 15:42:47 UTC --- I have the same problem when using my wifi connection. Systemd is not waiting for network to start. In my opinion using cron to start ntp afterwards is not good solution. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=733626 https://bugzilla.novell.com/show_bug.cgi?id=733626#c11 Axel Braun <axel.braun@gmx.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |axel.braun@gmx.de --- Comment #11 from Axel Braun <axel.braun@gmx.de> 2012-04-19 15:50:08 UTC --- can confirm this, after startup Clock is terribly wrong, and ntp has to be manually disabled and enabled. Using WLAN with networkmanager -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=733626 https://bugzilla.novell.com/show_bug.cgi?id=733626#c12 --- Comment #12 from Axel Braun <axel.braun@gmx.de> 2013-05-07 12:34:28 UTC --- did not notice the problem anymore in 12.3 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=733626 https://bugzilla.novell.com/show_bug.cgi?id=733626#c13 Peter Varkoly <varkoly@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |CLOSED Resolution| |FIXED --- Comment #13 from Peter Varkoly <varkoly@suse.com> 2014-04-07 07:24:02 UTC --- works -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com