Synchronizing Clocks with NTP Servers
You can synchronize an event broker’s clock with a networked Network Time Protocol (NTP) server. This is especially helpful for event brokers that are using redundancy and replication. For example, if your event brokers are synchronized with the same NTP server, message expiry times will be consistent across all of them.
The procedure for synchronizing with an NTP server differs for appliances and software event brokers.
At any point, use the show clock
command to display the current date and time on appliances or software event brokers.
Appliances
An appliance can be time synchronized using either the setup commands explained in Initial Setup, or the clock synchronization CLI commands shown below:
enable configure clock synchronization [create|no] ntp-source <host> [no] nts [no] shutdown [no] protocol {ntp | ptp} [no] shutdown
Where:
[create|no] ntp-source <host>
allows you to configure up to eight NTP sources (if you're using NTP).
[no] nts
allows you to enable or disable NTS (Network Time Security) on any or all of these protocols.
[no] protocol {ntp | ptp}
allows you to select the synchronization protocol (NTP or PTP).
Using mixed authentication modes for clock synchronization is not recommended. In scenarios where mixed authentication modes are required (for example, if you have multiple NTP servers where some use authenticated connections with NTS and some do not), Solace uses the chrony implementation of NTP, which uses the mix
mode for authentication selection and favors NTP servers that use authenticated connections with NTS. For more information, see the Chrony Project Documentation.
For appliances using SolOS 10.6.0 or earlier, the ntp-server
command is used as shown below:
solace(configure)# clock solace(configure/clock)# synchronization solace(configure/clock/synchronization)# shutdown solace(configure/clock/synchronization)# protocol ntp solace(configure/clock/synchronization)# ntp-server <ip-addr> solace(configure/clock/synchronization)# no shutdown
Where:
ip-addr
is the IP address or fully qualified domain name (FQDN) of a reachable NTP server.
The no
version of this command, no ntp-server
, removes the NTP server information.
The ntp-server
command configures only one non-authenticated NTP server connection. In this way, it replaces existing configuration (no matter how many sources you have previously configured).
Software Event Brokers
The host operating system must provide an accurate source of time to a software event broker. There are multiple ways to configure time synchronization between hosts connected to a network. The host must be synchronized with the rest of the network for proper operation of the event broker. You can configure this according to corporate wide standards.
With the PubSub+ AWS AMI, clock synchronization is preconfigured to use AWS time servers. Use chronyd
to change the clock server.