[ntp:questions] in pool, my server runs for days, crashes with no log

Dennis Hilberg, Jr. timekeeper at dennishilberg.com.invalid
Tue Nov 6 06:52:02 UTC 2007


fishtop_records wrote:
> But I've got a bigger problem.
> The normal /etc/rc.d/init.d/ntpd script is not working.
> if I run the ntpd program from a shell, it runs fine.
> (It takes a fairly long time to start and detach from the shell, maybe
> a full minute or more)
> 
> if I start it the usual Mandriva way,
> /etc/rc.d/init.d/ntpd start
> it says it succeeds, but a minute, checking the status fails.
> 
> [root at dmz log]# /etc/rc.d/init.d/ntpd status
> ntpd dead but subsys locked
> 
> I see no errors in either the /var/log/syslog or the /var/log/ntp/
> ntpd.log
> 
> While its OK to start it by hand for now, its bad form. What can I do
> to see why it won't stay up?

I had a similar problem with the same version of ntp (4.2.0) on a Mandriva 
2007.0 system.  I did what you did, tried to use the Mandriva startup script 
for the reference implementation and it didn't work very well, for whatever 
reason.  I never figured it out.  The startup script was set up to run 
'ntpdate' on boot and right at ntpd startup via a host in the 'step-tickers' 
file.

All of that is pointless anyway if you use the '-g' option when starting 
ntpd, which allows for an initial large adjustment.

I ended up abandoning the Mandriva distribution of ntp a while back and now 
only use the reference implementation from www.ntp.org .

For my startup script, it's just:

ulimit -l 8192

/usr/local/bin/ntpd \
         -c /etc/ntp.conf \
         -p /var/run/ntpd.pid -g

I would get rid of all traces of the Mandriva ntp: '# urpme ntp'.  Make sure 
you don't have the OpenNtpd installed either: '# urpme ntpd'.  Then install 
the reference implementation and create a simple startup script like mine. 
Finally, create a basic ntp.conf if you don't already have one:

restrict default kod nopeer nomodify notrap
restrict 127.0.0.1

server hostname.1.domain iburst
server hostname.2.domain iburst
server hostname.3.domain iburst
server hostname.4.domain iburst

driftfile /var/lib/ntp.drift
logfile /var/log/ntp/ntp.log

statsdir /var/log/ntp/
statistics loopstats peerstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable

Since your server is in the pool, don't configure it with pool servers as 
synchronization sources.  Find some good stratum twos from 
http://support.ntp.org/bin/view/Servers/StratumTwoTimeServers that are not 
part of the pool project.

Hope that helps,

-- 
Dennis Hilberg, Jr.      timekeeper(at)dennishilberg(dot)com
NTP Server Information:  http://saturn.dennishilberg.com/ntp.php




More information about the questions mailing list