Ntpd Service Randomly Inactives

I have a production installation of FreePbx 15 with Asterisk 18.9 as VMware virtual machine. The ntpd service becomes inactive daily and and I have to restart it for the time to be correct.
Can anyone help advise how to troubleshoot the reason for the service becoming inactive.

That sounds like an ntpd virtualisation problem, rather than a FreePBX one. As I remember it, you should run VMWare helpers on the guest, and not enable ntpd. You let the host take responsibility for the guest’s time.

On a real Linux machine, if ntpd goes away, the clock will coast at, approximately, the correct rate, so the time should not diverge greatly from reality.

The odd thing is that I have another freePBX production server VM on a different VMWare host.
Both are setup exactly the same i.e. both hosts are setup with the NTP service running on each host and the same NTP server list setup. The time on both hosts is the same. However, the time on one freePBX server is correct but on the other it changes daily. When I run the ‘service ntpd status’ command it shows as inactive on the machine with the wrong time. When I restart the ntpd service, the time corrects. I can’t see anything else that is causing the issue.

I didn’t think ntpd actually aborted when things misbehaved, but my guess is that VMWare is trying to set the time wrongly. Only one of VMWare and ntpd should have control of the time, and, as VMWare can make time run at a variable rate, it is safest to make Netware be the only one.

ntp (time clients) listen on port udp:123 by default, ntpd (time servers) serve ‘time’ on udp:123
as root

netstat -aunt|grep "123 "
lsof -i:123

can give clues as to maybe ProxMox and the server are stumbling over each other

[root@xxx ~]# netstat -aunt|grep "123 "
udp 0 0*
udp 0 0*
udp 0 0*
udp6 0 0 fe80::250:56ff:fea8:123 :::*
udp6 0 0 ::1:123 :::*
udp6 0 0 :::123 :::*
[root@xxx ~]# lsof -i:123
ntpd 23697 ntp 16u IPv4 3288000 0t0 UDP *:ntp
ntpd 23697 ntp 17u IPv6 3288001 0t0 UDP *:ntp
ntpd 23697 ntp 18u IPv4 3288006 0t0 UDP fbpx-xxx:ntp
ntpd 23697 ntp 19u IPv4 3288007 0t0 UDP fbpx-xxx:ntp
ntpd 23697 ntp 20u IPv6 3288008 0t0 UDP fbpx-xxx:ntp
ntpd 23697 ntp 21u IPv6 3288009 0t0 UDP fbpx-xxx:ntp

Any clues here? Issue is still there. I disabled the NTPD service on the host to test but the ntpd service on freepbx still became inactive the following morning.

● ntpd.service - Network Time Service
Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2024-07-11 04:18:12 BST; 6h ago
Process: 23696 ExecStart=/usr/sbin/ntpd -u ntp:ntp $OPTIONS (code=exited, status=0/SUCCESS)
Main PID: 23697 (code=exited, status=255)

Jul 10 09:39:01 ffbpx-xxx ntpd[23697]: c61c 0c clock_step -3537.078324 s
Jul 10 08:40:04 fbpx-xxx ntpd[23697]: c614 04 freq_mode
Jul 10 08:40:06 fbpx-xxx ntpd[23697]: c618 08 no_sys_peer
Jul 10 08:55:47 fbpx-xxxk ntpd[23697]: c612 02 freq_set kernel -0.161 PPM
Jul 10 08:55:47 fbpx-xxx ntpd[23697]: c615 05 clock_sync
Jul 11 02:19:12 fbpx-xxx ntpd[23697]: 0618 08 no_sys_peer
Jul 11 04:18:12 fbpx-xxx ntpd[23697]: 0617 07 panic_stop -3537 s; set clock manually within 1000 s.
Jul 11 04:18:12 fbpx-xxx systemd[1]: ntpd.service: main process exited, code=exited, status=255/n/a
Jul 11 04:18:12 fbpx-xxx systemd[1]: Unit ntpd.service entered failed state.
Jul 11 04:18:12 fbpx-xxx systemd[1]: ntpd.service failed.

the ntpd on the vm is running slow until it panics and shuts down,

This should be taken to a vmware forum.