FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 06-15-2008, 05:48 PM
"David Christensen"
 
Default Starting NTP server: ntpd/usr/sbin/ntpd: invalid option -- p

debian-user:

I recently installed openntpd on a Debian 4.0 virtual machine
(http://www.thoughtpolice.co.uk/vmware/#debian4.0) running on VMWare Server
1.0.4:

<CVSENV>20080615-103351 root@vd40r0 ~/vd40r0
# apt-cache showpkg openntpd
Package: openntpd
Versions:
3.9p1-3(/var/lib/apt/lists/ftp.debian.org_debian_dists_etch_main_binary-i386
_Packages)(/var/lib/dpkg/status)

Reverse Depends:
Dependencies:
3.9p1-3 - libc6 (2 2.3.6-6) libssl0.9.8 (2 0.9.8b-1) adduser (0 (null))
time-daemon (0 (null)) ntp (0 (null)) chrony (0 (null)) time-daemon (0
(null)) ntp (0 (null)) chrony (0 (null))
Provides:
3.9p1-3 - time-daemon
Reverse Provides:


When I boot, I see the following message on the console:

Starting NTP server: ntpd/usr/sbin/ntpd: invalid option -- p
usage: ntpd [-dSs] [-f file]
failed!


But, ntpd seems to be running (?):

<CVSENV>20080615-103358 root@vd40r0 ~/vd40r0
# ps -A | grep ntp
2009 ? 00:00:00 ntpd
2026 ? 00:00:00 ntpd


Yet, the time is off:

# ntpdate 0.debian.pool.ntp.org
15 Jun 10:37:56 ntpdate[2156]: step time server 66.79.148.35 offset
151.828804 sec


I dug through /etc/init.d/openntpd, /etc/default/openntpd, etc., but
couldn't figure out if or where a -p option was being set (although I did
set the -s option).


I ran apt-get update and apt-get upgrade just now and rebooted -- same
problems.


Any suggestions?


TIA,

David


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 06-15-2008, 07:39 PM
Andrew Reid
 
Default Starting NTP server: ntpd/usr/sbin/ntpd: invalid option -- p

On Sunday 15 June 2008 13:48, David Christensen wrote:
> debian-user:
>
> I recently installed openntpd on a Debian 4.0 virtual machine
> (http://www.thoughtpolice.co.uk/vmware/#debian4.0) running on VMWare Server
> 1.0.4:
>
[Details elided]


> I dug through /etc/init.d/openntpd, /etc/default/openntpd, etc., but
> couldn't figure out if or where a -p option was being set (although I did
> set the -s option).

> Any suggestions?


Check if there is also an /etc/init.d/ntpd. If your box used
to have ntp, and that package was removed but not purged, the init
files will still be in place. /etc/init.d/ntpd will find
the openntp executable and try to run it, but with wierd/wrong
options.

-- A.
--
Andrew Reid / reidac@bellatlantic.net


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 06-15-2008, 09:10 PM
"David Christensen"
 
Default Starting NTP server: ntpd/usr/sbin/ntpd: invalid option -- p

Andrew Reid wrote:
> Check if there is also an /etc/init.d/ntpd. If your box used
> to have ntp, and that package was removed but not purged, the init
> files will still be in place. /etc/init.d/ntpd will find
> the openntp executable and try to run it, but with wierd/wrong
> options.


Thanks for the clue. I see:

20080615-135040 root@vd40r0 ~
# l /etc/init.d/*ntp*
/etc/init.d/ntp* /etc/init.d/openntpd* /etc/init.d/openntpd-orig*


I guess I had already installed ntp, but forgot about it because the clock
was wrong.


Attempt to uninstall openntpd:

20080615-135215 root@vd40r0 ~
# apt-get remove openntpd
Reading package lists... Done
Building dependency tree... Done
The following packages will be REMOVED:
openntpd
0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded.
Need to get 0B of archives.
After unpacking 102kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 17871 files and directories currently installed.)
Removing openntpd ...
Stopping openntpd: start-stop-daemon: warning: failed to kill 2000: No such
process
ntpd.


Reboot. I don't see the ntpd error message on the console. Looking for an
ntp process:

20080615-140103 root@vd40r0 ~
# ps -A | grep ntp
2214 ? 00:00:00 ntpdate


Checking the clock:

# ntpdate 0.debian.pool.ntp.org
15 Jun 14:03:56 ntpdate[2225]: step time server 138.23.180.126 offset
31.830406 sec


I don't know if NTP is running. It doesn't seem to be working.


Any suggestions?


TIA,

David


p.s. dmesg doesn't seem to contain all the messages I see on the console
(including ntp). Does anybody know if/how I can get everything that is
displayed on the console when I boot?

