Network
NTP
You can synchronize HAProxy ALOHA to a Network Time Protocol (NTP) time server to enhance log accuracy and synchronize the date and time of all instances in a cluster.
The NTP service manages the Linux ntpdate(8) daemon on the HAProxy ALOHA appliance.
Synchronize the date and time regularly Jump to heading
To configure when and how HAProxy ALOHA synchronizes to an NTP server:
-
In the Services tab, click ntp setup.
The current configuration displays.
service ntp force_sync no autostart
service ntp force_sync no autostart
-
Configure the
ntp
service.You can synchronize to an NTP server before starting the NTP daemon, bypass a firewall, or set how often HAProxy ALOHA synchronizes to a server.
See the subsections below.
-
Save the configuration, then restart the
ntp
service. -
To make your changes persistent after a reboot, click the Setup tab. Then click Save under Configuration.
Set the time before starting the NTP daemon Jump to heading
In some cases, you may want to set the clock before starting the ntpdate
daemon.
-
Use the
force_sync
and thesync_servers
directives as follows.Replace the IP address in the example with the IP address of the NTP server you want to synchronize to.
If the NTP server is located beyond a firewall that blocks incoming traffic to privileged ports, use an unprivileged port through the
unpriv_port
directive. For example:service ntp force_sync sync_servers 129.6.15.28 unpriv_port
service ntp force_sync sync_servers 129.6.15.28 unpriv_port
Info
- Specify the IP address of the NTP server, not its FQDN. HAProxy ALOHA does not perform DNS resolution for its internal system.
- This may slow down the boot process.
-
Once you have restarted the ntp service, check which actions took place in the console logs area in the Logs tab.
textNov 22 17:22:51 ALOHA1 user.info admin[2671]: ALOHA1# service 'ntp' 'restart'Nov 22 17:22:51 ALOHA1 user.notice admin[2671]: # Stopping ntpd (pid 32527 according to /var/run/ntp.pid) ...Nov 22 17:22:51 ALOHA1 user.notice admin[2671]: Waiting.Nov 22 17:22:51 ALOHA1 user.notice admin[2671]: --> removing stale pid file ...Nov 22 17:22:51 ALOHA1 user.notice admin[2671]: ==> stop ntpd Done.Nov 22 17:22:51 ALOHA1 user.notice admin[2671]: # Starting ntp ...Nov 22 17:22:51 ALOHA1 user.notice admin[2671]: Using ntpdate to sync with server(s) 129.6.15.28...Nov 22 17:22:57 ALOHA1 user.warn admin[2671]: /usr/sbin/ntpd -c /etc/ntp/ntp.conf -p /var/run/ntp.pid -k /etc/ntp/ntp.keysNov 22 17:22:57 ALOHA1 user.notice admin[2671]: 22 Nov 17:22:57 ntpdate[4419]: adjust time server 129.6.15.28 offset 0.000236 secNov 22 17:22:57 ALOHA1 user.notice admin[2671]: ==> start ntp Done.textNov 22 17:22:51 ALOHA1 user.info admin[2671]: ALOHA1# service 'ntp' 'restart'Nov 22 17:22:51 ALOHA1 user.notice admin[2671]: # Stopping ntpd (pid 32527 according to /var/run/ntp.pid) ...Nov 22 17:22:51 ALOHA1 user.notice admin[2671]: Waiting.Nov 22 17:22:51 ALOHA1 user.notice admin[2671]: --> removing stale pid file ...Nov 22 17:22:51 ALOHA1 user.notice admin[2671]: ==> stop ntpd Done.Nov 22 17:22:51 ALOHA1 user.notice admin[2671]: # Starting ntp ...Nov 22 17:22:51 ALOHA1 user.notice admin[2671]: Using ntpdate to sync with server(s) 129.6.15.28...Nov 22 17:22:57 ALOHA1 user.warn admin[2671]: /usr/sbin/ntpd -c /etc/ntp/ntp.conf -p /var/run/ntp.pid -k /etc/ntp/ntp.keysNov 22 17:22:57 ALOHA1 user.notice admin[2671]: 22 Nov 17:22:57 ntpdate[4419]: adjust time server 129.6.15.28 offset 0.000236 secNov 22 17:22:57 ALOHA1 user.notice admin[2671]: ==> start ntp Done. -
To make your changes persistent after a reboot, click the Setup tab. Then click Save under Configuration.
Define other NTP servers used at runtime Jump to heading
By default, HAProxy ALOHA queries NTP servers from the France
pool zone, https://www.ntppool.org/zone/fr
, from the pool.ntp.org
timeservers project.
To define other servers:
-
In the Services tab, click the [advanced mode] link. Then edit the ntp service.
The content of the
/etc/ntp/ntp.conf
NTP configuration file displays. -
Edit the file, add
server
lines, save the configuration, then restart the ntp service. Configure NTP servers using IP addresses, in case DNS resolvers have not been configured. -
Once you have restarted the ntp service, check which actions took place in the console logs area in the Logs tab.
textNov 22 16:46:18 ALOHA1 user.info admin[2671]: ALOHA1# service 'ntp' 'restart'Nov 22 16:46:18 ALOHA1 user.notice admin[2671]: # Stopping ntpd (pid 29011 according to /var/run/ntp.pid) ...Nov 22 16:46:18 ALOHA1 user.notice admin[2671]: Waiting.Nov 22 16:46:18 ALOHA1 user.notice admin[2671]: --> removing stale pid file ...Nov 22 16:46:18 ALOHA1 user.notice admin[2671]: ==> stop ntpd Done.Nov 22 16:46:18 ALOHA1 user.notice admin[2671]: # Starting ntp ...Nov 22 16:46:18 ALOHA1 user.warn admin[2671]: /usr/sbin/ntpd -c /etc/ntp/ntp.conf -p /var/run/ntp.pid -k /etc/ntp/ntp.keysNov 22 16:46:18 ALOHA1 user.notice admin[2671]: ==> start ntp Done.textNov 22 16:46:18 ALOHA1 user.info admin[2671]: ALOHA1# service 'ntp' 'restart'Nov 22 16:46:18 ALOHA1 user.notice admin[2671]: # Stopping ntpd (pid 29011 according to /var/run/ntp.pid) ...Nov 22 16:46:18 ALOHA1 user.notice admin[2671]: Waiting.Nov 22 16:46:18 ALOHA1 user.notice admin[2671]: --> removing stale pid file ...Nov 22 16:46:18 ALOHA1 user.notice admin[2671]: ==> stop ntpd Done.Nov 22 16:46:18 ALOHA1 user.notice admin[2671]: # Starting ntp ...Nov 22 16:46:18 ALOHA1 user.warn admin[2671]: /usr/sbin/ntpd -c /etc/ntp/ntp.conf -p /var/run/ntp.pid -k /etc/ntp/ntp.keysNov 22 16:46:18 ALOHA1 user.notice admin[2671]: ==> start ntp Done. -
To make your changes persistent after a reboot, click the Setup tab. Then click Save under Configuration.
Set the time and date once Jump to heading
You can manually set the local time and date of your HAProxy ALOHA appliance by synchronizing once with an NTP server or by entering a value.
Caution
This procedure only sets the date and time once. For regularly synchronizing HAProxy ALOHA to an NTP server, configure the NTP service from the Services tab, as shown in the previous sections.
-
In the Date area on the Setup tab, either:
- Enter the IP address of an NTP server.
- Manually enter a time and date.
-
Click Update to set the system clock.
-
Check the updated system time in the Setup tab. The system information should reflect the update to the system time.
You can also check the console logs area in the Logs tab.
textNov 19 15:09:11 ALOHA1 user.notice admin[2671]: 19 Nov 15:09:11 ntpdate[22876]: adjust time server 129.6.15.28 offset -0.000143 secNov 19 15:09:11 ALOHA1 user.info admin[2671]: ALOHA1# service 'system' 'date_to_hw'Nov 19 15:09:12 ALOHA1 user.notice admin[2671]: Saving system time to hardware clock (UTC)... Done.textNov 19 15:09:11 ALOHA1 user.notice admin[2671]: 19 Nov 15:09:11 ntpdate[22876]: adjust time server 129.6.15.28 offset -0.000143 secNov 19 15:09:11 ALOHA1 user.info admin[2671]: ALOHA1# service 'system' 'date_to_hw'Nov 19 15:09:12 ALOHA1 user.notice admin[2671]: Saving system time to hardware clock (UTC)... Done. -
To make your changes persistent after a reboot, click the Setup tab. Then click Save under Configuration.
Do you have any suggestions on how we can improve the content of this page?