RP3 clock not synchronizing

Hi all,

I installed yesterday a fresh image of OSMC (OSMC_TGT_rbp2_20160502.img) on a SD card.
After inserting the SD-card in the card-slot I powered the RP3.
The installation took place without error message’s.
I configured the Wifi interface to make contact with my router and the internet.
Then I upgraded OSMC via the internet, using the OSMC interface.
The system upgrade to version Kodi 16.1 (Jun 16 2016)
When I now look via Confluence.Network.Internet it says ‘Internet: Not Connected. Check network settings’ or it says ‘Internet: Busy’.
I can use SSH.
My problem is that the clock is not synchronizing?

How could this problem be cured?

Please take in account that I am new to this platform and Linux, so give command that should be used to get information out of the system.

Regards.

We need to see logs.

To get a better understanding of the problem you are experiencing we need more information, including logs from you. Please see How to submit a useful support request - General - OSMC for advice on how to help us.

Hi ActionA,

I have uploaded the grab-logs -A -C to http://paste.osmc.io/oraromadaw.

Are you connected to network?

Hi ActionA,

Yes, I have an IP address recording Confluence.Network.
But I see that the MAC address sometimes is replaced for the text busy.

Pi does not have a real time clock. It must be connected to the internet to connect to NTP servers which provide current date and time. Sounds like you probably have some kind of networking issue there.

Don’t worry about ‘Busy’. Just means Kodi hasn’t determined Internet connectivity yet.

If the Internet works fine (ping google.com), then no problem.

Hi sam_nazarko,

When I ping google.com over SSH then I get the normal replay. So the internet connection seem to work.

It’s fine then.

I previously used a Raspberry1 B+ with latetst OSMC version installed and a Wireless connection with WiPi stick. With this configuration I did not had the problem. So could it be that the NTP request is to early given in the startup proces. Maybe the Wifi connection is not there when the NTP request is given. I have a second RaspberryPi3 installed with Debian Wheezy and there was the same problem with the sync of the clock. If I connect that system to a LAN than it all works fine. By adding the line ‘sudo dpkg-reconfigure ntp’ at the end of the .bashrc file the problem was solved. Maybe could that also a solution here?

NTP is a daemon, it continuously runs

We also try and set time early via HTTP.

You shouldn’t keep running dpkg-recofigure ntp. It shouldn’t be necessary. It sounds like you may have some networking issue (or NTP may be blocked)

I previously runned the Wheezy version on a Raspberry2 and encounter no problems but the internet connection was made through a LAN connection.

I disabled the Wifi connection and enabled the LAN connection. I get the correct IP address from my router. Then I reboot the system and the clock gets synchronized. I uploaded the new -A -C logfile’s to http://paste.osmc.io/awuzovotiy. Hope this info gets you nearer to the problem.

I disabled the LAN connection again and enabled the WLAN connection. I shutdown the system and waited 10 minutes. Now I booted the system again and the clock is NOT synchronized. Ofcourse I have an internet connection. I get the correct IP address from my router. The new build logfile’s -A -C are uploaded to: http://paste.osmc.io/pekabovila. Hoping this info is helping pinning down the problem.

Not during bootup you dont:

Jul 09 10:42:52 osmc http-time[281]: Unable to set time using HTTP query - no response received from servers.

Definitely something wrong with your network/internet connection as this is in both your logs, even the one where the time does get set. (later, by ntpd)

The http-time service simply tries to use curl to retrieve a web page from google, apple and microsoft to set the time - the message above indicates that it was unable to connect to any of those three sites - with any properly working internet connection there should be no reason why this would fail.

Are you behind a proxy ? Do you have multiple DNS servers configured on OSMC and not all of them are working properly ? If you have multiple DNS servers check with nslookup that all of them are actually working otherwise you may be DNS timeouts.

I am not using a proxy server as far as I know.
I have a router that gets its Gateway 10.0.0.138 and Domain Name Server 10.0.0.138 from my IP modem.
The packet filter, Domain filter and URL blocking filter in my router are all disabled.
The firewall in my IP modem is standard.

Using the command nslookup under Windows10 gives the result:

Default Server: speedtouch.lan
Address: 10.0.0.138

And from your Pi if you try:

ping www.google.com
ping www.microsoft.com
ping www.apple.com

How long does it take to look up the IP of each one ? The http-time script has a 3 second timeout for each curl request so if your DNS takes longer than 3 seconds it will fail to look up the hostnames in the script.

The ping reply for each website took round the 3 seconds. So maybe you need to increse the timeout value.

But less than 4 seconds.

Over three seconds is really really slow to look up a widely used hostname like www.google.com, which should already be cached by your ISP’s DNS server. You should get a response in something like 0.1 seconds.

I’d suggest you try using your ISP’s DNS server directly (or Google DNS) rather than using your router as a DNS forwarder as some routers have really slow and/or unreliable DNS forwarders.

Three seconds is more than long enough to wait - keep in mind it waits 3 seconds for all three domain names, so 9 seconds in total is potentially spent already during startup if it doesn’t get responses, so we have no plans to increase the wait time any further.