I am trying to sync a Ubuntu 20.04 client to a Windows AD time server. But time will never sync. Here is what I know so far:
- Windows server is listening on port 123 for NTP, and replies to requests.
- I am using timedatectl. systemd-timesyncd.service is running.
- Tried to reboot the ubuntu client and AD server
- Make sure ufw was disabled, iptables does not appear to have any entries blocking anything, and its obvious its not as I can see from packet capture.
- Windows Time service appears to be running.
- The following output I found from trouble shooting:
$ journalctl -fu systemd-timesyncd.service
-- Logs begin at Tue 2022-08-16 10:38:00 EDT. --
Jan 11 16:25:51 server.my.domainsystemd-timesyncd[775]: Timed out waiting for reply from 10.200.0.54:123 (10.200.0.54).
Jan 11 16:26:02 server.my.domainsystemd-timesyncd[775]: Timed out waiting for reply from 10.200.0.54:123 (10.200.0.54).
Jan 11 16:27:22 server.my.domainsystemd[1]: Stopping Network Time Synchronization...
Jan 11 16:27:22 server.my.domainsystemd[1]: systemd-timesyncd.service: Succeeded.
Jan 11 16:27:22 server.my.domainsystemd[1]: Stopped Network Time Synchronization.
Jan 11 16:27:22 server.my.domainsystemd[1]: Starting Network Time Synchronization...
Jan 11 16:27:22 server.my.domainsystemd[1]: Started Network Time Synchronization.
Jan 11 16:29:52 server.my.domainsystemd-timesyncd[5926]: Network configuration changed, trying to establish connection.
Jan 11 16:30:05 server.my.domainsystemd-timesyncd[5926]: Network configuration changed, trying to establish connection.
Jan 11 16:32:04 server.my.domainsystemd-timesyncd[5926]: Network configuration changed, trying to establish connection.
$ timedatectl show-timesync --all
LinkNTPServers=
SystemNTPServers=10.200.0.54
FallbackNTPServers=ntp.ubuntu.com
ServerName=10.200.0.54
ServerAddress=10.200.0.54
RootDistanceMaxUSec=5s
PollIntervalMinUSec=32s
PollIntervalMaxUSec=34min 8s
PollIntervalUSec=34min 8s
Frequency=0
$ timedatectl
Local time: Wed 2023-01-11 16:34:14 EST
Universal time: Wed 2023-01-11 21:34:14 UTC
RTC time: Wed 2023-01-11 21:34:14
Time zone: America/New_York (EST, -0500)
System clock synchronized: no
NTP service: active
RTC in local TZ: no
Here is a comparison of response from an extenral NTP server on another host that is working, and the NTP server I am having issues with:
Here are Windows server ntp info (Sorry for screen shots but this is from a console I could not copy it all):
What am I missing? Why is the Windows Server not giving time properly?
EDIT: I deployed a new AD server just to test if time will work. And it does. I had to extend the root distance but it works. The AD in question still does not :(
EDIT2: OK I got it working, but only with an external peer list. Here are the steps I followed:
w32tm /config /manualpeerlist:time.windows.com,0x1 /syncfromflags:manual /reliable:yes /update
w32tm /config /syncfromflags:domhier /update
net stop w32time
net start w32time
- Check
TIMESERV
is listed underFlags
when runningnltest /dsgetdc:your.domain /server:thehostnameofthedcyourdoingthisfrom
- On linux host you must adjust your Root Distance I changed to "30"
vi /etc/systemd/timesyncd.conf
uncomment "RootDistance" and change to "30", save. Then runsystemctl restart systemd-timesyncd.service
This is good news but not sure why CMOS local time does not work still..