centerclick / feedback

Issues, Bug Reports, and Feature Requests
7 stars 0 forks source link

SNTP Fails several times #105

Closed jonathansm closed 11 months ago

jonathansm commented 11 months ago

When I query using SNTP, I get four failed attempts and the 5th one works. Maybe I don't understand whats going on here, but this causes several custom scripts to fail when checking if NTP is up because, typically, it will only hit it once.

~ % sntp 172.25.100.123 sntp: Exchange failed: Server not synchronized sntp_exchange { result: 9 (Server not synchronized) header: E4 (li:3 vn:4 mode:4) stratum: 00 (0) poll: 03 (8) precision: 00 (1.000000e+00) delay: 0000.0000 (0.000000000) dispersion: 0000.0000 (0.000000000) ref: 52415445 ("RATE") t_ref: 00000000.00000000 (0.000000000) t1: E8EC04EB.D2977C88 (3907781867.822623999) t2: E8EC04EB.D2977C88 (3907781867.822623999) t3: E8EC04EB.D2977C88 (3907781867.822623999) t4: E8EC04EB.D2F5A964 (3907781867.824060999) offset: FFFFFFFFFFFFFFFF.FFD0E99200000000 (-0.000718500) delay: 0000000000000000.005E2CDC00000000 (0.001437000) mean: 00000000E8EC04EB.D2977C8800000000 (3907781867.822624207) error: 0000000000000000.0000000000000000 (0.000000000) addr: 172.25.100.123 } sntp: Exchange failed: Timeout sntp_exchange { result: 6 (Timeout) header: 00 (li:0 vn:0 mode:0) stratum: 00 (0) poll: 00 (1) precision: 00 (1.000000e+00) delay: 0000.0000 (0.000000000) dispersion: 0000.0000 (0.000000000) ref: 00000000 (" ") t_ref: 00000000.00000000 (0.000000000) t1: E8EC04EB.D337B8D3 (3907781867.825068999) t2: 00000000.00000000 (0.000000000) t3: 00000000.00000000 (0.000000000) t4: 00000000.00000000 (0.000000000) offset: FFFFFFFF8B89FD8A.1664239680000000 (-1953890933.912534475) delay: FFFFFFFF1713FB14.2CC8472D00000000 (-3907781867.825068951) mean: 0000000000000000.0000000000000000 (0.000000000) error: 0000000000000000.0000000000000000 (0.000000000) addr: 172.25.100.123 } sntp: Exchange failed: Timeout sntp_exchange { result: 6 (Timeout) header: 00 (li:0 vn:0 mode:0) stratum: 00 (0) poll: 00 (1) precision: 00 (1.000000e+00) delay: 0000.0000 (0.000000000) dispersion: 0000.0000 (0.000000000) ref: 00000000 (" ") t_ref: 00000000.00000000 (0.000000000) t1: E8EC04EC.D62F166E (3907781868.836655999) t2: 00000000.00000000 (0.000000000) t3: 00000000.00000000 (0.000000000) t4: 00000000.00000000 (0.000000000) offset: FFFFFFFF8B89FD89.94E874C900000000 (-1953890934.418328047) delay: FFFFFFFF1713FB13.29D0E99200000000 (-3907781868.836656094) mean: 0000000000000000.0000000000000000 (0.000000000) error: 0000000000000000.0000000000000000 (0.000000000) addr: 172.25.100.123 } sntp: Exchange failed: Timeout sntp_exchange { result: 6 (Timeout) header: 00 (li:0 vn:0 mode:0) stratum: 00 (0) poll: 00 (1) precision: 00 (1.000000e+00) delay: 0000.0000 (0.000000000) dispersion: 0000.0000 (0.000000000) ref: 00000000 (" ") t_ref: 00000000.00000000 (0.000000000) t1: E8EC04ED.D91C4B90 (3907781869.848087999) t2: 00000000.00000000 (0.000000000) t3: 00000000.00000000 (0.000000000) t4: 00000000.00000000 (0.000000000) offset: FFFFFFFF8B89FD89.1371DA3800000000 (-1953890934.924043894) delay: FFFFFFFF1713FB12.26E3B47000000000 (-3907781869.848087788) mean: 0000000000000000.0000000000000000 (0.000000000) error: 0000000000000000.0000000000000000 (0.000000000) addr: 172.25.100.123 } +0.010781 +/- 0.048482 172.25.100.123 172.25.100.123

dave4445 commented 11 months ago

Jonathan,

That client is triggering rate limiting on the ntp server. If a client sends too many requests too fast the server will apply limits, you can see the RATE response in the 1st packet.

Generally your ntp/sntp client shouldn't be sending packets more frequently than once every 16 seconds, though a short burst is allowed, but usually only once.

If you cannot change the client, you can setup ACLs on the NTP200/250 to disable rate limiting by client IP address under the https://centerclick.com/ntp/docs/admin_cli#conf_ntp_acls command.