[lug] ntp bug in SuSE v9.0?

Gary Hodges Gary.Hodges at noaa.gov
Thu Dec 4 09:06:04 MST 2003


Revisiting the ntp issue I first posted about before Thanksgiving...

At the time I thought I got it going with the suggestion from lug to 
restart ntpd.  After the holiday break I checked the logs and found that 
I was getting the same error:

3 Dec 13:32:41 ntpd[2279]: can't open /var/lib/ntp/drift/ntp.drift.TEMP: 
No such file or directory

Yesterday our group's computer consultant stopped by and we looked at 
this issue.  For perspective, here is the error pattern you would get 
from a ntpd restart:

25 Nov 15:02:27 ntpd[3623]: ntpd exiting on signal 15
25 Nov 15:02:26 ntpd[3867]: running as uid(74)/gid(65534) 
euid(74)/egid(65534).
25 Nov 15:05:52 ntpd[3867]: time set 0.000000 s
25 Nov 15:05:52 ntpd[3867]: synchronisation lost
25 Nov 16:02:26 ntpd[3867]: can't open 
/var/lib/ntp/drift/ntp.drift.TEMP: No such file or directory
25 Nov 17:02:26 ntpd[3867]: can't open 
/var/lib/ntp/drift/ntp.drift.TEMP: No such file or directory
25 Nov 18:02:26 ntpd[3867]: can't open 
/var/lib/ntp/drift/ntp.drift.TEMP: No such file or directory

After much digging around yesterday, and a translated page or two using 
babelfish, we (and by we I mean Paul our consultant) finally discovered 
what appears to be a config typo.  That's what I am calling it anyway.  
The driftfile line from /etc/ntp.config is:

driftfile /var/lib/ntp/drift/ntp.drift

The following shows the typo:

space:/var/lib/ntp # pwd
/var/lib/ntp
space:/var/lib/ntp # ls -l
drwxr-xr-x    2 ntp      nogroup        80 2003-12-04 08:59 drift
drwxr-xr-x    2 root     root          104 2003-11-20 12:37 etc
drwxr-xr-x    4 root     root           96 2003-11-12 16:15 var
space:/var/lib/ntp # ls -l var/lib/
lrwxrwxrwx    1 root     root            4 2003-11-12 16:15 BADntp -> ../.
lrwxrwxrwx    1 root     root            5 2003-12-03 17:49 ntp -> ../..

Notice that BADntp is a link to ../. while the fix links to ../..  
That's two dots after the slash.  I'm unclear on the reason, but the 
explanation we found on the German message board said there was a call 
to chroot() that was not relative to the path.  I'm looking at the 
babelfish translation and it's a bit murky.  In any case, after making 
that change and restarting ntpd it finally is working.  Here is the log 
from the restart of ntpd last night:

3 Dec 20:59:52 ntpd[9602]: ntpd exiting on signal 15
3 Dec 20:59:50 ntpd[10069]: running as uid(74)/gid(65534) 
euid(74)/egid(65534).
3 Dec 20:59:50 ntpd[10069]: frequency initialized 0.000 from 
/var/lib/ntp/drift/ntp.drift
3 Dec 21:03:01 ntpd[10069]: kernel time discipline status change 41

I guess this is a bug, right?  Clearly I couldn't get ntp to work with 
the instructions SuSE provided in the manual.  I am surprised we only 
found the one reference to this on a German message board.  Shouldn't 
other people be running into this same problem?  Is this something I 
should report to SuSE? 

Cheers,
Gary




More information about the LUG mailing list