-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NTP time does not sync (Temporary failure in name resolution) #92
Comments
It only happens if ntp is started via 'systemctl' (which is the default). It works fine when started directly from the command line. It appears that the problem is the sym link from /etc/resolv.conf to /tmp/dhcpcd.resolv.conf When started from 'systemctl start ntp' then ntpd fails to open that file: workaround is to change this line in /lib/systemd/system/ntp.service
to
|
ntpd started from 'systemctl' (via dhcpcd hook) can not follow symlink from /etc/resolv.conf to /tmp/dhcpcd.resolv.conf. For now should remain in /etc/resolv.conf (hard coded). stat64("/etc/resolv.conf", 0xbea7af80) = -1 ENOENT (No such file or directory) 2. Never fsck on any volumne. Linux runs a fsck every 6 month even on ro-volumnes. Any fs corruption makes fsck stall during bootup and requires user to confirm to continue. 3. Disable viminfo to stop vim from complaining about ~/.viminfo not writeable.
I am having the same or a similiar issue.
I have this script which is triggered by a systemctl service once a network econnection is established on boot:
Here is the content of the log generated by that script starting with the last couple lines before the last reboot which was now about 2 days 15 hr ago. Log contents
|
Following the suggestion above to set
Not unique to Adafruit (I'm not using anything from Adafruit on this), so may post elsewhere. |
The ntpd is running correctly but does not sync time.
root@PoolPi:/home/pi# ps alxww | grep ntpd
5 109 411 1 20 0 7960 3260 poll_s Ssl ? 0:00 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 109:114
root@PoolPi:/home/pi# strace -s180 -p 411
...
clock_gettime(CLOCK_REALTIME, {tv_sec=1550139211, tv_nsec=743923000}) = 0
read(23, "\0", 32) = 1
gettimeofday({tv_sec=1550139211, tv_usec=745815}, NULL) = 0
getpid() = 411
send(3, "<27>Feb 14 10:13:31 ntpd[411]: error resolving pool 1.debian.pool.ntp.org: Temporary failure in name resolution (-3)", 116, MSG_NOSIGNAL) = 116
...
It goes into an endless loop through all NTP pool servers and reports the same error for every one of the configured pool servers.
However, DNS is working fine from the shell and 1.debianpool.ntp.org resolves nicely:
$ ping 1.debian.pool.ntp.org
PING 1.debian.pool.ntp.org (92.68.81.154) 56(84) bytes of data.
64 bytes from www.elandsgracht.nl (92.68.81.154): icmp_seq=1 ttl=50 time=26.2 ms
The problem is that these days ntpd is started via systemd. systemd runs ntp in a container with its own /tmp filesystem and this makes the symbolic link from /etc/resolv.conf to /tmp/dhcpcd.resolv.conf inaccessible.
The text was updated successfully, but these errors were encountered: