Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 41610
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: SpanKY <vapier@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: merwan kashouty <mkashouty@gmail.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 41610 depends on: Show dependency tree
Bug 41610 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-02-14 17:54 0000
/usr/bin/ntpd: unknown option -U

then it lists the recognized options and gives a * Failed to start error messege 



Reproducible: Always
Steps to Reproduce:
1.
2.
3.

------- Comment #1 From SpanKY 2004-02-14 17:59:52 0000 -------

*** This bug has been marked as a duplicate of 31258 ***

------- Comment #2 From SpanKY 2004-02-14 18:00:06 0000 -------
change it to -u

------- Comment #3 From merwan kashouty 2004-02-15 07:22:08 0000 -------
ok how can i determine now if its working... changing /etc/conf.d/ntpd config
to -u gets rid of the startup error but now ntpq -p gives nypq: read:
Connection refused

------- Comment #4 From merwan kashouty 2004-02-15 07:57:04 0000 -------
also

* Stopping ntpd....
/sbin/runscript.sh: line 34: kill: (1279) - No such process
* Starting ntpd....

so without ntpq -p how are you sure this is actually running

------- Comment #5 From merwan kashouty 2004-02-15 08:04:17 0000 -------
sorry the above was from /etc/init.d/ntpd restart .... supposedly ntpd was
started at boot , i.e. rc-update add ntpd default.... but if ntpd isnt working
you will get the same error on restart this is producing... say if the clock is
way off ntpd will fail to start but will appear to when init..d does its thing
but restart will give the error above.

------- Comment #6 From SpanKY 2004-02-15 10:25:57 0000 -------
ntpd is not in the business of setting your clock, it's in the business of
maintaining it ... from the manpage:
       Most operating systems and hardware of today incorporate a time-of-year
       (TOY)  chip  to maintain the time during periods when the power is off.
       When the machine is booted, the chip is used to initialize the  operat-
       ing  system  time.  After the machine has synchronized to a NTP server,
       the operating system corrects the chip from time to time. In case there
       is  no TOY chip or for some reason its time is more than 1000s from the
       server time, ntpd  assumes something must be  terribly  wrong  and  the
       only reliable action is for the operator to intervene and set the clock
       by hand. This causes ntpd  to exit with a panic message to  the  system
       log.  The  -g  option overrides this check and the clock will be set to
       the server time regardless of the chip time.  However, and  to  protect
       against  broken  hardware,  such  as when the CMOS battery fails or the
       clock counter becomes defective, once the clock has been set, an  error
       greater than 1000s will cause ntpd  to exit anyway.

as for the init script failing, i dont know how much i can do about that ...
the server started up normally and then exited [per above] ... the only signs
it leaves is in your system logs

------- Comment #7 From merwan kashouty 2004-02-15 10:31:46 0000 -------
yes i know what the purpose of ntpd is... i was simply making the comaprison of
somethings i noticed caused ntpd to fail at startup and how the errors upen a
restart are similar... this is broken... 4.1.2 works perfectly

can you tell me how to verify that its actually polling the servers its set to
sync against?

------- Comment #8 From SpanKY 2004-02-15 10:44:57 0000 -------
you get that error upon restart becuase ntpd exited abnormally

run this:
/etc/init.d/ntpd zap
killall ntpd
/etc/init.d/ntpd start
ps aux | grep ntpd

is ntpd running ?

------- Comment #9 From Ian Truelsen 2004-02-15 11:06:09 0000 -------
I am having the same problem with 4.2.0. When I start it from the init script
it seems to behave as normal, but there is no process running. The pid located
in /var/run/ntpd.pid does not exist.

This is the output of /usr/bin/ntpd -p /var/run/ntpd.pid -u ntp:ntp -ddd on my
system:

ntpd 4.2.0@1.1161-r Sun Feb 15 04:08:03 PST 2004 (1)
addto_syslog: ntpd 4.2.0@1.1161-r Sun Feb 15 04:08:03 PST 2004 (1)
addto_syslog: set_process_priority: Leave priority alone: priority_done is <2>
addto_syslog: precision = 1.000 usec
create_sockets(123)
addto_syslog: no IPv6 interfaces found
address_okay: listen Virtual: 1, IF name: lo, Up Flag: 1
address_okay: listen Virtual: 1, IF name: eth0, Up Flag: 1
bind() fd 4, family 2, port 123, addr 0.0.0.0, flags=8
flags for fd 4: 04002
bind() fd 5, family 2, port 123, addr 127.0.0.1, flags=0
flags for fd 5: 04002
bind() fd 6, family 2, port 123, addr 192.168.100.2, flags=8
flags for fd 6: 04002
create_sockets: ninterfaces=3
interface 0:  fd=4,  bfd=-1,  name=wildcard,  flags=0x8
              sin=0.0.0.0  bcast=0.0.0.0,  mask=255.255.255.255
interface 1:  fd=5,  bfd=-1,  name=lo,  flags=0x5
              sin=127.0.0.1  mask=255.0.0.0
interface 2:  fd=6,  bfd=-1,  name=eth0,  flags=0x9
              sin=192.168.100.2  bcast=192.168.100.255,  mask=255.255.255.0
init_io: maxactivefd 6
local_clock: at 0 state 0
usage: /usr/bin/ntpd [ -abdgmnx ] [ -c config_file ] [ -e e_delay ]
                [ -f freq_file ] [ -k key_file ] [ -l log_file ]
                [ -p pid_file ] [ -r broad_delay ] [ -s statdir ]
                [ -t trust_key ] [ -v sys_var ] [ -V default_sysvar ]
                [ -P fixed_process_priority ]

