djjazz
Posts: 26
Joined: Fri Jan 18, 2013 8:12 pm

Date still at May. NTPD failure?

Tue Jun 04, 2013 8:42 pm

After quite some time without a problem my system time did not update anymore. It sticked to May 25. Today downloaded a clean image and did all the upgrades but I still have the same issue:

Code: Select all

pi@raspberrypi / $ date
Sun May 26 01:12:25 CEST 2013
The raspbian is connected via LAN to the internet and I see any issues with the connection. At least for the new image I did no changes to /etc/ntp.conf

Can anyone help?
Thanks
DJ

User avatar
rpdom
Posts: 15232
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Date still at May. NTPD failure?

Wed Jun 05, 2013 5:55 am

Ok, first step is to check that you can get to an NTP server and when it was last updated.

Code: Select all

sudo ntpq -p
Should list out all NTP servers that you have got configured and various values including when they were last accessed.

Please post the results of that command and we can check them and give more advice :)

djjazz
Posts: 26
Joined: Fri Jan 18, 2013 8:12 pm

Re: Date still at May. NTPD failure?

Wed Jun 05, 2013 6:41 pm

Thanks for taking this up. Here are the results:

Code: Select all

pi@weather ~ $ sudo ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 fritz.box       .INIT.          16 u    - 1024    0    0.000    0.000   0.000
fritz.box is my router. Strange. Any hint?

djjazz
Posts: 26
Joined: Fri Jan 18, 2013 8:12 pm

Re: Date still at May. NTPD failure?

Wed Jun 05, 2013 7:10 pm

I was configuring the fresh image and at once the current date and time was set:

Code: Select all

pi@weather ~ $ sudo ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 fritz.box       130.149.220.70   3 u   29   64  170    1.227  -3937.2 4273.67
Strange to me. Shouldn't this happen at boot? This was happing while I was working...

User avatar
rpdom
Posts: 15232
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Date still at May. NTPD failure?

Thu Jun 06, 2013 5:55 am

It is quite common for routers to act as a local time server on a network and sync itself to one or more external servers. That way the local machine all sync to the same server so their clocks will be in sync with each other as well, with no delays. It also cuts down on the amount of external traffic and loading on external time servers.

I don't know why your Pi is taking so long to do its initial time sync though. Mine normally sync fairly quickly. About 2 minute after power on

The date going back to May would be because fake-hwclock isn't updating its data file with the current time for some reason. I think it is supposed to do that at 17 minutes past each hour. If it doesn't get updated then the system will use the old time from that file to set the linux clock until a proper time is provided by ntp.

djjazz
Posts: 26
Joined: Fri Jan 18, 2013 8:12 pm

Re: Date still at May. NTPD failure?

Thu Jun 06, 2013 7:18 am

I was not aware my router is acting as a time server. I will turn this off (I should be able to survive the extra traffic) and see sync of time is done quicker by then.

Return to “Raspbian”