vmware

Troubelshooting NTP on ESXi host.

In some cases ESXi is loosing time sync with windows based Time server.

In some cases flash value is 400 and in that case, NTP client won’t work.

First we need to check ntp assoc using command ntpq -c assoc and based on assid check stats using ntpq

Below outputs are after remediation and flash value is 00 – that means issue NTP is working properly.

If flash=400 then insert a “tos maxdist 30” to /etc/ntp.conf and restart ntp

ref https://kb.vmware.com/s/article/1035833

[root@Witness:~] ntpq -c as
ind assid status  conf reach auth condition  last_event cnt
===========================================================
  1 14989  961a   yes   yes  none  sys.peer    sys_peer  1
[root@Witness:~] ntpq
ntpq> rv 14989
associd=14989 status=961a conf, reach, sel_sys.peer, 1 event, sys_peer,
srcadr=172.23.180.121, srcport=123, dstadr=172.23.180.108, dstport=123,
leap=00, stratum=5, precision=-23, rootdelay=70.358, rootdisp=137.589,
refid=172.23.180.118,
reftime=e5c98d6e.e4338491  Wed, Mar  2 2022  6:30:06.891,
rec=e5c9904a.fa749454  Wed, Mar  2 2022  6:42:18.978, reach=037,
unreach=0, hmode=3, pmode=4, hpoll=6, ppoll=6, headway=19, flash=00 ok,
keyid=0, offset=7.346, delay=0.552, dispersion=438.310, jitter=3.720,
xleave=0.079,
filtdelay=     0.55    0.74    0.78    0.70    0.79    0.00    0.00    0.00,
filtoffset=    7.35    7.12    7.24    6.38   -0.03    0.00    0.00    0.00,
filtdisp=      0.00    1.01    1.98    2.99    3.96 16000.0 16000.0 16000.0

Below you can find values while the issue was occurring.

associd=27366 status=901a conf, reach, sel_reject, 1 event, sys_peer,
srcadr=172.23.180.121, srcport=123, dstadr=172.23.180.105, dstport=123,
leap=00, stratum=5, precision=-23, rootdelay=68.451, rootdisp=7899.643,
refid=172.23.180.118,
reftime=e5c994da.b16bb129  Wed, Mar  2 2022  7:01:46.693,
rec=e5c994ec.854ba036  Wed, Mar  2 2022  7:02:04.520, reach=077,
unreach=0, hmode=3, pmode=4, hpoll=6, ppoll=6, headway=0,
flash=400 peer_dist, keyid=0, offset=-46.479, delay=0.312,
dispersion=188.367, jitter=43.868, xleave=0.033,
filtdelay=     0.31    0.51    0.36    0.32    0.52    0.58    0.00    0.00,
filtoffset=  -46.48  -17.81    0.90    0.58    0.34   -0.11    0.00    0.00,
filtdisp=      0.00    0.98    1.95    2.91    3.87    4.88 16000.0 16000.0

Same settings need to be applied on vcenter appliance

To restart service on vcsa we can use the following commands

service ntpd restart

Leave a comment