Skip to content

NTPsec ntpd does not respond to local ntpq

Using Arch Linux on Rasperry Pi. Once installed the default ntpd service is controlled via systemd and the executables are in /usr/bin/

When using either the default ntpq or the NTPsec ntpq with the default ntpd queries work

Systemd status using default service:

[pi@alarmpi system]$ systemctl status ntpd.service
* ntpd.service - Network Time Service
   Loaded: loaded (/usr/lib/systemd/system/ntpd.service; disabled; vendor preset: disabled)
   Active: active (running) since Wed 2015-11-18 05:55:47 UTC; 3min 34s ago
  Process: 3447 ExecStart=/usr/bin/ntpd -g -u ntp:ntp (code=exited, status=0/SUCCESS)
 Main PID: 3449 (ntpd)
   CGroup: /system.slice/ntpd.service
           `-3449 /usr/bin/ntpd -g -u ntp:ntp

Default ntpq behavior

[pi@alarmpi system]$ /usr/bin/ntpq
ntpq> version
ntpq 4.2.8p4@1.3265-o Thu Oct 22 09:48:28 UTC 2015 (1)
ntpq> peers
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+x.ns.gin.ntt.ne 103.1.106.69     2 u   10   64    1   25.341   -3.178   0.002
+nipper.paina.jp 131.112.181.48   2 u    8   64    1   28.125   -2.351   0.002
-c-kint.tv       133.243.238.244  2 u   12   64    1   29.386    0.067   0.002
*vps.jre655.com  103.1.106.69     2 u    7   64    1   30.270   -3.862   0.002
ntpq> sysinfo
associd=0 status=0614 leap_none, sync_ntp, 1 event, freq_mode,
system peer:        vps.jre655.com:123
system peer mode:   client
leap indicator:     00
stratum:            3
log2 precision:     -19
root delay:         31.872
root dispersion:    7948.382
reference ID:       157.7.154.134
reference time:     d9f69169.8777dc78 2015-11-18T05:55:53.529
system jitter:      1.468678
clock jitter:       1.317
clock wander:       0.000
broadcast delay:    0.000
symm. auth. delay:  0.000
ntpq> ntpversion
NTP version being claimed is 2
ntpq> exit

New NTPsec ntpq on same ntpd

[pi@alarmpi system]$ /usr/local/bin/ntpq 
ntpq> version
ntpq 0.9.0-61d9cbe Nov 18 2015 02:05:07
ntpq> peers
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*x.ns.gin.ntt.ne 103.1.106.69     2 u   58  128  377   23.691    0.974   0.704
+nipper.paina.jp 133.243.238.164  2 u   55  128  377   27.053    0.963   1.410
-c-kint.tv       133.243.238.244  2 u   56  128  377   28.512    3.895   0.713
+vps.jre655.com  103.1.106.69     2 u   57  128  257   30.097    0.128   0.995
ntpq> sysinfo
associd=0 status=0615 leap_none, sync_ntp, 1 event, clock_sync,
system peer:        x.ns.gin.ntt.net:123
system peer mode:   client
leap indicator:     00
stratum:            3
log2 precision:     -19
root delay:         25.598
root dispersion:    23.902
reference ID:       129.250.35.250
reference time:     d9f6974c.85c3f730 2015-11-18T06:21:00.522
system jitter:      1.038083
clock jitter:       5.727
clock wander:       0.127
broadcast delay:    0.000
symm. auth. delay:  0.000
ntpq> exit

Now change ntpd.service to use /usr/local/sbin/ntpd (new NTPsec one)

[pi@alarmpi system]$ systemctl status ntpd.service
* ntpd.service - Network Time Service
   Loaded: loaded (/usr/lib/systemd/system/ntpd.service; disabled; vendor preset: disabled)
   Active: active (running) since Wed 2015-11-18 06:25:39 UTC; 3s ago
  Process: 3485 ExecStart=/usr/local/sbin/ntpd -g -u ntp:ntp (code=exited, status=0/SUCCESS)
 Main PID: 3486 (ntpd)
   CGroup: /system.slice/ntpd.service
           `-3486 /usr/local/sbin/ntpd -g -u ntp:ntp

Use default ntpq:

[pi@alarmpi system]$ /usr/bin/ntpq
ntpq> version
ntpq 4.2.8p4@1.3265-o Thu Oct 22 09:48:28 UTC 2015 (1)
ntpq> peers
localhost.localdomain: timed out, nothing received
***Request timed out
ntpq> sysinfo
localhost.localdomain: timed out, nothing received
***Request timed out
ntpq> exit

use new NTPsec ntpq

[pi@alarmpi system]$ /usr/local/bin/ntpq 
ntpq> version
ntpq 0.9.0-61d9cbe Nov 18 2015 02:05:07
ntpq> peers
localhost.localdomain: timed out, nothing received
***Request timed out
ntpq> sysinfo
localhost.localdomain: timed out, nothing received
***Request timed out
ntpq> exit

Same /etc/ntp.conf

[pi@alarmpi system]$ cat /etc/ntp.conf 
# Please consider joining the pool:
#
#     http://www.pool.ntp.org/join.html
#
# For additional information see:
# - https://wiki.archlinux.org/index.php/Network_Time_Protocol_daemon
# - http://support.ntp.org/bin/view/Support/GettingStarted
# - the ntp.conf man page

# Associate to Arch's NTP pool
server 0.arch.pool.ntp.org
server 1.arch.pool.ntp.org
server 2.arch.pool.ntp.org
server 3.arch.pool.ntp.org

# By default, the server allows:
# - all queries from the local host
# - only time queries from remote hosts, protected by rate limiting and kod
restrict default kod limited nomodify nopeer noquery notrap
restrict 127.0.0.1
restrict ::1

# Location of drift file
driftfile /var/lib/ntp/ntp.drift