Koozali.org: home of the SME Server
Obsolete Releases => SME Server 8.x => Topic started by: Michail Pappas on December 30, 2014, 07:21:03 AM
-
Running a stable 8.1 box for some 3 years now. Yesterday I saw there was an update for ntp and after installing I tried to check status with "peers" and "rl" from within the ntpq shell, but I receive only a timeout:
ntpq> peers
localhost: timed out, nothing received
***Request timed out
Additionally, checking the logs up to yesterday, I could not locate any log lines of the form "ntpd[xxx]: synchronized" form.
Furthermore, yesterday I got confused and restarted the ntpd service with /etc/init.d/ntpd restart, resulting:
# /etc/init.d/ntpd restart
Shutting down ntpd: [ OK ]
ntpd: Synchronizing with time server: [FAILED]
Starting ntpd: [ OK ]
config show ntpd:
# config show ntpd
ntpd=service
NTPServer=X.Y.Z.W
SyncToHWClockSupported=yes
status=enabled
It's not an issue of the actual NTP server I'm getting time from:
# sv stop ntpd
ok: down: ntpd: 1s
# ntpdate -q X.Y.Z.W
server X.Y.Z.W, stratum 4, offset -0.000024, delay 0.02608
30 Dec 08:18:29 ntpdate[2461]: adjust time server X.Y.Z.W offset -0.000024 sec
I did find this though, while grep'ing for ntp in /var/log:
secure.20141222011202:Dec 29 08:42:24 myserver useradd[14722]: failed adding user `ntp', data deleted
Seems like a script went wrong, or did I do something bad?
-
Michail: if something isn't working out-of-the-box as expected, bugzilla is right there.. thank you
-
Seems like a script went wrong, or did I do something bad?
As per Stefano's advise, please add it to the bugtracker, including what you see in /var/log/messages and /var/log/ntpd
-
You're running into bug 8517 (http://bugs.contribs.org/show_bug.cgi?id=8517)
ntpd (the service) is running, but is configured by default to not allow *any* client access.
To allow client (ntpq, ntpstat) access to your ntpd from the sme server command line:
mkdir -p /etc/e-smith/templates-custom/etc/ntp.conf
cd /etc/e-smith/templates-custom/etc/ntp.conf
echo 'restrict 127.0.0.1' > 41allowLocalhost
expand-template /etc/ntp.conf
sv t ntpd
-
You're running into bug 8517 (http://bugs.contribs.org/show_bug.cgi?id=8517)
next to that, I believe there is something else going on. Hence the request for the logs. It seems that it is possible there is a race condition for binding to 0.0.0.0 between ntpd and ntpdate, where ntpdate won't release it.
But we can discuss this once a there is evidence for it so we can raise a bug against it.
-
I believe mmcarn nailed it. Only one question though: if this is a feature and not a bug, why does starting the service with sv start ntpd throw an error (see original post)?
-
I believe mmcarn nailed it. Only one question though: if this is a feature and not a bug, why does starting the service with sv start ntpd throw an error (see original post)?
I suspect of what I said in my previous comment.
-
Original post talks about restarting ntpd with /etc/init.d/ntpd restart. This is expected to fail, ntpd is monitored and must be restarted using sv t /services/ntpd
-
After a reboot I could not reproduce any errors, nothing bad I could see in /var/log/messages or else. Consider this thread solved please.