Upgrade LE 8.2.5 to 9.0.0: Wifi connected but no NTP link => SSL Certificate error !

  • Hello,


    I upgraded my LE from 8.2.5 to 9.0.0. No problem at the reboot.

    I'm connected trough Wifi. The status of the connection is good (DHCP, IP given, online, etc...) but I have bad date and time. So, all SSL connections fail.

    It seems that the first connection to NTP server fails and I don't know why. With LAN, there is no problem.

    And before the upgrade, with version 8.2.5, there was no problem.


    Log file


    I'm on raspberry PI3 B+.


    Someone could help me?

    Edited 3 times, last by Tos26 ().

  • Hello,


    I decided to install LE 9.0.0 from scratch instead of upgrade from 8.2.5.

    And unfortunately, I got the same issue: Wifi connected but NTP error and bad Time and date.


    Is there someone with the same issue ?


    I need help please...

  • Hello again,


    I found the exact same issue than me in this post.


    So, despite the manual change of IP address to IPV4 in the LE settings, the issue remains the same: Libreelec tries to access to NTP server thru IPV6 address. See Log file.


    I begin to believe this is a LE bug, not yet fixed. Maybe Chewitt can give his advice...

  • I'm not sure what the issue is. It would help if you boot with "debugging" added to boot params. This will make connman log output more verbose and the systemd journal should be persisted somewhere (but I forget where). I think we need to get a trace that demonstrates the problem, and then I can nag one of the connman developers to look at it.

  • Thank you Chewitt for your answer.


    I added debugging to boot params in cmdline.txt.

    Here is the log file


    I'm not sure it's enough, I don't know where are the systemd journal and the log of connman in the system.


    Could you tell me if information in the provided log file is relevant ?

  • Tos26 the log is good .. and appears to show connman attempting to connect to 0/1/2/3.pool.ntp.org servers. The DNS record for each host returns multiple A records and each time you query the ordering of A records in the response changes (aka DNS "round robin" load balancing). Connman picks the first entry in the list of A records and makes an NTP request to the server. If it gets no response it goes through the list of NTP servers and repeats. If it completes the entire list, it goes into a retry pattern that waits progressively longer before trying the list again. Eventually it hits "95.81.173.74" from 3.pool.ntp.org which responds and the time is adjusted. It will now continue to use that server unless it fails to get a response (and the process restarts) or you reboot the box (and the process starts again).


    Connman devs modified the ntp workflow in the last year based on feedback we gave about common ntp failures on Pi hardware. I was involved in that and connman is following what I understand to be updated workflow. I can't explain why you get no response from 3-4 ntp servers before finally getting a response. Some ISP's do block NTP but they're not common and it tends to be a "block everything apart from our own server" and this looks to be more random.


    Configure "95.81.173.74" as the only NTP server and reboot. Does that solve (work around) the problem?

  • Hello,


    I restarted my Kodi with NTP server address configured as 95.81.173.74 ==> No time and date sync !! Log file (Lines before the tag Reboot, time 13:11 / 13:12)

    Ping on 95.81.173.74 is correct. However, in the logfile, we find:

    Code
    1. Jun 22 13:12:03 LibreELEC connmand[287]: ../src/timeserver.c:ntp_callback() success 0
    2. Jun 22 13:12:03 LibreELEC connmand[287]: ../src/timeserver.c:sync_next() Using timeserver 95.81.173.74
    3. Jun 22 13:12:03 LibreELEC connmand[287]: ../src/ntp.c:start_ntp() server 95.81.173.74 family 2
    4. Jun 22 13:12:05 LibreELEC connmand[287]: ../src/ntp.c:send_timeout() send timeout 0 (retries 0)
    5. Jun 22 13:12:05 LibreELEC connmand[287]: ../src/ntp.c:send_timeout() send timeout 0 (retries 1)
    6. Jun 22 13:12:05 LibreELEC connmand[287]: ../src/ntp.c:send_timeout() send timeout 0 (retries 2)
    7. Jun 22 13:12:05 LibreELEC connmand[287]: ../src/ntp.c:send_timeout() send timeout 0 (retries 3)
    8. Jun 22 13:12:05 LibreELEC connmand[287]: ../src/timeserver.c:ntp_callback() success 0
    9. Jun 22 13:12:05 LibreELEC connmand[287]: ../src/timeserver.c:sync_next() Resolving timeserver 2.pool.ntp.org


    Here is a summary of my situation:

    1. Kodi 8.2.5:
      • Modem/Router from ISP.
      • Raspberry PI3 B+
      • Ethernet link => NTP OK
      • Wifi => NTP OK
    2. Kodi 9.0.0:
      • Same Modem/Router from ISP.
      • Same Raspberry PI3 B+
      • Ethernet link => NTP OK
      • Wifi => NTP NOK
      • Wifi access point on 4G smartphone => NTP OK.

    It's a big mystery for me, I understand nothing anymore.

  • To save me looking at the debug logfile on a phone .. are you using the onboard Pi wifi or an external dongle?

  • No I don't. I have another Raspberry 3. I don't know if this kind of test is relevant. I can try.

  • Seems your network is just not ready yet.

    What about adding this 2 lines at start of file Autostart.sh [LibreELEC.wiki]

    Code
    1. sleep 5
    2. systemctl restart connman.service

    If it doesn't work try use longer sleep (in seconds).

    Post log.

    Better support for Amlogic devices: use CoreELEC

    Blu-ray Disc Java menus support - forum thread, Github

    my lamp addon (unofficial/community with limited support)
    my touchscreen support and instructions by Grruhn (now touchscreen addon exists in repository)

  • vpeter :

    I added autostart.sh with your code, sleep 5 nok, then sleep 20 nok.


    Here is the log file


    I don't think that's a timing problem, because the time is syncing when I plug the ethernet cable even after one hour but never synced with the wifi, despite the retries.

  • Ok, it was just a try.


    What about

    Code
    1. ntpd -d -d -d -n -p pool.ntp.org

    Also can you run this and post url?

    Code
    1. route -n | pastebinit

    Better support for Amlogic devices: use CoreELEC

    Blu-ray Disc Java menus support - forum thread, Github

    my lamp addon (unofficial/community with limited support)
    my touchscreen support and instructions by Grruhn (now touchscreen addon exists in repository)

  • Result of the first command line:

    And the second one:

    http://ix.io/1bjj

  • As you can see you don't get any response back from NTP server (which listen on port UDP 123). Routing table seems fine. Are you using some firewall? Does any other network action works like curl?

    Code
    1. curl http://libreelec.tv

    As a temporary workaround you could set time like this (from autostart.sh maybe periodically):

    Code
    1. date -s @$(curl -s 'http://timeapi.herokuapp.com/utc/now?\s')

    Better support for Amlogic devices: use CoreELEC

    Blu-ray Disc Java menus support - forum thread, Github

    my lamp addon (unofficial/community with limited support)
    my touchscreen support and instructions by Grruhn (now touchscreen addon exists in repository)

  • Last results:


    No firewall on my side and I hope the new firewall integrated in Libreelec is really disable when Disable is displayed on the interface.

    I have also on my local network an IP camera wifi connected on the same modem/router and the NTP runs normally, so to me, there is no problem with the firewall in the router.


    Command curl is ok.


    here is the last test of ntp server: Time out but ping ok.

    Am I alone with this strange behavior ?


  • Post url for command

    Code
    1. iptables -L -n | pastebinit

    I think you should install system tools addon and capture network traffic to see what is going on.

    Better support for Amlogic devices: use CoreELEC

    Blu-ray Disc Java menus support - forum thread, Github

    my lamp addon (unofficial/community with limited support)
    my touchscreen support and instructions by Grruhn (now touchscreen addon exists in repository)