Running rdate -u gives "rdate -p -u pool.ntp.org rdate: error in read: Invalid argument". I also tried it at 3 other sites, Califorian edu sites and recieved the same error. It work before versions /usr/portage/packages/All/rdate-990821-r1.tbz2 /usr/portage/packages/All/rdate-1.4.tbz2 Reproducible: Always Steps to Reproduce: 1.rdate -p -u pool.ntp.org or tock.inLa.edu or ntp.sdsu.edu 2. 3. Actual Results: rdate -p -u pool.ntp.org rdate: error in read: Invalid argument Expected Results: rdate -p pool.ntp.org rdate: [pool.ntp.org] Mon Nov 15 10:05:52 2004 emerge info Portage 2.0.51-r3 (default-linux/x86/2004.2/gcc34/2.6, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.9-gentoo-r3n i686) ================================================================= System uname: 2.6.9-gentoo-r3n i686 AMD Athlon(tm) XP 2000+ Gentoo Base System version 1.6.5 distcc 2.18 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.92.0.2-r1 Headers: sys-kernel/linux26-headers-2.6.8.1-r1 Libtools: sys-devel/libtool-1.5.2-r6 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=athlon-xp -O2 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon-xp -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs buildpkg ccache distlocks sandbox sfperms userpriv" GENTOO_MIRRORS="ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://128.213.5.34/gentoo/" MAKEOPTS="-j3 " PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/home/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3Dnow 3Dnow2 X alsa apache2 async autofs avi berkdb bitmap-fonts cdr chroot cpdflib crypt cups dba dillo directfb divx4linux doc encode esd f77 fam fbdev fomaticdb foomaticdb fortran freetype gd gdbm gif gnome gpm gtk gtk2 hpijs imagemagick imlib java jpeg kde libg++ libwww live mad mikmod mmx mmx2 motif mozilla mp3 mpeg mpeg4 mplayer mysql nas ncurses network nptl oggvorbis oss pam pdflib perl php png ppds python qt quicktime readline real rtc ruby samba sdl slang snmp spell sse ssl svga tcltk tcpd tiff truetype type1 unicode vim x86 xml xml2 xmms xv zlib"
could you please explain a little more clearly which versions work and which don't?
rdate -u worked for me prior to versions 990821-r1 and 1.4. Now "rdate -s -u" doesnt, I get the error "rdate: error in read: Invalid argument".
all of the versions work fine for me. rdate -p -u HOST rdate -p HOST do TCP mode work for you? could you include the results from 'strace rdate -p HOST' AND 'strace rdate -u -p HOST' (attach them as seperate files).
Created attachment 44293 [details] strace rdate -u strace -otrace.u rdate -p -u ntp.sdsu.edu
Created attachment 44295 [details] strace -otrace.t rdate -p ntp.sdsu.edu strace -otrace.t rdate -p ntp.sdsu.edu which works.
does UDP work properly on your machine? any firewalls? If you downgrade back to rdate-0.990821 does it work again? Try another kernel perhaps? I tested on 2.6.7-mm4, 2.6.10-rc1-mm5, 2.6.9-gentoo-r4, 2.6.7-hardened-r12 and UDP and TCP modes for rdate work on all of those.
I down graded to rdate-0.990821-r2 and the -u ,UDP now works again. Tonight I'll go back up to 1.4 and test it again.
I have a second machine that Im setting up for someone and it has rdate-1.4 on it and the UDP option errors out as reported before "rdate: error in read: Invalid argument".
could you try some other kernels like I suggested? are you certain UDP works properly on your machine, or any firewalls around?
1. Working rdate-0.990821-r2. I was mistaken in my original post This version works both ways, UDP and TCP. Thats with my current kernel 2.6.9 2. Rdate-1.4 does not work useing UDP. 4. The P4 box also works with 990821 but not 1.4. Kernel is 2.6.9-r1 5. I got kernel 2.4.28 and rdate-1.4 UDP works.
do other UDP things work on your machine? is there any firewall stuff?
Sorry its been so long but heres my set up. I am behind a router but Im not useing the firewall. I have had a halflife server on this box until recently, its now now on an old pII, and its uses UDP on one or 2 ports. Besides that and "rdate -u" Im not a where of any thing else.
I'm very stumped now. options: a) your 2.6 kernel is broken - your 2.4 kernel works, my 2.[46] kernels work. b) something else is weird. Looking at your strace rdate -u ... I do notice one strange thing (this is the call to the time server): recvfrom(3, 0xbffff8a8, 4, 0, 0xbffff8b0, 0xbffff8a4) = -1 EINVAL (Invalid argument) Compare this to an earlier invocation of recvfrom (this is a request to your DNS server): recvfrom(3, "\377.\201\200\0\1\0\2\0\2\0\2\3ntp\4sdsu\3edu\0\0\1\0\1"..., 1024, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.2.1")}, [16]) = 135 Compare this to my two: request to DNS server: recvfrom(3, "N\230\201\200\0\1\0\2\0\2\0\1\3ntp\4sdsu\3edu\0\0\1\0\1"..., 1024, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("206.12.16.1")}, [16]) = 119 request to time server: recvfrom(3, "\305aP\252", 4, 0, {sa_family=AF_INET, sin_port=htons(37), sin_addr=inet_addr("130.191.1.1")}, [16]) = 4 In the case of your application, the pointers for the time server call are not being printed. I'm wondering if they are even valid - as that would explain the EINVAL error response. If they are invalid, why are they invalid? You'd need to debug the C code to trace this one down.
no response from user.