You are not logged in.

#1 2013-04-17 10:56:04

rg_arc
Member
Registered: 2011-03-20
Posts: 507

NTP: the "ntpq -np" command outputs error

So according to the wiki (https://wiki.archlinux.org/index.php/Ne … _correctly) you should install the libedit package and run "$ ntpq -np" to see if your daemon is running correctly.

I have libedit installed and when I run this command I get a simple error of "$ system error" even if I run as root too. I have the daemon enabled "# systemctl enable ntpd.service" and it is running after a fresh boot up (as far as I know). Also, when I first started the daemon I did as the wiki suggests and used enable ntpd instead of the .service added.

Last edited by rg_arc (2013-04-17 10:57:15)

Offline

#2 2013-04-17 11:27:35

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,835
Website

Re: NTP: the "ntpq -np" command outputs error

it is running after a fresh boot up (as far as I know)

Could you check that?

systemctl status ntpd.service

Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2013-04-17 19:43:02

rg_arc
Member
Registered: 2011-03-20
Posts: 507

Re: NTP: the "ntpq -np" command outputs error

This is the code I get after running that command, and I still get a system error message.

ntpd.service - Network Time Service
   Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled)
   Active: active (running) since Wed 2013-04-17 14:38:07 CDT; 2min 7s ago
  Process: 225 ExecStart=/usr/bin/ntpd -g -u ntp:ntp (code=exited, status=0/SUCCESS)
 Main PID: 229 (ntpd)
   CGroup: name=systemd:/system/ntpd.service
           └─229 /usr/bin/ntpd -g -u ntp:ntp

Apr 17 14:38:07 rg_arch ntpd[229]: proto: precision = 1.048 usec
Apr 17 14:38:07 rg_arch systemd[1]: Started Network Time Service.
Apr 17 14:38:07 rg_arch ntpd[229]: ntp_io: estimated max descriptors: 1024, initial ... 16
Apr 17 14:38:07 rg_arch ntpd[229]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
Apr 17 14:38:07 rg_arch ntpd[229]: Listen and drop on 1 v6wildcard :: UDP 123
Apr 17 14:38:07 rg_arch ntpd[229]: Listen normally on 2 lo 127.0.0.1 UDP 123
Apr 17 14:38:07 rg_arch ntpd[229]: Listen normally on 3 lo ::1 UDP 123
Apr 17 14:38:07 rg_arch ntpd[229]: peers refreshed
Apr 17 14:38:07 rg_arch ntpd[229]: Listening on routing socket on fd #20 for interfa...tes

Offline

#4 2013-04-18 10:41:01

rg_arc
Member
Registered: 2011-03-20
Posts: 507

Re: NTP: the "ntpq -np" command outputs error

Does this mean its working? Or does this mean I still need to fix something to do with my configuration?

Offline

#5 2013-04-18 13:36:03

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,910

Re: NTP: the "ntpq -np" command outputs error

do ntpq -p or plain ntpq work ?

In /etc/ntp.conf there's an option to tell ntp where it should store it's logfile.
Check that file, it should give clues about whether or not it's running correctly.

Note : i'm not sure, but if you haven't set a log location at all there might not be a logfile created.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#6 2013-04-18 15:25:48

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,835
Website

Re: NTP: the "ntpq -np" command outputs error

It doesn't look like it's listening on your wired/wireless connection, I don't know if this is the cause of your error, or if it's even a problem, but my 'systemctl status ntpd.service' shows:

Apr 18 16:12:21 sakura ntpd[5667]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16
Apr 18 16:12:21 sakura ntpd[5667]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
Apr 18 16:12:21 sakura ntpd[5667]: Listen and drop on 1 v6wildcard :: UDP 123
Apr 18 16:12:21 sakura ntpd[5667]: Listen normally on 2 lo 127.0.0.1 UDP 123
Apr 18 16:12:21 sakura ntpd[5667]: Listen normally on 3 enp3s0 123.45.67.89 UDP 123
Apr 18 16:12:21 sakura ntpd[5667]: Listen normally on 4 virbr0 192.168.122.1 UDP 123
Apr 18 16:12:21 sakura ntpd[5667]: Listen normally on 5 lo ::1 UDP 123
Apr 18 16:12:21 sakura ntpd[5667]: Listen normally on 6 enp3s0 abcd::efab:cdef:abcd:efab UDP 123
Apr 18 16:12:21 sakura ntpd[5667]: peers refreshed
Apr 18 16:12:21 sakura ntpd[5667]: Listening on routing socket on fd #23 for interface updates

Is your networking set up correctly, and have you modified /etc/ntp.conf at all?


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#7 2013-04-18 22:43:07

rg_arc
Member
Registered: 2011-03-20
Posts: 507

Re: NTP: the "ntpq -np" command outputs error

Here is my ntp.conf:

# With the default settings below, ntpd will only synchronize your clock.
#
# For details, see:
# - the ntp.conf man page
# - http://support.ntp.org/bin/view/Support/GettingStarted
# - https://wiki.archlinux.org/index.php/Network_Time_Protocol_daemon

# Associate to public NTP pool servers; see http://www.pool.ntp.org/
server 0.us.pool.ntp.org iburst
server 1.us.pool.ntp.org iburst
server 2.us.pool.ntp.org iburst
server 3.us.pool.ntp.org iburst
# Only allow read-only access from localhost
restrict -4 default 
restrict -4 127.0.0.1

# Location of drift and log files
driftfile /var/lib/ntp/ntp.drift
logfile /var/log/ntp.log

# NOTE: If you run dhcpcd and have lines like 'restrict' and 'fudge' appearing
# here, be sure to add '-Y -N' to the dhcpcd_ethX variables in /etc/conf.d/net

and I have my network setup so that my xbox shares the internet connection through ethernet.

The ntp.drift file is simply "23.989"

Last edited by rg_arc (2013-04-18 22:46:46)

Offline

Board footer

Powered by FluxBB