NTP does not synchronize time on nodes

alexcolin

New Member
Dec 12, 2019
9
1
3
29
México
Just install Proxmox on 3 nodes, and everyone has a different time.

1.- Remove the pads in the following document:
$ cat /etc/systemd/timesyncd.conf

[Time] NTP = time.cloudflare.com FallbackNTP = 0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org 3.debian.pool.ntp.org RootDistanceMaxSec = 5 PollIntervalMinSec = 32 PollIntervalMaxSec = 2048

2.- Restart the service with:
$ systemctl restart systemd-timesyncd.service

● systemd-timesyncd.service - Network Time Synchronization Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled) Drop-In: /usr/lib/systemd/system/systemd-timesyncd.service.d └─disable-with-time-daemon.conf Active: active (running) since Tue 2019-12-17 15:38:59 CST; 1h 15min ago Docs: man: systemd-timesyncd.service (8) Main PID: 837 (systemd-timesyn) Status: "Idle." Tasks: 2 (limit: 4915) Memory: 2.0M CGroup: /system.slice/systemd-timesyncd.service └─837 / lib / systemd / systemd-timesyncd Dec 17 16:15:31 falcon1 systemd-timesyncd [837]: Timed out waiting for reply from 162.159.200.123:123 (time.cloudflare.com). Dec 17 16:49:49 falcon1 systemd-timesyncd [837]: Timed out waiting for reply from 162.159.200.123:123 (time.cloudflare.com). Dec 17 16:49:59 falcon1 systemd-timesyncd [837]: Timed out waiting for reply from 162.159.200.1:123 (time.cloudflare.com).

3.- When requesting status:
$ timedatectl status
Local time: Tue 2019-12-17 17:01:55 CST Universal time: Tue 2019-12-17 23:01:55 UTC RTC time: Tue 2019-12-17 23:01:55 Time zone: America / Mexico_City (CST, -0600) System clock synchronized: no NTP service: active RTC in local TZ: no


Before requesting help in the forum, I exhaust my possibilities.

I thought it would be the Firewall. To my surprise I discovered that the problem is that my ISP (it is an international business network) has blocked the ports for the NTP.

I hope you can help me. Do you know how I can synchronize the time on my nodes? Do you know if there is an alternative?

Note: try to set the manual time, but it is impossible that all three nodes remain the same...


Thanks!
 
Maybe set up a local NTP server. You can get a GPS based NTP server for a reasonable price these days (a few hundred US $). Or perhaps an "international business network" has a server on their network. Seems to be worth asking them.
 
Maybe set up a local NTP server. You can get a GPS based NTP server for a reasonable price these days (a few hundred US $). Or perhaps an "international business network" has a server on their network. Seems to be worth asking them.

How could I mount a local NTP server? Between the 3 nodes (it really is not so important that it is the correct time, it is necessary that it be synchronized).

I really have no idea how to do it.


I noticed:
System clock synchronized: no

maybe this will help:
https://askubuntu.com/questions/105...e-to-network-with-timedatectl-on-ubuntu-18-04

I also use my router for LAN NTP Server...

It is correct, it appears:
System clock synchronized: no

This is because I cannot communicate with NTP servers, because of the blocking of ports that I have from the ISP.
 
How could I mount a local NTP server? Between the 3 nodes (it really is not so important that it is the correct time, it is necessary that it be synchronized).

I really have no idea how to do it.



It is correct, it appears:
System clock synchronized: no

This is because I cannot communicate with NTP servers, because of the blocking of ports that I have from the ISP.

Possible Solution:
https://brainwreckedtech.wordpress....ur-own-ntp-server-when-your-isp-blocks-ports/
 
I have solved it. To be able to have the nodes synchronized without NTP. Find the alternative "HTPDATE" that keeps the time updated by port 80. The time difference is more, less, 0.5 sec only.

All you have to do is:

1.- Turn off the NTP service
# systemctl stop systemd-timesyncd.service

2.-Install htpdate
# sudo apt-get install htpdate

3.- Start the demon with "-D" followed by the domains where time will synchronize.
# htpdate -D www.linux.org www.freebsd.org www.ntp.org

Note: You can find all commands with:
# htpdate -h
 
  • Like
Reactions: psionic

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!