Bug 219035

Summary: ntp not working for date/time
Product: [Applications] systemsettings Reporter: Ruchir Brahmbhatt <ruchir.brahmbhatt>
Component: kcm_clockAssignee: Paul Campbell <paul>
Status: RESOLVED DUPLICATE    
Severity: normal CC: cannewilson, chealer, gokcen.eraslan, jreznik, philipp_foerster, philschmidt, rad.n, rd_ree, ydanila
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Unspecified   
Latest Commit: Version Fixed In:

Description Ruchir Brahmbhatt 2009-12-17 10:09:09 UTC
Version:           1.0 (using Devel)
Installed from:    Compiled sources

Qt: 4.6.1
KDE Development Platform: 4.3.82 (KDE 4.3.82 (KDE 4.4 >= 20091211)) "release 1"
System Settings: 1.0

Steps to reproduce:
1. Open systemsettings.
2. Select Date/time.
3. Go to NTP tab.
4. Select "Set date/time automatically".
5. Click ok.

Expected result:
Settings should be saved and date/time should start synchronizing from ntp servers.

Actual result:
However we can ping time servers from shell, it gives error that can not connect with time server and doesn't save this setting.
Comment 1 Anne Wilson 2010-01-25 14:20:00 UTC
Possibly related to this -

My router makes regular NTP checks.  I wanted to set this laptop to sync with 
the router, so attempted to activate NTP in SystemSettings.  First, I tried 
setting it to my router's IP.  I was asked for the root password, twice, then 
told that it could not authenticate.  While it didn't seem likely that it 
would affect authentication, I then tried setting it to the Europe ntp pool.  
Again, I was ask for the root password twice, and again told that it could not 
authenticate.  On running systemsettings as root the setting appeared to be accepted.  However, checking later, I found that NTP was again disabled in systemsettings.

A short discussion of this can be seen at http://lists.fedoraproject.org/pipermail/kde/2010-January/005443.html
Comment 2 Yakov 2010-02-15 19:18:31 UTC
It doesn't works for me too. Today I had updated KDE to last factory version 4.4.00 release 223. I tried several WORKING! ntp servers, but it always says that it coudn't connect server.
Comment 3 Yakov 2010-02-15 19:20:49 UTC
It doesn't works for me too. Today I had updated KDE to last factory version 4.4.00 release 223. I tried several WORKING! ntp servers, but it always says that it coudn't connect server.
Comment 4 Philipp 2010-03-04 14:59:04 UTC
still not working in 4.4.1
i get the same errors
Comment 5 Ruchir Brahmbhatt 2010-03-04 15:08:57 UTC
Yeah I also see it on 4.4.1.
Comment 6 Philippe Cloutier 2010-05-25 05:07:42 UTC
Could it be that you don't have ntpdate? kcm_clock seems to depend on ntpdate, which is not enforced by dependencies at least on Debian (and the error message certainly doesn't suggest that's the issue: "Unable to contact time server: .").
Comment 7 Philippe Cloutier 2010-05-25 05:10:19 UTC
To clarify, this seems to be the new version of #142815 Harald hints to.
Comment 8 Ruchir Brahmbhatt 2010-05-25 07:04:14 UTC
I see strange behavior on 4.4.3. Now it no longer gives error but the option is automatically unchecked after some time. I have ntpdate.
Comment 9 Philipp Schmidt 2010-08-12 11:29:18 UTC
Problem still exists in 4.5.0. It gives me an Errormessage stating
> "Unable to contact time server: ."

According to the sourcecode there should be a mention of the tried server before the dot (would make sense), so maybe the server is not read from the input field?
Comment 10 Philipp Schmidt 2010-08-12 12:33:32 UTC
(In reply to comment #9)
> Problem still exists in 4.5.0. It gives me an Errormessage stating
> > "Unable to contact time server: ."
> 
> According to the sourcecode there should be a mention of the tried server
> before the dot (would make sense), so maybe the server is not read from the
> input field?

After further study of the code: My error was a simple one. The module relies on ntpdate or rdate to update the time. If neither is found in the System one would expect to get a message stating that fact, instead we get none. So after installing ntpdate and restarting Systemsettings it works for me.

Regardless of distributors who should add a dependancy on either ntpdate or rdate it would still be nice to have that information.
Comment 11 Christoph Feck 2010-08-28 22:34:00 UTC
*** Bug 249267 has been marked as a duplicate of this bug. ***
Comment 12 Jekyll Wu 2012-12-04 20:56:31 UTC
This report seems to be fill with different problems.

That "Set date and time automatically" option will be grayed out when neither ntpdate nor rdate are available in your system, and if you move mouse above that grayed out option, there will be a tooltip explaining why.

As for the "Unable to contact time server" error, I just can't reproduce it following steps in this report. The only way for me to reproduce that error is following https://bugs.kde.org/show_bug.cgi?id=178968#c12 .

So I close this report as duplicate.

*** This bug has been marked as a duplicate of bug 178968 ***