Child pages
  • Setting Up NTP for ClustrixDB on CentOS

This is documentation for a previous version of ClustrixDB. Documentation for the latest version can be found here

Skip to end of metadata
Go to start of metadata

As of Clustrix v7.0, the installation process will include installation and basic configuration of NTP. To ensure that NTP is up and running, please follow the steps outlined in Step #10 below.


ClustrixDB needs system clocks to be in sync for a number of reasons. The logs on each node use each system's clock to record events, so if all the clocks are in sync, it is much easier to diagnose issues and create timelines. Synchronized Clocks are also required for software upgrades and the system will generate alerts if the clocks skew too much between nodes in a cluster.

To ensure that clocks are in sync between nodes, an ntp client should be configured on each node of the cluster. This example shows output from a single node. When running clx commands you will see result output from each node. It is important to verify that each node successfully returns the expected output.


This setup procedure assumes that the clx tool is able to properly authenticate between nodes. If this is not functioning, you must get this working before continuing. You can test this by running the following command: 

/opt/clustrix/bin/clx cmd 'date'

And verify that each node returns a value.

For more information on setting up internode communication see: Internode Administrative Connectivity via Ethernet.

Setting Up NTP on CentOS

SSH to any of the nodes as root and run the following commands:

  1. Assuming ntp & ntpdate are not already installed:

    /opt/clustrix/bin/clx cmd 'yum -y install ntp ntpdate'
  2. If the default ntp servers are not accessible, add one(s) that are.

    edit /etc/ntp.conf to add the line: server <your_ntp_server_hostname_or_ip> 

    Example: server 

  3. If you modified /etc/ntp.conf in step 2, copy this file to all of the nodes in your cluster:

    /opt/clustrix/bin/clx push /etc/ntp.conf /etc/ntp.conf
  4. Run the following to synchronize clocks:

    /opt/clustrix/bin/clx cmd 'ntpd -qd'


    {nid: 1, hostname: <hostname>, ip:}
    ntpd [email protected] Sat Nov 23 18:21:48 UTC 2013 (1)
     5 Mar 11:33:09 ntpd[2344]: proto: precision = 0.133 usec
     5 Mar 11:33:09 ntpd[2344]: c01d 0d kern kernel time sync enabled
    event at 0 c01d 0d kern kernel time sync enabled
    Finished Parsing!!
    clock_update: at 7 sample 7 associd 11991
     5 Mar 11:33:16 ntpd[2344]: ntpd: time slew +0.009775 s
    ntpd: time slew +0.009775s
  5. Set ntp to start as a regular service:

    /opt/clustrix/bin/clx cmd 'chkconfig ntpd on'
  6. Confirm it’s set correctly on all nodes:

    /opt/clustrix/bin/clx cmd 'chkconfig --list ntpd'


    {nid: 1, hostname: <hostname>, ip:}
    ntpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
  7. Start the ntp service:

    /opt/clustrix/bin/clx cmd '/etc/init.d/ntpd start'


    {nid: 1, hostname: <hostname>, ip:}
    Starting ntpd: [ OK ]
  8. Confirm that the service is running with: 

    /opt/clustrix/bin/clx cmd 'ps aux | grep ntp'

    Look for:

    ntpd -u ntp:ntp -p /var/run/ -g
  9. Confirm date/time is in sync with:

    /opt/clustrix/bin/clx cmd 'date'


    {nid: 1, hostname: <hostname>, ip:}Mon Mar 3 16:35:27 PST 2014
  10. Confirm ntp is running properly with:

    /opt/clustrix/bin/clx cmd 'ntpstat'


    {nid: 1, hostname:, ip:}
    synchronised to NTP server ( at stratum 4
     time correct to within 1005 ms
     polling server every 64 s

    Example of ntp not running properly:

    {nid: 1, hostname:, ip:}
    Unable to talk to NTP daemon. Is it running?


  • No labels