LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-07-2018, 05:03 AM   #1
mr.travo
Member
 
Registered: Oct 2017
Location: All over the US
Distribution: Mint 18.3 Cinnamon, Gallium, Ubuntu Armbian (headless), Arch (learning)
Posts: 138

Rep: Reputation: 10
Post NTPD <null> status?


I am getting a bunch of these in my syslog file. I am trying to fine tune everything on this server and want to know what the <null> flag means. I searched the man page and online all over and I can't find an explanation.

Code:
Jun  7 05:42:31 localhost ntpd[1455]: 172.106.131.15 local addr 192.168.1.110 -> <null>
Jun  7 05:44:37 localhost ntpd[1455]: 74.82.59.150 local addr 192.168.1.110 -> <null>
Jun  7 05:45:53 localhost ntpd[1455]: 50.116.52.97 local addr 192.168.1.110 -> <null>
Jun  7 05:54:51 localhost ntpd[1455]: 74.207.240.206 local addr 192.168.1.110 -> <null>
Jun  7 05:55:18 localhost ntpd[1455]: 209.208.79.69 local addr 192.168.1.110 -> <null>
Jun  7 05:58:08 localhost ntpd[1455]: 192.111.144.114 local addr 192.168.1.110 -> <null>
Thanks!
~T
 
Old 06-07-2018, 09:24 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 20,457

Rep: Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564
The messages are written to syslog when ntp is stopped. systemd still uses the init.d init scripts i.e. /etc/init.d/ntp to start/stop the service which uses the LSB init script functions.

I assume ntp is cleaning up whatever is required when shutdown.
 
Old 06-07-2018, 05:11 PM   #3
mr.travo
Member
 
Registered: Oct 2017
Location: All over the US
Distribution: Mint 18.3 Cinnamon, Gallium, Ubuntu Armbian (headless), Arch (learning)
Posts: 138

Original Poster
Rep: Reputation: 10
That's weird because I am tailing syslog and am watching them come in while the system is running. Is it saying that it can't make contact or something? Just learning NTP and trying to keep everything under control and streamline as much as possible.

~T
 
Old 06-07-2018, 05:26 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 20,457

Rep: Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564
Ok... In addition to syslog files you can also look at systemd status as well as the ntpq command.

sudo systemctl -l status ntp

ntpq -pn

The latter should show the status of each server
 
Old 06-19-2018, 02:06 AM   #5
mr.travo
Member
 
Registered: Oct 2017
Location: All over the US
Distribution: Mint 18.3 Cinnamon, Gallium, Ubuntu Armbian (headless), Arch (learning)
Posts: 138

Original Poster
Rep: Reputation: 10
Quote:
Originally Posted by michaelk View Post
Ok... In addition to syslog files you can also look at systemd status as well as the ntpq command.

sudo systemctl -l status ntp

ntpq -pn

The latter should show the status of each server
I am sorry that I didn't see this sooner!

sudo systemctl -l status ntp
Code:
nextserver@rock64:~$ sudo systemctl -l status ntp
● ntp.service - LSB: Start NTP daemon
   Loaded: loaded (/etc/init.d/ntp; bad; vendor preset: enabled)
   Active: active (running) since Thu 2018-06-07 05:26:15 EDT; 1 weeks 4 days ag
     Docs: man:systemd-sysv-generator(8)
   CGroup: /system.slice/ntp.service
           └─1455 /usr/sbin/ntpd -p /var/run/ntpd.pid -4 -g -u 106:110

Warning: Journal has been rotated since unit was started. Log output is incomple
lines 1-8/8 (END)...skipping...
● ntp.service - LSB: Start NTP daemon
   Loaded: loaded (/etc/init.d/ntp; bad; vendor preset: enabled)
   Active: active (running) since Thu 2018-06-07 05:26:15 EDT; 1 weeks 4 days ago
     Docs: man:systemd-sysv-generator(8)
   CGroup: /system.slice/ntp.service
           └─1455 /usr/sbin/ntpd -p /var/run/ntpd.pid -4 -g -u 106:110

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
~
~
~
~
~
ntpq -pn
Code:
nextserver@rock64:~$ ntpq -pn
ntpq: read: Connection refusednextserver@rock64:~$ sudo !!
sudo ntpq -pn
ntpq: read: Connection refusednextserver@rock64:~$
What does "connection refused" point to?

