Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 57355 - ntp 4.2.0-r2 fails with 'Servname not supported for ai_socktype'
Summary: ntp 4.2.0-r2 fails with 'Servname not supported for ai_socktype'
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-16 20:46 UTC by Brett I. Holcomb
Modified: 2004-11-09 07:41 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
ntp.conf file (ntp.conf,1.65 KB, text/plain)
2004-07-17 20:15 UTC, Brett I. Holcomb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brett I. Holcomb 2004-07-16 20:46:42 UTC
I was checking out my ntp to make sure it still worked and it does not so I did the following after checking the forums, bugzilla, and the mail list.

Well 4.2.0-r2 is still broken.  I downgraded to the previous version and  
it works.  I then went back to 4.2.0-r2 and tried the -U ntp fix for      
/etc/conf.d/ntpd mentioned in the mail list but it did not work.  ntp
complained about invalid option.  I don't have any restricts in
/etc/ntp.conf as they are all commented out.

In short, it's broken badly so I'm downgrading again and masking it.  Others have had to downgrade also.
Comment 1 SpanKY gentoo-dev 2004-07-17 17:02:43 UTC
no real information here

the 4.2.x ntpd's use -u for setting users while 4.1.x uses -U
Comment 2 Brett I. Holcomb 2004-07-17 17:47:40 UTC
Well, it may work for you but it sure doesn't work for many of us - check the mail list archives.  I went through the forums, the mail list archives and the bugs for a long time last night reading all the suggested fixes, how-tos, etc.  Tried all the things suggested their and finally ended up downgrading - as did many of the posters.  It's worked flawlessly since.

Yup, I'm aware that 4.2 use -u vs -U.  One poster was able to get 4.2 to work by using -U in the /etc/conf.d/ntpd.conf file.  That didn't work here. 

The system is a 2.6.7-r9 gentoo-dev-sources kernel.

I also have a 2.4.24 xfs-sources system that ntp 4.2 works on.  However, this system is being upgraded to 2.6.7-r11 gentoo-dev-sources so we'll see if ntp breaks on this system.  If it works maybe that will give a clue - if not that may be a clue, too.

I'd suggest leaving the bug open especially in light of the problems others have had.
Comment 3 SpanKY gentoo-dev 2004-07-17 18:56:45 UTC
there is no such file as /etc/conf.d/ntpd.conf so i really dont know what you're talking about there

the custom options go in /etc/conf.d/ntpd

i'm not going to re-open the bug until i see what you're talking about; people complaining that '-U' causes ntpd to not start is not a valid bug ... they need to update their config files
Comment 4 Brett I. Holcomb 2004-07-17 19:25:17 UTC
My apologies on the filename.  I shouldn't do that from memory.  It was the stock /etc/conf.d/ntpd that was installed by the 4.2 ebuild.  I didn't touch it.

My point is this - according to the mail list archive/forum a lot of people had problems with 4.2 and to try and make it work there were a lot of things tried.  I tried all the ones that applied and ended up doing what many did - downgrade.  I did downgrade - works, upgrade again just in case I'd messed something up - no work, downgrade again and it works.

As for the -U I did NOT use that in the 4.2 version.  I fully realize it's a pre 4.2 item.  My config file had -u ntp:ntp in it when I installed 4.2 - that's what etc-update put in it and it didn't work with that.  My comment about that was one person made his 4.2 work by going back to the -U option.  Why I don't know.

It will be interesting to see what my other system with 2.4.x and ntp 4.2 does when it's upgraded to 2.6.7.

I spent a lot of time digging throught the archives, forums, etc. and many people had problems with 4.2 - enough to indicate to me that there is a problem or problems and although it doesn't affect all it effects enough people that it's not just someones system that's broken.

As for what I'm talking about check the mail list archives (gentoo-user) and search on ntp.
Comment 5 SpanKY gentoo-dev 2004-07-17 19:38:54 UTC
i'm not exactly inclined to go searching for 'bug reports' since i really have no idea *what* i'm searching for

bugzilla is for people to bring their info here and report a bug, not to redirect developers to some other place

why dont you just post your `emerge info` and a summary of the trouble you're seeing
Comment 6 Brett I. Holcomb 2004-07-17 19:54:20 UTC
Whoops!  I thought I'd posted all the info in this bug but I posted it on the mail list, did some more work and just though I put it in the bug.  My apologies as I thought I had included the errors in the bugreport but I didn't and you can't read minds!  Sorry about that and my sincere apologies.  Let's start over with this - I'll give you the info I should have given you in the first place.

When I use ntp 4.2 I get this error with ntptrace, ntpq

