Server date & time not being synchronized via NTP

  • I'm having problems on some services using 2FA auth and found out that the reason is my server's clock is wrong. OMV is configured to use NTP and when I just setup, time is being synced. But it is not being auto-synced afterwards. Timedatectl shows the service as inactive. May be a bug? votdev



    Code
    > timedatectl
                   Local time: Mon 2022-01-10 13:48:56 CET
               Universal time: Mon 2022-01-10 12:48:56 UTC
                     RTC time: Mon 2022-01-10 12:48:58
                    Time zone: Europe/Berlin (CET, +0100)
    System clock synchronized: no
                  NTP service: inactive
              RTC in local TZ: no
    • Offizieller Beitrag

    What is the output of:


    systemctl status chrony

    sudo journalctl -u chrony

    omv 7.1.0-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.2 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.5 | scripts 7.0.7


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I have just updated the setting so the output of timedatectl changed to synchronized but still NTP service inactive.


    Code
    > timedatectl
                   Local time: Mon 2022-01-10 14:17:49 CET
               Universal time: Mon 2022-01-10 13:17:49 UTC
                     RTC time: Mon 2022-01-10 13:17:49
                    Time zone: Europe/Berlin (CET, +0100)
    System clock synchronized: yes
                  NTP service: inactive
              RTC in local TZ: no



    Code
    > journalctl -u chrony
    -- Logs begin at Thu 2022-01-06 00:52:18 CET, end at Mon 2022-01-10 14:18:12 CET. --
    Jan 10 14:10:53 NAS systemd[1]: Starting chrony, an NTP client/server...
    Jan 10 14:10:53 NAS chronyd[8104]: chronyd version 3.4 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SIGND +ASYNCDNS +SECHA
    Jan 10 14:10:53 NAS chronyd[8104]: Frequency 2.684 +/- 0.450 ppm read from /var/lib/chrony/chrony.drift
    Jan 10 14:10:53 NAS chronyd[8104]: Loaded seccomp filter
    Jan 10 14:10:53 NAS systemd[1]: Started chrony, an NTP client/server.
    Jan 10 14:10:57 NAS chronyd[8104]: Selected source 217.144.138.234
    Jan 10 14:10:57 NAS chronyd[8104]: System clock wrong by 5.474326 seconds, adjustment started
    Jan 10 14:11:03 NAS chronyd[8104]: System clock was stepped by 5.474326 seconds
    • Offizieller Beitrag

    I have just updated the setting so the output of timedatectl changed to synchronized but still NTP service inactive.

    I wouldn't look at timedatectl. I'm not sure it even knows about chrony. But all of the other output you posted shows chrony is working just fine. You should use chronyc tracking

    omv 7.1.0-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.2 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.5 | scripts 7.0.7


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Hi,

    I'm using OMV 5.6.24-1 and have a very similiar issue.

    My Checkmk warns me that the NTP sync is dead.

    When I change the source for NTP in the GUI it runs once and then never again.



    systemctl status chrony:

    chronyc tracking:

    506 Cannot talk to daemon

    • Offizieller Beitrag

    What is the output of: sudo omv-salt deploy run chrony

    omv 7.1.0-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.2 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.5 | scripts 7.0.7


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Funfact: When I run this command, chrony starts once again (and is now dead).

    sudo omv-salt deploy run chrony:

    • Offizieller Beitrag

    That looks good. What about: systemctl status chrony

    omv 7.1.0-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.2 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.5 | scripts 7.0.7


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Same as before:

    • Offizieller Beitrag

    What are your settings in the Date & Time tab?

    omv 7.1.0-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.2 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.5 | scripts 7.0.7


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    Maybe this:

    Have a look at the thread.


    And are you sure the server is acting as a time server?

    • Offizieller Beitrag

    What is the ouput of systemctl status systemd-timesyncd and systemctl status ntp


    and chronyd -d wait a minute and post the ouput. If you don't get a prompt chrony is running and you can stop it with Ctrl+C

  • systemctl status systemd-timesyncd:

    systemctl status ntp:

    Code
    Unit ntp.service could not be found.

    chronyd -d:

    Code
    2022-02-05T12:36:47Z chronyd version 3.4 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SIGND +ASYNCDNS +SECHASH +IPV6 -DEBUG)
    2022-02-05T12:36:47Z Frequency -42.158 +/- 38.185 ppm read from /var/lib/chrony/chrony.drift
    2022-02-05T12:36:52Z Selected source 131.188.3.223

    Is the condition failed by systemd-timesyncd right?

    BTW: I have the prompt for chronyd -d open, the sync runs, no aborts.

    • Offizieller Beitrag

    Seems like it is the same issue as in the linked thread.

    systemctl disable systemd-timesyncd.service


    Then edit /etc/default/chrony and change DAEMON_OPTS="-F -1" to DAEMON_OPTS=""

    then start chronyd systemctl start chronyd check status systemclt status chronyd

  • Okay, seems to solve the Issue, the service run without aborts.

    I read the linked thraed from you and changed the file, checked apparmor but forget to disable systemd-timesyncd.

    Very sorry about that. Thanks for the help!

    • Offizieller Beitrag

    but forget to disable systemd-timesyncd

    That was not an issue. That is covered by the chrony system file. The important change was the change of the config file.

    Thanks to Zoki who found it in the other thread.

  • macom

    Hat das Label gelöst hinzugefügt.
  • Im running OMV version 6.3.12-1 (Shaitan), on a RPI Linux 6.1.21-v8+

    I've just come across this post looking for a solution to the same problem. I had tried the suggestions above but still see system clock not synchronized and lacking a few minutes behind.

    In the website GUI time zone and NTP server are set (pool.ntp.org - which was default after the installation).


    From the CLI I have the following:


    pi@mininas:~ $ timedatectl status

    Local time: Mon 2023-05-29 19:58:30 EAT

    Universal time: Mon 2023-05-29 16:58:30 UTC

    RTC time: n/a

    Time zone: Africa/Nairobi (EAT, +0300)

    System clock synchronized: no

    NTP service: active

    RTC in local TZ: no


    pi@mininas:~ $ systemctl status chrony

    ● chrony.service - chrony, an NTP client/server

    Loaded: loaded (/lib/systemd/system/chrony.service; enabled; vendor preset: enabled)

    Active: active (running) since Mon 2023-05-29 10:39:52 EAT; 9h ago

    Docs: man:chronyd(8)

    man:chronyc(1)

    man:chrony.conf(5)

    Main PID: 2409 (chronyd)

    Tasks: 1 (limit: 4915)

    CPU: 162ms

    CGroup: /system.slice/chrony.service

    └─2409 /usr/sbin/chronyd


    pi@mininas:~ $ sudo omv-salt deploy run chrony

    mininas:

    ----------

    ID: configure_chrony

    Function: file.managed

    Name: /etc/chrony/chrony.conf

    Result: True

    Comment: File /etc/chrony/chrony.conf is in the correct state

    Started: 20:16:18.345547

    Duration: 152.903 ms

    Changes:

    ----------

    ID: start_chrony_service

    Function: service.running

    Name: chrony

    Result: True

    Comment: The service chrony is already running

    Started: 20:16:18.549958

    Duration: 84.819 ms

    Changes:


    Summary for mininas

    ------------

    Succeeded: 2

    Failed: 0

    ------------

    Total states run: 2

    Total run time: 237.722 ms



    Any help would be much appreciated. Thank you.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!