Adjust Time -> Sync with Internet Time Servers never syncs.

Bug #157608 reported by Mjpatey
30
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ntp (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Since my Gutsy install, my system time has crept behind by about 7 minutes (this is since last week when Gutsy went public).

I right-click the clock on the taskbar, and go to "Adjust Date & Time". Next to "Configuration" I select "Keep synchronized with Internet servers". The system installs NTP. Then I select 5 or 6 servers. I click "Close". The time doesn't budge. I wait a few hours, still nothing. I reboot. Still nothing. I wait 2 days. No change, and it's continuing to creep farther behind. It's obviously not syncing with anybody's servers.

I've posted about this on the Ubuntu Forums, and no one from the community seems to be able to help so far.

If this is not a bug, can someone help me figure out how to be a more suitable user?

Revision history for this message
Fred (frederic-lespez) wrote :

I confirm this bug.

Running ntpdate by hand doesn't work :
# ntpdate
28 Oct 07:22:01 ntpdate[6991]: no servers can be used, exiting

But running ntpdate-debian works :
# ntpdate-debian
28 Oct 07:23:49 ntpdate[6994]: the NTP socket is in use, exiting
# /etc/init.d/ntp stop
 * Stopping NTP server ntpd [ OK ]
# ntpdate-debian
28 Oct 07:24:03 ntpdate[7016]: adjust time server 134.214.100.6 offset 0.281618 sec
# /etc/init.d/ntp start
 * Starting NTP server ntpd [ OK ]
#

Revision history for this message
Luca Gambetti (lucagambetti) wrote :

I confirm this bug, had the same problem & reproduced the same procedure.

Revision history for this message
Mussolini (w-g) wrote :

Same with me. NTP always worked with Gutsy beta versions, but after new installation of kubuntu Gutsy 7.10 no sync possible. switching to IPv4 and editing config files changed nothing.

Revision history for this message
Sergei Genchev (sgenchev) wrote :

 I confirm the bug.

 Default ntp.conf in gutsy has `nomodify` set for all hosts. This will prevent ntpd from synchronizing time with these hosts. Either default options should be changed or GUI should add saner options for the time servers it adds. Presumably then people who edit ntp.conf by hand should be able to figure this out by themselves.
 To Fred - `ntpdate` requires a time source as a parameter. Always had. ntpdate-debian is a wrapper script that tries to parse ntp.conf, get time sources from there and call ntpdate with the server name/IP from ntp.conf.

Revision history for this message
djchainz (djchainz-deactivatedaccount) wrote :

I confirm as well, removing "nomodify" fixes it.

Revision history for this message
Juan Pablo (javello) wrote :

I confirm as well. Running ntpdate-debian works.

Revision history for this message
Fred (frederic-lespez) wrote :

Sergei Genchev : Thanks for the clarification about ntpdate-debian.

Confirming that removing "nomodify" fixes it.
In Hardy alpha 2, Default ntp.conf also has `nomodify` set for all hosts.

Fred (frederic-lespez)
Changed in ntp:
status: New → Confirmed
Revision history for this message
purplerhino (dhitchcock-awn) wrote :

I confirm bug, not fix. Removing nomodify from everywhere in my ntp.conf did not fix anything, after I reboot, ntpd is running but ntpq -p still returns: "No association ID's returned", same as it did when nomodify was in there.

My gentoo box has nomodify in it's ntp.conf on the default, and it always has and continues to still work fine.

The strange thing is, if I just manually restart ntpd, then it'll connect and work fine, ntpq -p will actually show me connected to the server. So it's just the first run on boot up that's messed up.

Revision history for this message
purplerhino (dhitchcock-awn) wrote :

still a bug, but real fix here: http://ubuntuforums.org/archive/index.php/t-592958.html
"
go to

system->network settings->wired network

press 'properties'

deselect 'Enable roaming mode' and for configuration choose 'automatic configuration (DHCP)'
"

Revision history for this message
Mjpatey (mjpatey) wrote : Re: [Bug 157608] Re: Adjust Time -> Sync with Internet Time Servers never syncs.

The -nomodify change had no effect on my system as well.

I just tried ntpq -p like you did, and its initial response was "ntpq: read:
Connection refused". On a hunch, I then started ntpd by typing its name as
root with no switches. Then, ntpq -p returned a list of 5 servers and their
associated stats.

And now, after being behind by 11 minutes and continuing to creep, my Ubuntu
time is roughly in sync with my cell phone. :-)

