Bug 12518 - ntpq -p gives error. a line, "restrict 127.0.0.1" needs to be added in /etc/ntp.conf
Summary: ntpq -p gives error. a line, "restrict 127.0.0.1" needs to be added in /etc/n...
Status: CLOSED FIXED
Alias: None
Product: IPFire
Classification: Unclassified
Component: --- (show other bugs)
Version: 2
Hardware: unspecified Unspecified
: - Unknown - - Unknown -
Assignee: Michael Tremer
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-29 20:14 UTC by paul
Modified: 2020-12-22 10:24 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description paul 2020-10-29 20:14:41 UTC
On a fresh core 151 install, ntpq -p outputs:

[root@ipfire ~]# ntpq -p
localhost.localdomain: timed out, nothing received
***Request timed out

/etc/ntp.conf is missing a line, "restrict 127.0.0.1" after the restrict default

source code shows that such a line should be added after line 87 
https://github.com/ipfire/ipfire-2.x/blob/master/lfs/ntp

with this change, restart ntpd, ntpq -p shows no timeout error.


 
Also, line 85 should be "chown -R root:root /etc/ntp" since at times, this line appears in /var/log/messages  

ntpd[13486]: frequency file /etc/ntp/drift.TEMP: Permission denied
Comment 1 Charles Brown 2020-10-30 13:29:18 UTC
On a related note: the "chown -R ntp:ntp /etc/ntp" on line 85 needs changed so that root can write the /etc/ntp/drift file.  Otherwise you get:
"00:36:12 ntpd[14000]:  frequency file /etc/ntp/drift.TEMP: Permission denied"
when ntp tries to write the drift file.