Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ntpd 4.2.8 issues
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
pakjebakmeel
n00b
n00b


Joined: 13 Feb 2012
Posts: 48

PostPosted: Wed Dec 24, 2014 1:54 pm    Post subject: ntpd 4.2.8 issues Reply with quote

Hi all,

My NTP daemon has been running fine for ages until I received the update to version 4.2.8 (to fix those newly found vulnerabilities). It was not longer functioning. After enabling debug logging I found this:

Code:
24 Dec 14:30:44 ntpd[29664]: 0.0.0.0 c01d 0d kern kernel time sync enabled
24 Dec 14:30:44 ntpd[29664]: 0.0.0.0 c012 02 freq_set kernel -1.129 PPM
24 Dec 14:30:44 ntpd[29664]: 0.0.0.0 c016 06 restart
24 Dec 14:30:44 ntpd[29664]: retrying DNS ntp.ubuntu.com: EAI_SYSTEM 17: File exists


When I replace the DNS name in my /etc/ntp.conf to use the IP address it works

Code:
24 Dec 14:36:01 ntpd[29664]: 0.0.0.0 c01d 0d kern kernel time sync disabled
24 Dec 14:36:05 ntpd[29884]: 0.0.0.0 c01d 0d kern kernel time sync enabled
24 Dec 14:36:05 ntpd[29884]: 0.0.0.0 c012 02 freq_set kernel -1.129 PPM
24 Dec 14:36:05 ntpd[29884]: 0.0.0.0 c016 06 restart
24 Dec 14:36:06 ntpd[29884]: 0.0.0.0 c615 05 clock_sync
24 Dec 14:36:13 ntpd[29884]: 0.0.0.0 061b 0b leap_event


DNS resolution is working fine on this box, just NTP seems affected.

Also when using a different server:

Code:
24 Dec 14:50:43 ntpd[12875]: 0.0.0.0 c01d 0d kern kernel time sync disabled
24 Dec 14:50:45 ntpd[12993]: 0.0.0.0 c01d 0d kern kernel time sync enabled
24 Dec 14:50:45 ntpd[12993]: 0.0.0.0 c012 02 freq_set kernel -1.129 PPM
24 Dec 14:50:45 ntpd[12993]: 0.0.0.0 c016 06 restart
24 Dec 14:50:45 ntpd[12993]: retrying DNS ntp3.remco.org: EAI_SYSTEM 4: Interrupted system call


Then I use the IP address in the config instead of the DNS name and it works again. Here is the config for completeness:

Code:
gentoo ntp # cat /etc/ntp.conf
# NOTES:
# DHCP clients can append or replace NTP configuration files.
# You should consult your DHCP client documentation about its
# default behaviour and how to change it.

server ntp.remco.org iburst
server ntp2.remco.org iburst
server ntp3.remco.org iburst
#server 91.189.89.199 iburst

logfile /var/log/ntp/ntp.log
logconfig=all

driftfile       /var/lib/ntp/ntp.drift
disable monitor

restrict default limited kod nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict 192.168.10.10


It seems that I can no longer use DNS names in the server lines in the config file since the last update.
Back to top
View user's profile Send private message
pakjebakmeel
n00b
n00b


Joined: 13 Feb 2012
Posts: 48

PostPosted: Wed Mar 04, 2015 8:58 am    Post subject: Reply with quote

Small update here, it seemed that using IP addresses instead of DNS names fixed my issues. Unfortunately the daemon crashes after some hours. I have enabled debug logging to find the cause:

Code:
 4 Mar 05:05:28 ntpd[27369]: ./../lib/isc/unix/ifiter_getifaddrs.c:99: unexpected error:
 4 Mar 05:05:28 ntpd[27369]: getting interface addresses: getifaddrs: Resource temporarily unavailable
 4 Mar 05:10:28 ntpd[27369]: ./../lib/isc/unix/ifiter_getifaddrs.c:99: unexpected error:
 4 Mar 05:10:28 ntpd[27369]: getting interface addresses: getifaddrs: Resource temporarily unavailable
 4 Mar 05:15:28 ntpd[27369]: ./../lib/isc/unix/ifiter_getifaddrs.c:99: unexpected error:
 4 Mar 05:15:28 ntpd[27369]: getting interface addresses: getifaddrs: Resource temporarily unavailable
 4 Mar 05:20:28 ntpd[27369]: ./../lib/isc/unix/ifiter_getifaddrs.c:99: unexpected error:
 4 Mar 05:20:28 ntpd[27369]: getting interface addresses: getifaddrs: Resource temporarily unavailable
 4 Mar 05:25:28 ntpd[27369]: ./../lib/isc/unix/ifiter_getifaddrs.c:99: unexpected error:
 4 Mar 05:25:28 ntpd[27369]: getting interface addresses: getifaddrs: Resource temporarily unavailable
 4 Mar 05:30:28 ntpd[27369]: ./../lib/isc/unix/ifiter_getifaddrs.c:99: unexpected error:
 4 Mar 05:30:28 ntpd[27369]: getting interface addresses: getifaddrs: Resource temporarily unavailable
 4 Mar 05:35:28 ntpd[27369]: ./../lib/isc/unix/ifiter_getifaddrs.c:99: unexpected error:
 4 Mar 05:35:28 ntpd[27369]: getting interface addresses: getifaddrs: Resource temporarily unavailable
 4 Mar 05:40:28 ntpd[27369]: ./../lib/isc/unix/ifiter_getifaddrs.c:99: unexpected error:
 4 Mar 05:40:28 ntpd[27369]: getting interface addresses: getifaddrs: Resource temporarily unavailable
 4 Mar 05:40:28 ntpd[27369]: Too many errors.  Shutting up.
 4 Mar 06:00:02 ntpd[27369]: fatal out of memory (4048 bytes)
 4 Mar 06:00:02 ntpd[27369]: 0.0.0.0 061d 0d kern kernel time sync disabled


Apparently this is a know bug (that has been open for quite I while): https://bugs.gentoo.org/show_bug.cgi?id=533966

A patch (from the Arch community) was proposed here: https://bugs.archlinux.org/task/41593

I have applied this patch using the user patch method described here: http://wiki.gentoo.org/wiki//etc/portage/patches and installed the patched version.

Let's wait and see what happens..
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum