Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

NTPD does not work if using a fixed IP address.

Featured Replies

Tom,

 

Thank you for including the NTP feature on the 4.3 final release.  It does not work however if you have configured a STATIC IP address, since the nameserver is not defined in /etc/resolv.conf

 

It needs a line similar to this in /etc/resolv.conf:

nameserver 192.168.2.1

 

That line is there if you use DHCP, but not if you use a static IP address.  If it is missing, then it is impossible for unRAID to resolve where pool.ntp.org resides.

 

Joe L.

except for people that have added

 

echo "nameserver 192.168.0.11" >/etc/resolv.conf

 

(oups my router)

 

in their go script

 

 

Agreed - I have the same thing as NLS, simply echoing a namserver entry pointing to my router in the go script.  The new ntpd is working perfectly for me (including a custom timezone).

- Doug

BTW (Tom) if you want a proper way to use ntpd when using dhcp, you should just make sure to read the dhcp's ntp and time zone entries

 

 

  • 2 weeks later...

BTW (Tom) if you want a proper way to use ntpd when using dhcp, you should just make sure to read the dhcp's ntp and time zone entries

 

Would this info (ntp and timezone) appear in /etc/dhcpcd/dhcpcd-eth0.info?  What routers out there have builit-in NTP servers?

I was thinking of Windows DHCP service. I am not familiar with others.

I can give you the DHCP field numbers though, as I believe they are standard among systems.

 

 

  • 8 months later...

Tom,

 

Thank you for including the NTP feature on the 4.3 final release.  It does not work however if you have configured a STATIC IP address, since the nameserver is not defined in /etc/resolv.conf

 

It needs a line similar to this in /etc/resolv.conf:

nameserver 192.168.2.1

 

That line is there if you use DHCP, but not if you use a static IP address.  If it is missing, then it is impossible for unRAID to resolve where pool.ntp.org resides.

 

Joe L.

 

This is not working for me either, using v4.4.2.  I don't use DHCP, I set a static IP, and I set the nameserver in my go script.  After ntpd starts, 5 seconds later it reports:

ntpd_initres[1445]: host name not found: 0.us.pool.ntp.org
ntpd_initres[1445]: couldn't resolve `0.us.pool.ntp.org', giving up on it

for all 3 of the NTP servers configured.  I had thought that was probably harmless, until I discovered the time was off by about 7 minutes!

 

If later, I go to the Settings page and make no changes but click the Apply button for the Date and Time section, then ntpd will restart, and work correctly.  The syslog showed that an initial correction of about 7 minutes was made, followed by occasional micro-corrections of fractions of a second.  (It was also accompanied by numerous time sync messages at seemingly random intervals, but at least I know it is working.)

 

I have to assume that ntpd is starting too soon, or needs the nameserver to be set.

 

Agreed - I have the same thing as NLS, simply echoing a namserver entry pointing to my router in the go script.  The new ntpd is working perfectly for me (including a custom timezone).

- Doug

Doug, eight months later, do you still feel that it is working?  Is the time actually staying accurate?  If so, is it possible that you are using DHCP, and don't have a static IP?

 

I'm considering restarting ntpd in my go script, after the nameserver has been set, and add the current drift measurement, something I found in my research.  It's not vital, but adds a little startup accuracy to the NTP start, and hopefully decreases some of the initial I/O and constant sync messages.  I will be adding the following lines to my go script, after the nameserver line.

/etc/rc.d/rc.ntpd stop >/dev/null 2>&1
sleep 1
echo '-154.681' >/etc/ntp/drift
/etc/rc.d/rc.ntpd start >/dev/null 2>&1

Of course, this is *my* current drift value, found in /etc/ntp/drift, you will need to check what yours is.  Get it only after you have had a working NTP for awhile.  You could also copy off a valid drift file at power down, and copy it back each boot.

 

I've rounded up the related links for NTP, and put them here:  UnRAID Topical Index, NTP section.

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.