The second suggested fix (involving wired LAN settings) is not viable for
me, as using DHCP would cause more problems than it would fix. My network
is very happy with its static IP addresses!

Thanks for the insight, and I do hope this gets fixed at least by Hardy's
final release. Do fixes like this also get applied back to previous
versions (i.e., Gutsy)?

-Mark

>
> deselect 'Enable roaming mode' and for configuration choose 'automatic
> configuration (DHCP)'
> "
>
> --
> Adjust Time -> Sync with Internet Time Servers never syncs.
> https://bugs.launchpad.net/bugs/157608
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Giovanni Bajo (giovannibajo) wrote :

Confirmed, and removing "nomodify" (+ /etc/init.d/ntp restart) worked for me.

Revision history for this message
Doug Holton (edtechdev) wrote :

My time is an hour off now that daylight savings time started, and I can't adjust the time manually and still sync with a time server.

Revision history for this message
Spuerhund (spuerhund) wrote :

I confirm this bug. Disabling "roaming mode" on all interfaces didn't solve the problem. After i do "sudo /etc/init.d/ntp restart" it works like a charm.

Revision history for this message
Crao (come-desplats) wrote :

You can add this line to the file /etc/ntpd.conf to see what happen :
logfile /var/log/ntpd

On my Gutsy, I see an error like that :
 1 Apr 08:48:25 ntpd[5642]: couldn't resolve `fr.pool.ntp.org', giving up on it

Because when ntpd starts, the eth0 interface is not yet started (because of dhcpd), so ntpd just gives up...

Revision history for this message
Dimitrios Symeonidis (azimout) wrote :

I confirm this.

- My /etc/ntp.conf file has the nomodify parameters you described above.
- I added "logfile /var/log/ntpd" to /etc/ntp.conf, and I uncommented the statsdir line.
- ntpdate tells me "no servers can be used, exiting".
- "sudo ntpdate ntp.ubuntu.com" tells me "the NTP socket is in use, exiting".
- My /var/log/ntpd logfile does include the "could not resolve ... giving up" line
- After a "sudo /etc/init.d/ntp restart" I get:
 5 Jun 17:43:58 ntpd[2769]: synchronized to 91.189.94.4, stratum 2
 5 Jun 17:43:58 ntpd[2769]: time reset +0.136732 s
 5 Jun 17:43:58 ntpd[2769]: kernel time sync status change 0001

By the way, the part about roaming mode doesn't make sense to me: If you're connected, you're connected.

Revision history for this message
Dimitrios Symeonidis (azimout) wrote :

Ok, let's pick this up again:

if I run "grep 'time reset' /var/log/ntpd" I get:
 5 Jun 17:43:58 ntpd[2769]: time reset +0.136732 s
11 Jun 11:18:39 ntpd[4993]: time reset +1.469716 s
12 Jun 10:56:34 ntpd[5080]: time reset +0.308096 s
15 Jun 13:22:48 ntpd[4957]: time reset +0.855029 s
17 Jun 10:27:13 ntpd[5171]: time reset +0.143075 s
18 Jun 09:56:47 ntpd[5104]: time reset +0.509730 s
26 Jun 09:56:58 ntpd[5026]: time reset +2.834653 s
27 Jun 10:03:12 ntpd[5131]: time reset +0.234493 s
30 Jun 09:39:08 ntpd[4896]: time reset +1.213153 s
 1 Jul 10:31:17 ntpd[5029]: time reset +0.789866 s
 3 Jul 04:34:55 ntpd[4950]: time reset +0.190097 s
 4 Jul 09:31:47 ntpd[5058]: time reset +0.180042 s
 7 Jul 09:54:03 ntpd[5029]: time reset +1.152314 s
 8 Jul 09:58:35 ntpd[5032]: time reset +0.316911 s

So my system does correct the clock... The only server I have under /etc/ntp.conf is ntp.ubuntu.com

