# Ntpd not set time immediately

**URL:** <https://community.ntppool.org/t/ntpd-not-set-time-immediately/2358>\
**Category:** Client Configuration and Development\
**Created:** [April 25, 2022, 3:11am UTC](https://community.ntppool.org/t/ntpd-not-set-time-immediately/2358 "2022-04-25T03:11:49Z")\
**Posts on this page:** 8\
**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 25, 2022, 3:11am UTC](https://community.ntppool.org/t/ntpd-not-set-time-immediately/2358/1 "2022-04-25T03:11:49Z")

</div>

ntp client(192.168.40.232) → ntp server (192.168.41.15 with local clock)

- Server  
ntpd - NTP daemon program - Ver. 4.2.8p9  
run ntpd with /etc/ntp.conf (only local clock)  
**restrict default**  
**server 127.127.1.0 burst prefer**  
**fudge 127.127.1.0 stratum 0**

- Client  
run clinet **/usr/sbin/ntpd -d -n -N -S /usr/sbin/ntpd-hotplug -p 192.168.41.15**

Problem is

 ![image](https://us1.discourse-cdn.com/flex016/uploads/ntppool/original/1X/df05ba8a5ad3787396407ec7e6b05a339a21d28b.png)  
_**ntp client not to sync time util server output log “refclock\_transmit: at 193 127.127.1.0” (about some minutes)**_  
ntpd: reply from 192.168.41.15: offset:-64340.016395 delay:0.002419 status:0x24 strat:1 refid:0x4c434f4c rootdelay:0.000000 reach:0x7f  
ntpd: setting time to 2022-04-25 03:56:33.925032 (offset -64340.016395s)

**I think it is my ntp server config problem, Someone can help me ? 😭**

---

<div class="post-metadata">

**Author:** ![Bas](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/bas/32/465_2.png) [@Bas](https://community.ntppool.org/u/Bas)\
**Post date:** [April 25, 2022, 4:30pm UTC](https://community.ntppool.org/t/ntpd-not-set-time-immediately/2358/2 "2022-04-25T16:30:03Z")

</div>

Stratum 0 with local clock?

Normally you should not use NTP with such a config as the local clock is useless and will be too much out of synch with the real time.

What does your ntp.conf look like?

---

<div class="post-metadata">

**Author:** ![mlichvar](https://avatars.discourse-cdn.com/v4/letter/m/e79b87/32.png) [@mlichvar](https://community.ntppool.org/u/mlichvar)\
**Post date:** [April 25, 2022, 4:46pm UTC](https://community.ntppool.org/t/ntpd-not-set-time-immediately/2358/3 "2022-04-25T16:46:37Z")

</div>

> [@wujinge](#):
>
> server 127.127.1.0 burst prefer

Try adding `minpoll 3 maxpoll 3` to that line.

---

<div class="post-metadata">

**Author:** ![apuls](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/apuls/32/1467_2.png) [@apuls](https://community.ntppool.org/u/apuls)\
**Post date:** [April 25, 2022, 6:28pm UTC](https://community.ntppool.org/t/ntpd-not-set-time-immediately/2358/4 "2022-04-25T18:28:11Z")

</div>

Are both system clocks running on the same timezone ? I mean both runing on UTC ?  
The client have an offset of - 64112 seconds to your server.  
Maybe you need to set the client clock once:

```auto
-g
Normally, ntpd exits with a message to the system log if the offset exceeds the panic threshold, which
is 1000 s by default. This option allows the time to be set to any value without restriction; however, this
can happen only once. If the threshold is exceeded after that, ntpd will exit with a message to the system
log. This option can be used with the -q and -x options. See the tinker command for other options.

```

---

<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 26, 2022, 1:45am UTC](https://community.ntppool.org/t/ntpd-not-set-time-immediately/2358/6 "2022-04-26T01:45:51Z")

</div>

it seems work, i will test more  
thank you very much

---

<div class="post-metadata">

**Author:** ![ask](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/ask/32/907_2.png) [@ask](https://community.ntppool.org/u/ask)\
**Post date:** [April 29, 2022, 9:15am UTC](https://community.ntppool.org/t/ntpd-not-set-time-immediately/2358/7 "2022-04-29T09:15:09Z")

</div>

Why does the minpoll/maxpoll setting help this situation?

Also, on a “usually internet connected” network, what is the use case / benefit for adding a local clock driver? My understanding was that it’s only useful if the network has long periods without access to an external clock and you’d rather have all your systems be on the same (likely incorrect) time than different (likely incorrect) times in that scenario. Are there other use cases?

---

<div class="post-metadata">

**Author:** ![mlichvar](https://avatars.discourse-cdn.com/v4/letter/m/e79b87/32.png) [@mlichvar](https://community.ntppool.org/u/mlichvar)\
**Post date:** [April 29, 2022, 3:06pm UTC](https://community.ntppool.org/t/ntpd-not-set-time-immediately/2358/8 "2022-04-29T15:06:50Z")

</div>

I assume this was meant for an isolated or only rarely connected network.

The 127.127.1.x driver works like other refclock drivers, except it always returns a zero offset. It still needs some number of samples to be selected for synchronization. The default minpoll/maxpoll is 6, so setting it to 3 should make the interval when the server responds as unsynchronized 8x shorter.

Setting `tos orphan` and `tos orphanwait` might be a better solution.

---

<div class="post-metadata">

**Author:** ![Bas](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/bas/32/465_2.png) [@Bas](https://community.ntppool.org/u/Bas)\
**Post date:** [April 30, 2022, 1:56pm UTC](https://community.ntppool.org/t/ntpd-not-set-time-immediately/2358/9 "2022-04-30T13:56:42Z")

</div>

> [@ask](#):
>
> My understanding was that it’s only useful if the network has long periods without access to an external clock and you’d rather have all your systems be on the same (likely incorrect) time than different (likely incorrect) times in that scenario. Are there other use cases?

That is correct. It’s a useless timer unless you are in the middle of nowhere with no internet at all.  
Even then it makes no sense as a simple USB GPS of 10 euro does a far better job.

Therefor they do not advise it to use anywhere unless you are in a concrete-shelter with no signals or internet and nothing to do then look at the (incorrect-) time passing by. 🤣
