ntp configuration not visible to ntpq

patzm

Cadet
Joined
Jan 17, 2022
Messages
4
Hi guys,
I started observing time drift on my NAS. I quickly discovere that calling date shows an outdated time (in the past in this case), whereas the time that TrueNas reports in System Settings > General > Localization was correct. I read a bit on the forums and stumbled over this post and tried running ntpq -p. However, that only prints
Code:
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 192.168.178.1   .INIT.          16 u    -   64    0    0.000   +0.000   0.000

192.168.178.1 is both my local gateway and my router.

Even though my TrueNas gui is configured like this:
Screenshot 2022-02-27 at 00-09-48 General - nas patz app.png


So these are essentially my two questions:
  1. how could it be that my Linux system time diverges from TrueNas's internal (?) time? Is there even a difference?
  2. Why are the NTP servers that are configured above not shown when running ntpq -p?
My System:
  • TrueNAS-SCALE-22.02-RC.2
  • Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz
  • 32 GB DDR4-ECC RAM (4x 8GB)
  • 2x 1TB SSD MIRROR
  • 4x 6TB HDD WD Red RAIDZ1
  • ASUS Server Board Z10PA-D8
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
You've posted the output from ntpq, but not the contents of ntp.conf, which would go a long way to answering your questions. The GUI is basically just a frontend for conventional subsystems like ntpd. TrueNAS has not written their own time system and TrueNAS has no "internal time". UNIX-like systems have a system time, and I cannot recall any significant cases of it not being used. :smile:
 

patzm

Cadet
Joined
Jan 17, 2022
Messages
4
Yep, I thought it's output (e.g. the server IPs or names) would reflect it. But thanks for asking, because the config file seems to be properly up to date, see the content of my /etc/ntp.conf:
Code:
server 0.de.pool.ntp.org iburst maxpoll 10 minpoll 6
restrict default ignore
restrict -6 default ignore
restrict 127.0.0.1
restrict -6 ::1
restrict 127.127.1.0
restrict 0.de.pool.ntp.org nomodify notrap nopeer noquery

TrueNAS has not written their own time system and TrueNAS has no "internal time". UNIX-like systems have a system time, and I cannot recall any significant cases of it not being used.
Yeah, I was assuming that too. However, how can you explain the difference I reported above?
Either way: What could be the reason for ntpq or the ntpd daemon in general to fail connecting to the above configured NTP server? Why would it attempt to connect to the default gateway (192.168.178.1)?

I am also getting emails that report the failure:
NTP health check failed - No NTP peers: [{'192.168.178.1': 'REJECT'}]
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Well, I think the obvious question here is "what do you get if you type 'host 0.de.pool.ntp.org'"?

Because normally you would get a short list of servers:

# host 0.de.pool.ntp.org.
0.de.pool.ntp.org has address 144.91.116.85
0.de.pool.ntp.org has address 78.46.162.102
0.de.pool.ntp.org has address 173.249.33.207
0.de.pool.ntp.org has address 176.9.42.91

but if your gateway host is capturing DNS and redirecting these to itself, I can easily see how that would become 192.168.178.1.

The information is coming from somewhere. It's just a matter of tracking it down and/or replicating the steps that are going on.
 

patzm

Cadet
Joined
Jan 17, 2022
Messages
4
The obvious question ...
thanks for bearing with me :wink:. I am a deep-learning dude, not networking.

Code:
$ host 0.de.pool.ntp.org
0.de.pool.ntp.org has address 185.242.112.53
0.de.pool.ntp.org has address 217.14.146.53
0.de.pool.ntp.org has address 168.119.238.107
0.de.pool.ntp.org has address 129.70.132.34


What would be the next step in narrowing it down?

Btw, I want to mention that I have two LAN cables connected to the server and the router. No static routes are set up. The interfaces are configured as follows:
Screenshot 2022-03-02 at 11-13-10 Network - nas patz app.png
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
You cannot have two interfaces with different IP addresses in the same network. There's endless discussion on this forum about this topic, please use the search function. IP does not work that way. Use a single interface and an alias IP address if you need two different addresses for some reason but don't use two interfaces.
 
Top