RP3 clock not synchronizing

The time before the first characters on the screen are shown is 3 sec.
The statistics for www.google.com are: round-trip min/avg/max = 40.776/42.024/43.792 ms
The statistics for www.microsoft.com are: round-trip min/avg/max = 33.324/234.727/1035.533 ms
The statistics for www.apple.com are: round-trip min/avg/max = 33.457/36.274/39.054 ms

Further more I have looked if I could change the DNS address of the IP modem, that is not possible because my IP provider secures this. He is the owner of the modem and I rent it from him so certain area are forbidden for me.
Also I can’t change the DNS address by my router.

When I do the ping test on another RaspberryPi3 Wheezy with WLan connection then I get results below:

The statistics for www.google.com are: round-trip min/avg/max = 56.523/58.662/61.197 ms
The statistics for www.microsoft.com are: round-trip min/avg/max = 32.289/34.529/35.377 ms
The statistics for www.apple.com are: round-trip min/avg/max = 33.498/36.516/38.553 ms

The time before the first characters on the screen are shown is less than 1 sec on the Wheezy machine.
The test on the OSMC machine are through SSH.

It’s a network problem on your side.

ping is low, but nameserver lookup may be problematic. You can change DNS servers in My OSMC. I recommend 8.8.8.8 and 8.8.4.4 (both Google).
Sam

Hi Sam,

I changed the primary DNS server in OSMC in 8.8.8.8 as you recommended.
The respons time over SSH, ping www.google.com, is now 5.43 seconds.
I changed the primary DNS server in OSMC back in 10.0.0.138 the IP modem
The respons time over SSH, ping www.google.com, is now 5.48 seconds.

Not really a great difference.

As mentioned before pinging to the same adres, www.google.com, on my Wheezy machine also with a WLan connection gives a respons time below 1 sec on the same network.

I disable the WLan adapter and enabled the Lan connection.
When pinging to www.google.com over SSH, I get a respons time from 5.4 sec.

When I ping on my windows machine to www.google.com, I get a respons in less than a second.

I am still not sure that the problem is my network.

Is there a way to ping directly from the OSMC machine, not through SSH?

If this was an osmc issue, it would be affecting thousands of users, not just you.

Pinging with ssh will make no significant difference than without.

Ping times are measured in milliseconds (ms), not seconds. 5.4 ms is quite within an acceptable range.

Hi ActionA,

The times that I give in my last reply are in seconds, that is the time after I press the enter key and the first charachters are printed on the screen.

I made log files from my old configuration, RPi1 B+, Wlan over WiPi, OSMC 16.1 with a working synchronizing clock. For logfiles see, http://paste.osmc.io/yaluzixuki

When using my RPi3 Wlan configuration I type the command ‘sudo dpkg-reconfigure ntp’ over ssh. Then OSMC replays with an error message ‘update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults’. Is there another way for testing purposes to force OSMC to sync the clock and in that way investigate further more the problem.

Problems with syncing the clock is just a symptom your problem is your DNS response time. So I suggest to start with investigating that.
Install some dnsutils with sudo apt-get install dnsutils
Then run time dig www.google.com

FYI here are my results, as you can see such a request should only take 0m0.094s (9.4 milliseconds)

osmc@osmc:~$ time dig www.google.com

; <<>> DiG 9.9.5-9+deb8u6-Debian <<>> www.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61133
;; flags: qr rd ra; QUERY: 1, ANSWER: 16, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1280
;; QUESTION SECTION:
;www.google.com.            IN    A

;; ANSWER SECTION:
www.google.com.        186    IN    A    58.176.217.103
www.google.com.        186    IN    A    58.176.217.93
www.google.com.        186    IN    A    58.176.217.99
www.google.com.        186    IN    A    58.176.217.84
www.google.com.        186    IN    A    58.176.217.94
www.google.com.        186    IN    A    58.176.217.109
www.google.com.        186    IN    A    58.176.217.98
www.google.com.        186    IN    A    58.176.217.88
www.google.com.        186    IN    A    58.176.217.89
www.google.com.        186    IN    A    58.176.217.113
www.google.com.        186    IN    A    58.176.217.114
www.google.com.        186    IN    A    58.176.217.108
www.google.com.        186    IN    A    58.176.217.119
www.google.com.        186    IN    A    58.176.217.118
www.google.com.        186    IN    A    58.176.217.104
www.google.com.        186    IN    A    58.176.217.123

;; Query time: 2 msec
;; SERVER: 192.168.147.2#53(192.168.147.2)
;; WHEN: Sun Jul 10 16:21:08 HKT 2016
;; MSG SIZE  rcvd: 299


real    0m0.094s
user    0m0.040s
sys    0m0.030s

Ok this are the results from my local DNS server, but even if using an external DNS server I am far below 1s

osmc@osmc:~$ time dig @8.8.8.8 www.google.com

; <<>> DiG 9.9.5-9+deb8u6-Debian <<>> @8.8.8.8 www.google.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15471
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;www.google.com.            IN    A

;; ANSWER SECTION:
www.google.com.        299    IN    A    216.58.197.100

;; Query time: 23 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Sun Jul 10 16:29:35 HKT 2016
;; MSG SIZE  rcvd: 59


real    0m0.118s
user    0m0.030s
sys    0m0.040s

If you have any Quality of Service (QoS) setting on your router, try disabling them and testing the ping times.

Also, are you using a reliable power source? It is recommended to use a 5V 2.5A power source with the RPi3.

Hi fzinken,

I installed the dnsutils pakkage and run the command ‘time dig www.google.com

And this are te results for my router.

So the times lay in your range.

Have you take a look at the log file’s of my RP1 system where the synchronization in working?

In my router and Modem I can’t see any QoS settings, so I think they aren’t used.

I bought a powersupple 5V 2.5A for the RP3 and used that but I get colored squire rectangle on the screen.
I replaced the powersupple for a 5V 2.0A and the colored squire rectangle disappeared.
So I think there is power problem.

Yes, that DNS repsonse time look OK. So is that the “situation” where the start of a ping takes 5 seconds?

Well in the log that you uploaded as “working”

it actually has the same problem.
Jul 10 00:52:54 osmc http-time[293]: Unable to set time using HTTP query - no response received from servers.

Yes, this is the ‘situation’ where the start of a ping takes 5 seconds.

If my RPi1 configuration has the same problem why is it there working for me as user?

Do you have sofware with which I could experiment at the place where you think it went wrong.
Maybe I can search for the correct time delay to wait for?
Are there more systems that use a build in WLan interface just as by the RPi3.
Maybe it is specificly bounded to the RPi3.

Have you tried using MyOSMC to set a static IP address and your other network particulars while also setting DNS servers to 8.8.8.8 and 8.8.4.4 then rebooting and testing for function?

Hallo ActionA,

All the IP addresses are given on MAC address. So they should be static.
I have tested all the combinations that are possible with my modem DNS address, router DNS address and 8.8.8.8 and 8.8.4.4.
The results are the table below.

My default DNS setup is position 9.
Would you be so kind and check the logfile’s if they still reporting some errors in conjunction with the sync problem.

I have some questions that could be answer if you can and will.

1). What can I do to prevent that my router give it’s DNS address to the Wifi adapter as second DNS address.
2). Can I remove the second DNS address from the DNS list.
3). When will the first DNS and when the second DNS address be used.
4). What settings position from the table above would you advice.

When I look at the table than I can see that when the secondary DNS server is 192.168.123.254 the synchronization of the clock does not work. The secondary DNS address should only be used if the primairy DNS server is not accessible. Or am I wrong?