<div dir="ltr"><div><div>I've got all of my servers running ntp to sync time, and though most are running fine without a hitch, I seem to have an issue where for some reason the service just doesn't start on some of them.  Same install procedure on all servers.  No errors in syslog or ntp for days, even when server has been rebooted in that time.<br></div><div>The service just isn't running and I don't know why.  I've included the ntp.conf and the init script below.  <br></div><div><br>Any help would be appreciated.<br><br>Thanks,<br>TJ<br><br><span style="font-family:monospace,monospace">##############################################################################################<br></span></div><div><span style="font-family:arial,helvetica,sans-serif"><b>ntp.conf</b></span><span style="font-family:monospace,monospace"><br></span></div><div><span style="font-family:monospace,monospace">##############################################################################################</span><br><br></div><div style="margin-left:40px"><span style="font-family:monospace,monospace"># This file has been modified by adding our two ntp servers. commenting out all the pool servers<br># and redirecting ntp logs to an ntp logfile.  File is distributed via<br># cp.get_file salt command and then the ntp service is restarted via a cmd.run<br>#  -TJ 2015/08/14<br><br><br># /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help<br>driftfile /var/lib/ntp/ntp.drift<br>logfile /var/log/ntpd.log<br><br># Enable this if you want statistics to be logged.<br>#statsdir /var/log/ntpstats/<br><br>statistics loopstats peerstats clockstats<br>filegen loopstats file loopstats type day enable<br>filegen peerstats file peerstats type day enable<br>filegen clockstats file clockstats type day enable<br><br># You do need to talk to an NTP server or two (or three).<br>#server 67.40.67.44 iburst<br><br># <a href="http://pool.ntp.org">pool.ntp.org</a> maps to about 1000 low-stratum NTP servers.  Your server will<br># pick a different set every time it starts up.  Please consider joining the<br># pool: <<a href="http://www.pool.ntp.org/join.html">http://www.pool.ntp.org/join.html</a>><br>#server <a href="http://0.debian.pool.ntp.org">0.debian.pool.ntp.org</a> iburst dynamic<br>#server <a href="http://1.debian.pool.ntp.org">1.debian.pool.ntp.org</a> iburst dynamic<br>#server <a href="http://2.debian.pool.ntp.org">2.debian.pool.ntp.org</a> iburst dynamic<br>#server <a href="http://3.debian.pool.ntp.org">3.debian.pool.ntp.org</a> iburst dynamic<br><br>server <b>[Our central ntp server ip] </b>dynamic prefer<br>server <b>[Our backup ntp server ip] </b>dynamic<br><br><br># Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for<br># details.  The web page <<a href="http://support.ntp.org/bin/view/Support/AccessRestrictions">http://support.ntp.org/bin/view/Support/AccessRestrictions</a>><br># might also be helpful.<br>#<br># Note that "restrict" applies to both servers and clients, so a configuration<br># that might be intended to block requests from certain clients could also end<br># up blocking replies from your own upstream servers.<br># By default, exchange time with everybody, but don't allow configuration.<br>restrict -4 default kod notrap nomodify nopeer noquery<br>restrict -6 default kod notrap nomodify nopeer noquery<br><br># Local users may interrogate the ntp server more closely.<br>restrict 127.0.0.1<br>restrict ::1<br><br># Clients from this (example!) subnet have unlimited access, but only if<br># cryptographically authenticated.<br>#restrict 192.168.123.0 mask 255.255.255.0 notrust<br><br># If you want to provide time to your local subnet, change the next line.<br># (Again, the address is an example only.)<br>#broadcast 192.168.123.255<br><br># If you want to listen to time broadcasts on your local subnet, de-comment the<br># next lines.  Please do this only if you trust everybody on the network!<br>#disable auth<br>#broadcastclient<br></span></div><span style="font-family:monospace,monospace"><br><br><br><br><br><br><br>##############################################################################################<br></span></div><span style="font-family:arial,helvetica,sans-serif"><b>init.d/ntp</b></span><span style="font-family:monospace,monospace"><br></span><span style="font-family:monospace,monospace">##############################################################################################</span><div style="margin-left:40px"><span style="font-family:monospace,monospace"><br>  GNU nano 2.2.6                                                   File: /etc/init.d/ntp                                                                                                             <br><br>#!/bin/sh<br><br>### BEGIN INIT INFO<br># Provides:        ntp<br># Required-Start:  $network $remote_fs $syslog<br># Required-Stop:   $network $remote_fs $syslog<br># Default-Start:   2 3 4 5<br># Default-Stop: <br># Short-Description: Start NTP daemon<br>### END INIT INFO<br><br>PATH=/sbin:/bin:/usr/sbin:/usr/bin<br><br>. /lib/lsb/init-functions<br><br>DAEMON=/usr/sbin/ntpd<br>PIDFILE=/var/run/ntpd.pid<br><br>test -x $DAEMON || exit 5<br><br>if [ -r /etc/default/ntp ]; then<br>        . /etc/default/ntp<br>fi<br><br>if [ -e /var/lib/ntp/ntp.conf.dhcp ]; then<br>        NTPD_OPTS="$NTPD_OPTS -c /var/lib/ntp/ntp.conf.dhcp"<br>fi<br><br><br>LOCKFILE=/var/lock/ntpdate<br><br>lock_ntpdate() {<br>        if [ -x /usr/bin/lockfile-create ]; then<br>                lockfile-create $LOCKFILE<br>                lockfile-touch $LOCKFILE &<br>                LOCKTOUCHPID="$!"<br>        fi<br>}<br><br>unlock_ntpdate() {<br>        if [ -x /usr/bin/lockfile-create ] ; then<br>                kill $LOCKTOUCHPID<br>                lockfile-remove $LOCKFILE<br>        fi<br>}<br><br>RUNASUSER=ntp<br>UGID=$(getent passwd $RUNASUSER | cut -f 3,4 -d:) || true<br>if test "$(uname -s)" = "Linux"; then<br>        NTPD_OPTS="$NTPD_OPTS -u $UGID"<br>fi<br><br>case $1 in<br>        start)<br>                log_daemon_msg "Starting NTP server" "ntpd"<br>                if [ -z "$UGID" ]; then<br>                        log_failure_msg "user \"$RUNASUSER\" does not exist"<br>                        exit 1<br>                fi<br>                lock_ntpdate<br>                start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --startas $DAEMON -- -p $PIDFILE $NTPD_OPTS<br>                status=$?<br>                unlock_ntpdate<br>                log_end_msg $status<br>                ;;<br>        stop)<br>                log_daemon_msg "Stopping NTP server" "ntpd"<br>                start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE<br>                log_end_msg $?<br>                rm -f $PIDFILE<br>                ;;<br>        restart|force-reload)<br>                $0 stop && sleep 2 && $0 start<br>                ;;<br>        try-restart)<br>                if $0 status >/dev/null; then<br>                        $0 restart<br>                else<br>                        exit 0<br>                fi<br>                ;;<br>        reload)<br>                exit 3<br>                ;;<br>        status)<br>                status_of_proc $DAEMON "NTP server"<br>                ;;<br>        *)<br>                echo "Usage: $0 {start|stop|restart|try-restart|force-reload|status}"<br>                exit 2<br>                ;;<br>esac<br></span><br></div><div><br><div style="margin-left:40px"><br></div></div></div>