The usage thing at the end would appear to indicate an error in the command,
but I cannot see a problem.

emerge info (in case it helps):

Portage 2.0.50-r1 (default-x86-1.4, gcc-3.3.2, glibc-2.3.3_pre20040207-r0,
2.6.3-rc2-gentoo)
=================================================================
System uname: 2.6.3-rc2-gentoo i686 AMD Athlon(tm) XP 1700+
Gentoo Base System version 1.4.3.13
distcc 2.12.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632)
[disabled]
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59
Automake: sys-devel/automake-1.8.2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"
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/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache emergemail sandbox userpriv"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://dark-lord.ihtruelsen.dyndns.org/gentoo-portage"
USE="3dnow X aalib acpi alsa apm arts avi berkdb bonobo crypt cups directfb dvd
encode esd fbcon flash foomaticdb gdbm gif gnome gpm gtk gtk2 gtkhtml guile
imap imlib java jpeg kde ldap libg++ libwww mad maildir maznocompose mikmod
motif moznoirc moznomail mpeg mysql ncurses nls oggvorbis opengl oss pam pdflib
perl png python qt quicktime readline sdl slang slp spell ssl svga tcltk tcpd
tetex tiff truetype usb x86 xface xml2 xmms xv zlib"

------- Comment #10 From merwan kashouty 2004-02-15 11:10:26 0000 -------
well no... ps aux | grep ntpd returns nothing... i'm telling ya its broken...
if 4.1.2 fails to start... say because the system time is way off you'll get
that same error running ntpq -p that you get with 4.2.0

------- Comment #11 From Ian Truelsen 2004-02-15 11:14:02 0000 -------
I should have also noted that it does not write anything to /var/log/ntpd.log
as specified in my conf file, so I don't think that it is sourcing it. I tried
adding -c /etc/ntp.conf to the command line without any luck.

------- Comment #12 From Seemant Kulleen (RETIRED) 2004-02-15 16:24:16 0000 -------
I can confirm this:

root sephora # /etc/init.d/ntpd restart          
 * Stopping ntpd...
/sbin/runscript.sh: line 34: kill: (24060) - No such process             [ ok ]
 * Starting ntpd...                                                      [ ok ]
root sephora # ps -ef | grep ntp                 
root      8688  7573  0 16:26 pts/0    00:00:00 grep -E ntp

------- Comment #13 From Terry 2004-02-15 17:10:11 0000 -------
I think this issue is still related to the -u flag, trying to run it directly
as "ntp -u ntp:ntp" still fails to start.. but without it starts fine.

------- Comment #14 From Terry 2004-02-15 17:14:24 0000 -------
sorry "ntpd -u ntp:ntp"..

additionally it runs via init.d by commenting out the extra flags from conf.d/ntpd, definatly a -u problem.. you may notice that ntpd --help not longer shows the -u flag as well. 

------- Comment #15 From SpanKY 2004-02-15 17:22:09 0000 -------
oh, i'm retarted

USE=droproot emerge ntp

then '-u user:group' will work

i'll update the logic/use flag so it's 'nodroproot' and thus, by default, ntp drops to ntp:ntp

------- Comment #16 From Terry 2004-02-15 17:46:18 0000 -------
cool! =)

however, I would try it but I think I broke autoconf.. so now I cant rebuild it so it works for me. DOH! :)

------- Comment #17 From SpanKY 2004-02-15 17:57:46 0000 -------
ok, fixed in cvs

if you dont feel like re-emerging to get droproot support, then edit your /etc/conf.d/ntpd and remove the '-u ntp:ntp'

------- Comment #18 From Terry 2004-02-15 18:09:14 0000 -------
no probs.. I worked around it.. seems to be some trouble with the latest
autoheader stuff.. 

Anyhow, I can confirm ntpd works wit hthe -u flag! =)

------- Comment #19 From SpanKY 2004-02-15 18:12:36 0000 -------
i'm using sys-devel/autoconf-2.59 and sys-devel/automake-1.8.2 and i dont have
any problems other than i think the autotools take way too long to run

------- Comment #20 From Terry 2004-02-15 18:30:09 0000 -------
sys-devel/autoconf-2.59-r1 here, but I *think* its a known problem.. I have
always tried to steer away from trying to resolv issues with autoconf, it
scares me :)

------- Comment #21 From merwan kashouty 2004-02-15 18:40:52 0000 -------
yeah i just emerged autoconf-2.59-r1 and ntp fails to build.... now what?

------- Comment #22 From SpanKY 2004-02-15 18:52:05 0000 -------
i'll have to review autoconf 2.50-r1 since 2.50 works just fine

i'm not going to do it now cause i'm doing homework :p

chances are, either i'll fix it so it'll work with 2.50-r1 and i'll post here, or i'll open a new bug saying 2.50-r1 is broken

------- Comment #23 From Terry 2004-02-15 18:57:16 0000 -------
I worked around it possibly a dangerous way..
mv /usr/bin/autoheader /usr/bin/autoheader-bak; ln -s /usr/bin/autoheader-2.59 /usr/bin/autoheader

It compiled fine after that. I undone my work around immediatly afterward ntp was isntalled though =)

------- Comment #24 From Terry 2004-02-15 19:22:14 0000 -------
maybe better to refer to this:

http://bugs.gentoo.org/show_bug.cgi?id=41723#c2

I have not yet tried it myself.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug