Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NTP keeps soliciting with the Pool Servers #85

Closed
jpylypiw opened this issue Aug 26, 2020 · 7 comments
Closed

NTP keeps soliciting with the Pool Servers #85

jpylypiw opened this issue Aug 26, 2020 · 7 comments

Comments

@jpylypiw
Copy link

In Debian 10 after switching from server to pool directive in /etc/ntp.conf the NTP Client keeps to "Soliciting pool server".
My Monitoring informed me, that NTP "found 4 peers, but none is suitable".
This issue is fixed in Pull Request #84.
After applying the solution mentioned in the PR NTP was working fine.

@stale
Copy link

stale bot commented Nov 24, 2020

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

@stale stale bot added the stale label Nov 24, 2020
@jpylypiw
Copy link
Author

Nope, this issue still exists.
I don't know what I can do to push it, so it will be fixed by @geerlingguy

@stale
Copy link

stale bot commented Nov 24, 2020

This issue is no longer marked for closure.

@ns3777k
Copy link

ns3777k commented Feb 18, 2021

issue still exists. @geerlingguy would be great if you find time to merge and release. thanks

@webarchitect609
Copy link

Today I got this issue and wasted more than 4 hours of my life trying to understand why the hell my clock is 1.5 minutes late while everything is OK! I admit, I'm not familiar with ntpd fine-tuning and very deep understanding. But this is how it was before and after.

OS: Ubuntu 18.04 LTS
timedatectl systemd-timesyncd.service active: no
Pools in /etc/ntp.conf:

pool ntp1.vniiftri.ru
pool ntp2.vniiftri.ru
pool ntp3.vniiftri.ru
pool ntp4.vniiftri.ru
pool ntp1.niiftri.irkutsk.ru
pool ntp2.niiftri.irkutsk.ru

The Symptoms are:

  1. Always unsynchronised and this is true(more than 1m 30s difference with the Russian etalon time from http://www.vniiftri.ru/ )

    $ ntpstat 
    unsynchronised
       polling server every 8 s
    
  2. Endless "Soliciting pool server" in syslog. For example:

    Feb 28 21:25:56 janus-geminus ntpd[24700]: Soliciting pool server 89.109.251.22
    Feb 28 21:26:00 janus-geminus ntpd[24700]: Soliciting pool server 46.254.241.75
    Feb 28 21:26:00 janus-geminus ntpd[24700]: Soliciting pool server 46.254.241.74
    Feb 28 21:26:02 janus-geminus ntpd[24700]: Soliciting pool server 89.109.251.23
    Feb 28 21:26:06 janus-geminus ntpd[24700]: Soliciting pool server 89.109.251.24
    Feb 28 21:26:59 janus-geminus ntpd[24700]: Soliciting pool server 89.109.251.21
    Feb 28 21:27:00 janus-geminus ntpd[24700]: Soliciting pool server 89.109.251.22
    Feb 28 21:27:04 janus-geminus ntpd[24700]: Soliciting pool server 46.254.241.75
    Feb 28 21:27:05 janus-geminus ntpd[24700]: Soliciting pool server 46.254.241.74
    Feb 28 21:27:09 janus-geminus ntpd[24700]: Soliciting pool server 89.109.251.23
    Feb 28 21:27:11 janus-geminus ntpd[24700]: Soliciting pool server 89.109.251.24
    Feb 28 21:28:04 janus-geminus ntpd[24700]: Soliciting pool server 89.109.251.22
    Feb 28 21:28:06 janus-geminus ntpd[24700]: Soliciting pool server 89.109.251.21
    Feb 28 21:28:10 janus-geminus ntpd[24700]: Soliciting pool server 46.254.241.74
    Feb 28 21:28:11 janus-geminus ntpd[24700]: Soliciting pool server 46.254.241.75
    
  3. No MRS entities in peers:

    $ ntpq -p
         remote           refid      st t when poll reach   delay   offset  jitter
    ==============================================================================
     ntp1.vniiftri.r .POOL.          16 p    -   64    0    0.000    0.000   0.000
     ntp2.vniiftri.r .POOL.          16 p    -   64    0    0.000    0.000   0.000
     ntp3.vniiftri.r .POOL.          16 p    -   64    0    0.000    0.000   0.000
     ntp4.vniiftri.r .POOL.          16 p    -   64    0    0.000    0.000   0.000
     ntp1.niiftri.ir .POOL.          16 p    -   64    0    0.000    0.000   0.000
     ntp2.niiftri.ir .POOL.          16 p    -   64    0    0.000    0.000   0.000
    

After applying PR #84 manually I got

  1. synchronised

    $ ntpstat 
    synchronised to NTP server (89.109.251.23) at stratum 2 
       time correct to within 75 ms
       polling server every 64 s
    
  2. Syslog has only 6 "Soliciting pool server" after restarting ntpd half an hour ago:

    Feb 28 21:28:19 janus-geminus ntpd[26461]: ntpd 4.2.8p10@1.3728-o (1): Starting
    ...
    Feb 28 21:28:20 janus-geminus ntpd[26465]: Soliciting pool server 89.109.251.21
    Feb 28 21:28:21 janus-geminus ntpd[26465]: Soliciting pool server 89.109.251.22
    Feb 28 21:28:22 janus-geminus ntpd[26465]: Soliciting pool server 89.109.251.23
    Feb 28 21:28:23 janus-geminus ntpd[26465]: Soliciting pool server 89.109.251.24
    Feb 28 21:28:24 janus-geminus ntpd[26465]: Soliciting pool server 46.254.241.74
    Feb 28 21:28:25 janus-geminus ntpd[26465]: Soliciting pool server 46.254.241.75
    
  3. MRS entities are present

    $ ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
    ==============================================================================
     ntp1.vniiftri.r .POOL.          16 p    -   64    0    0.000    0.000   0.000
     ntp2.vniiftri.r .POOL.          16 p    -   64    0    0.000    0.000   0.000
     ntp3.vniiftri.r .POOL.          16 p    -   64    0    0.000    0.000   0.000
     ntp4.vniiftri.r .POOL.          16 p    -   64    0    0.000    0.000   0.000
     ntp1.niiftri.ir .POOL.          16 p    -   64    0    0.000    0.000   0.000
     ntp2.niiftri.ir .POOL.          16 p    -   64    0    0.000    0.000   0.000
     ntp1.vniiftri.r .MRS.            1 u   32   64    3  109.948  91862.2  30.982
     ntp2.vniiftri.r .MRS.            1 u   32   64    3  109.429  91862.4  50.595
     ntp3.vniiftri.r .MRS.            1 u   30   64    3    6.836  91810.7  11.379
     ntp4.vniiftri.r .MRS.            1 u   32   64    3  112.093  91863.2  34.270
     ntp1.niiftri.ir .MRS.            1 u   28   64    3   67.691  91810.7  41.570
     ntp2.niiftri.ir .MRS.            1 u   27   64    3   73.672  91812.6   1.810
    

danielrobbins pushed a commit to funtoo/kit-fixups that referenced this issue Apr 30, 2021
…FL-8251-ntp-4.2.8_p15-not-synchronizing-clock to master

Squashed commit of the following:

commit e2d740d9dc091a728a14fd071a78a914ae310eb9
Author: Saulius Gurklys <s4uliu5@gmail.com>
Date:   Sat Apr 3 12:12:17 2021 +0300

    FL-8251: fix ntp-4.2.8_p15 clock sync when "pool" is used

    https://bugs.ntp.org/show_bug.cgi?id=2657
    geerlingguy/ansible-role-ntp#85
    geerlingguy/ansible-role-ntp#84
@Sebbo94BY
Copy link

Jesus... This issue has droven me crazy. :D

My syslog (and NTP service) was reporting the error kernel reports TIME_ERROR: 0x41: Clock Unsynchronized, which is not really an error, more an information.

However. The merge request #84, which adds the following line(s)...

# Allow pool associations
restrict source nomodify notrap noquery

...solved my issue, that NTP couldn't synchronize even after some days. :)

# ntpq -pn
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 0.de.pool.ntp.o .POOL.          16 p    -   64    0    0.000    0.000   0.000
 1.de.pool.ntp.o .POOL.          16 p    -   64    0    0.000    0.000   0.000
 2.de.pool.ntp.o .POOL.          16 p    -   64    0    0.000    0.000   0.000
 3.de.pool.ntp.o .POOL.          16 p    -   64    0    0.000    0.000   0.000
+129.70.132.34   129.70.137.82    2 u  122  128  377   11.308    0.064   0.289
-5.145.135.89    70.175.215.2     2 u   60  128  377    9.380    0.381   0.131
*131.188.3.222   .MBGh.           1 u  127  128  377    7.572    0.111   0.249
+131.188.3.221   .DCFp.           1 u  121  128  377    7.420    0.185   0.065
-185.11.138.90   213.172.105.106  3 u   57  128  377    9.091    1.430   0.117
-129.70.132.33   129.70.137.82    2 u   52  256  377   16.921    1.877   0.172

The leap code also changed with this fix from leap_alarm to leap_none. :)

Code Message Description
0 leap_none normal synchronized state
1 leap_add_sec insert second 23:59:59 of the current day
2 leap_del_sec delete second 23:59:59 of the current day
3 leap_alarm never synchronized

Table Source: https://www.cyberciti.biz/faq/linux-unix-bsd-is-ntp-client-working/

# ntpq -c rv
associd=0 status=0615 leap_none, sync_ntp, 1 event, clock_sync,
version="ntpd 4.2.8p12@1.3728-o (1)", processor="x86_64",
system="Linux/4.19.0-16-amd64", leap=00, stratum=2, precision=-24,
rootdelay=7.572, rootdisp=7.632, refid=131.188.3.222,
reftime=e4393243.ceb7d4c3  Sun, May  2 2021 16:14:27.807,
clock=e43932c3.66b7b782  Sun, May  2 2021 16:16:35.401, peer=13095, tc=7,
mintc=3, offset=0.124962, frequency=35.609, sys_jitter=0.081052,
clk_jitter=0.538, clk_wander=0.007

The above fix has been merged and released to the version 2.3.0 13 days ago, so simple update this role in your Ansible project:

$ ansible-galaxy install geerlingguy.ntp --force
- changing role geerlingguy.ntp from 2.2.0 to unspecified
- downloading role 'ntp', owned by geerlingguy
- downloading role from https://github.com/geerlingguy/ansible-role-ntp/archive/2.3.0.tar.gz
- extracting geerlingguy.ntp to /etc/ansible/roles/geerlingguy.ntp
- geerlingguy.ntp (2.3.0) was installed successfully

I guess this issue can be closed now @geerlingguy @jpylypiw .

@jpylypiw
Copy link
Author

jpylypiw commented May 2, 2021

Thank you for investigating further 👍
I will close the issue now.

@jpylypiw jpylypiw closed this as completed May 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants