[Solved] Custom NTP Server

  • Hi guys,

    I have an issue that I might not understand properly and somebody can help me out with it. I like to use my own NTP Server (Router within the Network) to synchronise the clock of two libreelec installations (raspberry pi - LibreELEC (Leia) v8.90.006 ALPHA and tinkerboard S - daily Jenkins builds). I added under Timeserver #1 the local IP address of my router that is providing the NTP information and left #2 and #3 empty.

    I can see now in my Pi-hole that both libreelec installations still connecting to "something.pool.ntp.org" and I do not understand why, since it suppose to take that information from my local source. It works for all other connected devices in my network except libreelec.

    Maybe I do understand something wrong!?! Would be nice if anybody could point me in the right direction.

    Thanks in advance.

    Edited once, last by Nerd (November 7, 2018 at 6:07 PM).

  • Not too sure why you would want to have your own NTP server, but whatever.

    I would try adding you NTP to #2 and #3 and see if that works. If not then.

    Please provide a full debug log.

    How to post a log (wiki)

    1. Enable debugging in Settings>System Settings>Logging
    2. Restart Kodi
    3. Replicate the problem
    4. Generate a log URL (do not post/upload logs to the forum)

    use "Settings > LibreELEC > System > Paste system logs" or run "pastekodi" over SSH, then post the URL link

    Also output of:

    dmesg | paste

    journalctl | paste

  • I agree. But if there is already a NTP server by your router provided, why not use it.

    Even if I use in all 3 Timeserver fields the same IP address libreelec is still connecting to one of those pool.ntp.org addresses.

    External Content pastebin.com
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

  • connman/connman.git - Connection Manager

    ^ describes how the NTP logic was changed a while ago to resolve issues with Raspberry Pi and NTP calls being made before the network stack was fully active due to slow loading network drivers. It's quite plausible that the first two NTP attempts on Raspberry Pi fail and the third succeeds; which would result in it being marked as the primary active server. The #1, #2, #3 positions no longer dictate which server is primary. Since all RPi are basically the same the 2-fail, 3rd-pass behaviour would be quite consistent.

  • Many thanks - Perfectly explained. Will certainly explain the results I have obtained.

    I guess you could also increase the wait for network timeout.

    So in answer to the original question, if you REALLY need to use you're own NTP server than edit ^^^ connman_main.conf to include just your NTP server. But, I can't see the point, as long as the time is set correctly.

  • Thanks a lot to both of you.

    Yesterday I played around with some NTP server addresses and was wondering about the result as well. Yeah i agree, as long as the time is right. With every other network device, it was quite simple, I just replaced the pre-set NTP to my local IP and it worked. Even the raspberry, that is hosting the Pi-Hole, had no issue with it. So I was wondering what Libreelec is doing different and why it is still sending requests if I asked it not to do so. But the behaviour is well explained by chewitts link and I am happy that I can get it to work if I really need to.

    Thanks.