However, in my log file I also have lines with "couldn't resolve `ntp.ubuntu.com', giving up on it", from what I can tell it's when I'm at home, so maybe my router is blocking the ntp packets...

I suggest that all add the "logfile /var/log/ntpd" line in /etc/ntp.conf, so we can have a better idea of what's going on...

Revision history for this message
Dimitrios Symeonidis (azimout) wrote :

lots of noise

Changed in ntp:
status: Confirmed → New
Revision history for this message
Dimitrios Symeonidis (azimout) wrote :

To understand the 'nomodify' parameter, read this:
http://support.ntp.org/bin/view/Support/AccessRestrictions
It has to do with (not) modifying the settings, not with synchronizing the time...

Revision history for this message
Hew (hew) wrote :

Is this still an issue with the latest Ubuntu release, Hardy Heron? If it is, please enable "statsdir /var/log/ntpstats/" in your /etc/ntp.conf and attach the relevant logs here. Thanks in advance.

Changed in ntp:
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Fred (frederic-lespez) wrote :

In Hardy (up-to-date), it works now without any modification.

Revision history for this message
Hew (hew) wrote :

This bug report is being closed due to your last comment regarding this being fixed with an update. For future reference you can manage the status of your own bugs by clicking on the current status in the yellow line and then choosing a new status in the revealed drop down box. You can learn more about bug statuses at https://wiki.ubuntu.com/Bugs/Status . Thank you again for taking the time to report this bug and helping to make Ubuntu better. Feel free to submit any future bugs you may find.

Changed in ntp:
status: Incomplete → Invalid
Revision history for this message
chrone (chrone81) wrote :

i confirm this bug is still here with ubuntu 8.04.4 server i386 with the latest update up to this date. i use bind9 to my dns set to 127.0.0.1 and i use static ip address in the /etc/network/interfaces on eth0.

i believe by the time the ntp daemon tried to connect to ntp.ubuntu.com, it could not resolve the server, thus it failed and produced this line when executed "ntpq -d": No association ID's returned. perhaps the ntp got loaded first than the network interface and bind9 services.

Revision history for this message
chrone (chrone81) wrote :
Revision history for this message
chrone (chrone81) wrote :

sorry, i don't know how to do multiple attaching here.

Revision history for this message
chrone (chrone81) wrote :

i'm sorry, the command line is suppose to be ntpq -p.

Revision history for this message
Gonzals, S. (gonzales-speedy) wrote :

This problem seems to persist in quantal quetzal,

cmdline:
# ntpdate
13 Feb 12:22:21 ntpdate[30089]: no servers can be used, exiting

syslog:
Feb 13 12:08:49 hostname ntpdate[1245]: no servers can be used, exiting
Feb 13 12:08:49 hostname ntpd[1295]: ntpd 4.2.6p3@1.2290-o Mon Aug 20 14:49:15 UTC 2012 (1)
Feb 13 12:08:49 hostname ntpd[1301]: proto: precision = 0.978 usec
Feb 13 12:08:49 hostname ntpd[1301]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16
Feb 13 12:08:49 hostname ntpd[1301]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
Feb 13 12:08:49 hostname ntpd[1301]: Listen and drop on 1 v6wildcard :: UDP 123
Feb 13 12:08:49 hostname ntpd[1301]: Listen normally on 2 lo 127.0.0.1 UDP 123
Feb 13 12:08:49 hostname ntpd[1301]: Listen normally on 3 lo ::1 UDP 123
Feb 13 12:08:49 hostname ntpd[1301]: peers refreshed
Feb 13 12:08:49 hostname ntpd[1301]: Listening on routing socket on fd #20 for interface updates
Feb 13 12:08:49 hostname ntpd[1301]: Deferring DNS for 0.ubuntu.pool.ntp.org 1
Feb 13 12:08:49 hostname ntpd[1301]: Deferring DNS for 1.ubuntu.pool.ntp.org 1
Feb 13 12:08:49 hostname ntpd[1301]: Deferring DNS for 2.ubuntu.pool.ntp.org 1
Feb 13 12:08:49 hostname ntpd[1301]: Deferring DNS for 3.ubuntu.pool.ntp.org 1
Feb 13 12:08:49 hostname ntpd[1301]: Deferring DNS for ntp.ubuntu.com 1

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.