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

**URL:** <https://community.ntppool.org/t/ntpd-run-with-server-unreachable-when-it-reachable-can-not-to-sync-time/2366>\
**Category:** Pool Development\
**Created:** [April 28, 2022, 2:38am UTC](https://community.ntppool.org/t/ntpd-run-with-server-unreachable-when-it-reachable-can-not-to-sync-time/2366 "2022-04-28T02:38:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wujinge](https://avatars.discourse-cdn.com/v4/letter/w/c89c15/32.png) [@wujinge](https://community.ntppool.org/u/wujinge)\
**Post date:** [April 28, 2022, 2:38am UTC](https://community.ntppool.org/t/ntpd-run-with-server-unreachable-when-it-reachable-can-not-to-sync-time/2366/1 "2022-04-28T02:38:04Z")

</div>

/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** 😊

---

<div class="post-metadata">

**Author:** ![wujinge](https://avatars.discourse-cdn.com/v4/letter/w/c89c15/32.png) [@wujinge](https://community.ntppool.org/u/wujinge)\
**Post date:** [April 28, 2022, 3:47am UTC](https://community.ntppool.org/t/ntpd-run-with-server-unreachable-when-it-reachable-can-not-to-sync-time/2366/2 "2022-04-28T03:47:00Z")

</div>

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** _

---

<div class="post-metadata">

**Author:** ![Jamesb192](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/jamesb192/32/699_2.png) [@Jamesb192](https://community.ntppool.org/u/Jamesb192)\
**Post date:** [May 4, 2022, 12:49am UTC](https://community.ntppool.org/t/ntpd-run-with-server-unreachable-when-it-reachable-can-not-to-sync-time/2366/3 "2022-05-04T00:49:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![wujinge](https://avatars.discourse-cdn.com/v4/letter/w/c89c15/32.png) [@wujinge](https://community.ntppool.org/u/wujinge)\
**Post date:** [May 5, 2022, 2:51am UTC](https://community.ntppool.org/t/ntpd-run-with-server-unreachable-when-it-reachable-can-not-to-sync-time/2366/4 "2022-05-05T02:51:27Z")

</div>

thank you very much 💯， i will try