20080615-135434 root@vd40r0 ~
# dmesg
Linux version 2.6.18-4-686 (Debian 2.6.18.dfsg.1-12etch2) (dannf@debian.org)
(gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)) #1 SMP Wed May 9
23:03:12 UTC 2007
...
device-mapper: ioctl: 4.7.0-ioctl (2006-06-24) initialised:
dm-devel@redhat.com
eth0: link up
ACPI: AC Adapter [ACAD] (on-line)
ACPI: Power Button (FF) [PWRF]
NET: Registered protocol family 10
lo: Disabled Privacy Extensions
IPv6 over IPv4 tunneling driver
eth0: no IPv6 routers present
eth0: link up


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 06-15-2008, 10:52 PM
Andrew Reid
 
Default Starting NTP server: ntpd/usr/sbin/ntpd: invalid option -- p

On Sunday 15 June 2008 17:10, David Christensen wrote:
> Andrew Reid wrote:
> > Check if there is also an /etc/init.d/ntpd. If your box used
> > to have ntp, and that package was removed but not purged, the init
> > files will still be in place. /etc/init.d/ntpd will find
> > the openntp executable and try to run it, but with wierd/wrong
> > options.
>
> Thanks for the clue. I see:
>
> 20080615-135040 root@vd40r0 ~
> # l /etc/init.d/*ntp*
> /etc/init.d/ntp* /etc/init.d/openntpd* /etc/init.d/openntpd-orig*
>
>

> Reboot. I don't see the ntpd error message on the console. Looking for an
> ntp process:
>
> 20080615-140103 root@vd40r0 ~
> # ps -A | grep ntp
> 2214 ? 00:00:00 ntpdate

>
>
> I don't know if NTP is running. It doesn't seem to be working.
>
>
> Any suggestions?

My guess at this point is that you have now removed but not
purged both ntp and openntp. This means the init files are still
present, but the executable (/usr/bin/ntpd or whatever) is absent,
so the init files are effectively no-ops.

This would explain the absence of an ntp process.

What is the output of "dpkg -l '*ntp*'? That should
tell you which packages are present. I'm betting
"rc" for ntpd and openntp, and "ii" for ntpdate.

What you want to to next, probably, is decide which package
you want and then purge the other one, and install the desired
one. I think ntp and ntpdate can co-exist safely, but if
they can't, the package manager should tell you.

To purge a package which has already been removed, I believe
you can do "dpkg --purge <file>" on the package file in
/var/cache/apt/archives, but in your case, it's sufficient to
remove the sym-links from /etc/rcX.d and the start-up file
from /etc/init.d, since those are the files causing the problems.

-- A.
--
Andrew Reid / reidac@bellatlantic.net


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 06-17-2008, 02:08 AM
"David Christensen"
 
Default Starting NTP server: ntpd/usr/sbin/ntpd: invalid option -- p

Andrew Reid wrote:

> I'm afraid I'm not much of an expert on openntp. My first guess is
> that, as the system runs, the clock should sync up on its own, if
> ntpd is seeing valid servers and working properly.

If it were a 24x7 box, then yes. But, it's a virtual machine that I fire up,
hack around, and then shut it down.


> One potential issue, hinted at above, is that if eth0 is not
> up at boot-time, it's possible it can't find a reference source,
> and that's why it's not syncing at boot.

It came up this time:

20080616-184340 dpchrist@a64x23800p ~
$ ssh root@vd40r0
Last login: Sun Jun 15 21:49:19 2008 from 192.168.0.10
Linux vd40r0 2.6.18-4-686 #1 SMP Wed May 9 23:03:12 UTC 2007 i686

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.

20080616-183017 root@vd40r0 ~
# dmesg | grep eth0
eth0: registered as PCnet/PCI II 79C970A
eth0: link up
eth0: no IPv6 routers present

The clock is ~15 minutes slow.


> You might try /etc/init.d/openntp restart, while the network
> is in a known-good state, to see if that syncs it up.

20080616-183030 root@vd40r0 ~
# /etc/init.d/openntpd restart
Restarting openntpd: ntpd.

20080616-184610 root@vd40r0 ~
#

Now the clock is right. Thanks for the work-around. :-)


David


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 06-17-2008, 10:48 PM
Andrew Reid
 
Default Starting NTP server: ntpd/usr/sbin/ntpd: invalid option -- p

On Monday 16 June 2008 22:08, David Christensen wrote:
> Andrew Reid wrote:
> > I'm afraid I'm not much of an expert on openntp. My first guess is
> > that, as the system runs, the clock should sync up on its own, if
> > ntpd is seeing valid servers and working properly.
>
> If it were a 24x7 box, then yes. But, it's a virtual machine that I fire
> up, hack around, and then shut it down.

In that case, perhaps what you want is ntpdate, after all.

It works by putting a hook in /etc/network/if-up.d, so
that the time gets set automatically when the network
comes up.

You can set the server list in /etc/default/ntpdate.

Note that the Debianized ntpdate is a bit different
from the "upstream", in particular in that the Debianized
one is the one that's run by the if-up.d hook, and it
uses the /etc/default/ntpdate file to find servers, whereas
the "vanilla" one doesn't do either of these things.

-- A.
--
Andrew Reid / reidac@bellatlantic.net


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 04:33 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org