~T
 
Old 06-19-2018, 09:01 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 20,457

Rep: Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564
Quote:
ntpq: read: Connection refused
Usually that means ntp isn't running.

Still trying to determine why.

Last edited by michaelk; 06-19-2018 at 09:06 PM.
 
Old 06-20-2018, 02:44 PM   #7
mr.travo
Member
 
Registered: Oct 2017
Location: All over the US
Distribution: Mint 18.3 Cinnamon, Gallium, Ubuntu Armbian (headless), Arch (learning)
Posts: 138

Original Poster
Rep: Reputation: 10
I went ahead and stopped, updated, and started the service-

Code:
sudo service ntp stop
sudo ntpd -gq
sudo service ntp start
and it has not changed anything- still getting the <null>.

This wouldn't have anything to do with a blocked port or anything in UFW would it?
 
Old 06-20-2018, 04:26 PM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 20,457

Rep: Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564
Is ntp running? Are you still getting "Connection refused" when running the ntpq command?

ntp communicates via udp over port 123. Typically the firewall is configured to accept established connections. How is your firewall configured?
 
Old 06-20-2018, 05:40 PM   #9
mr.travo
Member
 
Registered: Oct 2017
Location: All over the US
Distribution: Mint 18.3 Cinnamon, Gallium, Ubuntu Armbian (headless), Arch (learning)
Posts: 138

Original Poster
Rep: Reputation: 10
Yes, still giving a connection refused....
 
Old 06-20-2018, 07:53 PM   #10
mr.travo
Member
 
Registered: Oct 2017
Location: All over the US
Distribution: Mint 18.3 Cinnamon, Gallium, Ubuntu Armbian (headless), Arch (learning)
Posts: 138

Original Poster
Rep: Reputation: 10
Quote:
Originally Posted by michaelk View Post
Is ntp running? Are you still getting "Connection refused" when running the ntpq command?

ntp communicates via udp over port 123. Typically the firewall is configured to accept established connections. How is your firewall configured?
Sorry I didn't see the second part of the question....

I am going over UFW right now. I set it up kind of "hack-ish-ly" because I don't know any better. I am trying to learn how to do it CORRECTLY. I am willing to bet the problem will be found in UFW.

Code:
WARN: / is world writable!
WARN: / is group writable!
Status: active

To                         Action      From
--                         ------      ----
22/tcp                     ALLOW       Anywhere                  
443/tcp                    ALLOW       Anywhere                  
993                        LIMIT       Anywhere                  
587                        LIMIT       Anywhere                  
Anywhere                   DENY        208.93.153.176            
224.0.0.1                  DENY        Anywhere                  
22/tcp (v6)                ALLOW       Anywhere (v6)             
443/tcp (v6)               ALLOW       Anywhere (v6)             
993 (v6)                   LIMIT       Anywhere (v6)             
587 (v6)                   LIMIT       Anywhere (v6)
I hope there's not issues with me displaying this.

I need to solve the root write privileges. I am just not sure how that works with Nextcloud (as I have my data running to a secondary HDD).

Please don't laugh too much at my firewall setup skills, LOL!

~T
 
Old 06-20-2018, 08:23 PM   #11
mr.travo
Member
 
Registered: Oct 2017
Location: All over the US
Distribution: Mint 18.3 Cinnamon, Gallium, Ubuntu Armbian (headless), Arch (learning)
Posts: 138

Original Poster
Rep: Reputation: 10
Port 123 was closed to I had to open it-

Code:
sudo nmap -sT -sU -p123 localhost

Starting Nmap 7.01 ( https://nmap.org ) at 2018-06-20 21:01 EDT
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00029s latency).
Other addresses for localhost (not scanned): ::1
PORT    STATE  SERVICE
123/tcp closed ntp
123/udp open   ntp
Still refusing connection though, but closer!

~T
 
Old 06-21-2018, 06:22 AM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 20,457

Rep: Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564
just out of curiosity post your /etc/ntp.conf file
 
Old 06-21-2018, 06:26 AM   #13
mr.travo
Member
 
Registered: Oct 2017
Location: All over the US
Distribution: Mint 18.3 Cinnamon, Gallium, Ubuntu Armbian (headless), Arch (learning)
Posts: 138

Original Poster
Rep: Reputation: 10
Sure!

Code:
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help

driftfile /var/lib/ntp/ntp.drift

# Enable this if you want statistics to be logged.
#statsdir /var/log/ntpstats/

statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable

# Specify one or more NTP servers.

# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board
# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
# more information.
pool 0.ubuntu.pool.ntp.org iburst
pool 1.ubuntu.pool.ntp.org iburst
pool 2.ubuntu.pool.ntp.org iburst
pool 3.ubuntu.pool.ntp.org iburst

# Use Ubuntu's ntp server as a fallback.
pool ntp.ubuntu.com

# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
# details.  The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions>
# might also be helpful.
#
# Note that "restrict" applies to both servers and clients, so a configuration
# that might be intended to block requests from certain clients could also end
# up blocking replies from your own upstream servers.

# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify nopeer noquery limited
restrict -6 default kod notrap nomodify nopeer noquery limited

# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1

# Needed for adding pool entries
restrict source notrap nomodify noquery

# Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
#restrict 192.168.123.0 mask 255.255.255.0 notrust


# If you want to provide time to your local subnet, change the next line.
# (Again, the address is an example only.)
#broadcast 192.168.123.255

# If you want to listen to time broadcasts on your local subnet, de-comment the
# next lines.  Please do this only if you trust everybody on the network!
#disable auth
#broadcastclient

#Changes recquired to use pps synchonisation as explained in documentation:
#http://www.ntp.org/ntpfaq/NTP-s-config-adv.htm#AEN3918

#server 127.127.8.1 mode 135 prefer    # Meinberg GPS167 with PPS
#fudge 127.127.8.1 time1 0.0042        # relative to PPS for my hardware

#server 127.127.22.1                   # ATOM(PPS)
#fudge 127.127.22.1 flag3 1            # enable PPS API
 
Old 06-21-2018, 06:27 AM   #14
mr.travo
Member
 
Registered: Oct 2017
Location: All over the US
Distribution: Mint 18.3 Cinnamon, Gallium, Ubuntu Armbian (headless), Arch (learning)
Posts: 138

Original Poster
Rep: Reputation: 10
Uhhh, should this be commented out????

# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1
 
Old 06-21-2018, 06:57 AM   #15
michaelk
Moderator
 
Registered: Aug 2002
Posts: 20,457

Rep: Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564Reputation: 3564
No, that prevents other computers on the LAN from accessing the ntp server on the computer.

Also out of curiosity can you connect to any ntp server

sudo ntpdate -u ntp.ubuntu.com
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to handle kernel NULL pointer dereference at (null) in linux kernel 3.14.43 Krishna Dwivedi Linux - Embedded & Single-board computer 0 09-08-2015 09:45 AM
cupsd fails when trying to create a printer with status code 127 and at times status 2 lgoldma Linux - Software 0 11-02-2012 07:52 PM
Server Hung due to hda: status timeout: status=0xd0 { Busy } adamalic Linux - Enterprise 3 12-15-2011 01:27 PM
JavaScript:: alert(node) shows null, but node != null taylor_venable Programming 1 05-01-2006 09:51 PM
fstab-sync: error: libhal_ctx_init_direct: (null): (null) rpz Linux - Hardware 1 11-01-2005 05:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration