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/or 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.

Appliances

An appliance can be time synchronized using either the set up commands explained in Initial Set Up, or using the clock synchronization CLI commands 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.

:  If you need to reset the clock synchronization protocol to NTP, use the command solace(configure/clock/synchronization)# no protocol

Software Event Brokers

Software event broker clocks can be synchronized with one of the three methods shown in the following list.

:  With the PubSub+ AWS AMI, clock synchronization is preconfigured to use AWS time servers. Use chronyd to change the clock server.

  1. In your hypervisor or cloud environment:

    Use DHCP to configure NTP. This requires no host configuration.

  2. For software event broker machine images:

    Set up NTP through the event broker host.

    To do so, perform the following steps:

    1. Log into your event broker's host as the root user.
    2. Edit the /etc/ntp.conf file and enter the following configuration.

      tinker panic 0
      disable monitor
      restrict default ignore
      restrict 127.0.0.1
      restrict ::1
      server <server-ip>
      restrict <server-ip>

    3. Enable ntpd.
    4. systemctl enable ntpd

    5. Then reboot the event broker.
    6. reboot

    7. In the event broker host shell, enter the following command to check whether the NTPD status is working:

      systemctl status ntpd

      In the displayed output, to confirm ntpd is active, check for a line that looks like this:

      "Active: active (running)" portion.

    8. Once NTPD is confirmed active, wait several minutes and enter the following command to verify that the event broker is now in sync.

      ntpstat

      In the displayed output, to confirm that the event broker is in sync, check the output for a line that looks like this:

      synchronised to NTP server (192.168.40.80) at stratum 3

  3. Use Cloud-Init:

    Set up NTP with the same configuration information provided in steps 2.2 and 2.3 above.