Ntpd run with server unreachable , when it reachable can not to sync time

/etc/ntp.conf
driftfile /var/lib/ntp/ntp.drift

restrict default limited kod nomodify notrap nopeer
restrict -6 default limited kod nomodify notrap nopeer
restrict source noquery

# No limits for local monitoring
restrict 127.0.0.1
restrict -6 ::1

server 192.168.41.150 iburst

Version ntpd 4.2.8p15@1.3728-o Tue Apr 26 08:01:21 UTC 2022 (3)

run /usr/sbin/ntpd -d -D 10 -g -p /var/run/ntpd.pid -n -c /etc/ntpd.conf

when server is reachable it can not to sync
debug code found it not print below log:

peer_refresh_interface: ->192.168.41.150 mode 3 vers 4 poll 6 10 flags 0x101 0x1 ttl 0 key 00000000: new interface:
10 Apr 15:21:33 ntpd[25326]: new interface(s) found: waking up resolver

Any advice is very Good :blush:

update:

15 Apr 15:17:29 ntpd[10397]: select(): nfound=-1, error: Interrupted system call
routing message op = 16: scheduling interface update
routing message op = 16: scheduling interface update
alarming: normal
15 Apr 15:17:30 ntpd[10397]: select(): nfound=-1, error: Interrupted system call
routing message op = 16: scheduling interface update
routing message op = 16: scheduling interface update
alarming: normal
15 Apr 15:17:31 ntpd[10397]: select(): nfound=-1, error: Interrupted system call
Finding interface for addr 192.168.41.150 in list of addresses
findlocalinterface: kernel maps 192.168.41.150 to 192.168.40.208
Searching for addr 192.168.40.208 in list of addresses - FOUND
Found interface #3 eth0 for address 192.168.41.150 ——> !!!!!HERE HAVE DETECTED SERVER CAN REACH, BUT NOT TO SYNC TIME
poll_update: at 267 192.168.41.150 poll 6 burst 0 retry 1 head 0 early 2 next 67
routing message op = 16: scheduling interface update
routing message op = 16: scheduling interface update
alarming: normal
15 Apr 15:17:32 ntpd[10397]: select(): nfound=-1, error: Interrupted system call
routing message op = 16: scheduling interface update
routing message op = 16: scheduling interface update
alarming: normal
15 Apr 15:17:33 ntpd[10397]: select(): nfound=-1, error: Interrupted system call
routing message op = 16: scheduling interface update
routing message op = 16: scheduling interface update
alarming: normal
15 Apr 15:17:34 ntpd[10397]: select(): nfound=-1, error: Interrupted system call
routing message op = 16: scheduling interface update
routing message op = 16: scheduling interface update

interface_interval:10, interface_timer:9, current_time:8

current_time always bigger than interface_times, so nerver reach interface_update

Well, I would overcomplcate the config files and add something like the following.

notional include

keys /var/lib/ntp/ntp.keys
trustedkey 100 101…249
controlkey 100
tos minclock 1 minsane 1

And of course a shared ntp.keys file.

This should allow you to (dumbly) run with only one clock. (Normaly 3 iirc) this is not ptp. Also, you could use a appropriate tool authed by controlkey to reconfigure without restarting the daemon.

There are many more useful options in the documentation.

thank you very much :100:, i will try