Servname not supported for ai_socktype

The /var/log/ntpd.log shows this when I start ntpd.

16 Jul 01:01:25 ntpd[7971]: ntpd exiting on signal 15
16 Jul 01:01:28 ntpd[8013]: parent died before we finished, exiting
16 Jul 10:15:25 ntpd[12260]: frequency initialized 37.072 PPM from /var/lib/ntp/

I also get two ntp processes as shown by ps ax | grep ntp as root.

18071 ?        SL     0:00 /usr/bin/ntpd -p /var/run/ntpd.pid -u ntp:ntp
18076 ?        S      0:00 /usr/bin/ntpd -p /var/run/ntpd.pid -u ntp:ntp

All those problems go away when I go back to ntp 4.1.2.

Here's the emerge info.

root@strider etc # emerge --info
Portage 2.0.50-r9 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.3.20040420-r0, 2.6.7
-gentoo-r9)
=================================================================
System uname: 2.6.7-gentoo-r9 i686 AMD Athlon(TM) MP 2000+
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-mp -Os -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1
/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/confi
g /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/tex
mf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi
/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-mp -Os -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache fixpackages nostrip sandbox"
GENTOO_MIRRORS="ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo http://csociety-ftp.ecn
.purdue.edu/pub/gentoo/ ftp://csociety-ftp.ecn.purdue.edu/pub/gentoo/ ftp://mirr
or.iawnet.sandia.gov/pub/gentoo/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="X aalib acl alsa apm avi berkdb caps cdr crypt cups doc dvd dvdr emacs emac
s-w3 encode fbcon foomaticdb fusion gdbm gif gimp gimpprint gpm gtk gtk2 imap im
lib jack jack-caps jack-tmpfs java joystick jpeg libg++ libwww mad mbox mikmod
motif mpeg nas ncurses nls oggvorbis opengl oss pam passfile pdflib perl png post gres python quicktime readline rogue scanner sdl slang snmp spell ssl svga tcltk  tcpd tetex truetype usb video_cards_nvidia videos x86 xatrix xfs xinerama xml2 xmms xv zlib"

Comment 7 SpanKY gentoo-dev 2004-07-17 20:05:03 UTC
i assume you're running all of these programs against localhost ?

can you also post your /etc/ntp.conf file
Comment 8 Brett I. Holcomb 2004-07-17 20:15:55 UTC
Created attachment 35667 [details]
ntp.conf file

Yes, I run ntptrace or ntpq -p

I'm attaching /etc/ntp.conf. I used the same file for 4.1 and 4.2.  The only
changes made were to add some servers.	Gandalf is my 2.4.x machine.

Currently I have both machines at ntp 4.1.  If needed I can bring them back to
ntp 4.2 to get data.
Comment 10 Brett I. Holcomb 2004-07-18 08:45:00 UTC
No, Ipv6 is not set:

# CONFIG_IPV6 is not set

I checked through the references you listed.  What else in the kernel could cause this kind of problem?  The ipv6 USE flag is NOT set.  

Comment 11 SpanKY gentoo-dev 2004-07-18 17:48:13 UTC
try building your kernel with ipv6 and see if the error goes away

could be that ntp handles ipv6 incorrectly when it's not present
Comment 12 Brett I. Holcomb 2004-07-18 19:02:25 UTC
Will do.  Will that affect me elsewhere or will things still run ipv4 by default?
Comment 13 SpanKY gentoo-dev 2004-07-18 19:43:13 UTC
enabling ipv6 should not break any ipv4 apps

i have ipv6 enabled on all my machines but none of them are actually hooked up to ipv6 networks ...
Comment 14 Brett I. Holcomb 2004-07-26 16:50:48 UTC
I did two things.  

1.  Went to kernel gentoo-dev-sources-2.6.7-r11.  I needed to test this anyway before I switched to it from -r9.

2.  Added ipv6 support to the kernel.  

Now ntpq -p gives me a list of hosts without error.  

     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 gandalf         .INIT.          16 u    -   64    0    0.000    0.000 4000.00
*ntp-4.cns.vt.ed 198.82.247.40    2 u  180  256   17   29.995    3.936   5.453
 ntp3.tamu.edu   128.194.254.7    2 u  183  256   17   51.967   11.100   3.139
 CYAN.SRV.CS.CMU 128.2.242.86     3 u  247  256   15   30.432    5.471   2.952

Looks like it's working now.  I assume this means it needs ipv6 - is this a bug or a feature <G>.
Comment 15 SpanKY gentoo-dev 2004-11-09 07:41:07 UTC
4.2.0.20040617 has a bunch of ipv6 fixes