View previous topic :: View next topic |
Author |
Message |
Valhlalla Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/1101350616419c2f350d953.jpg)
Joined: 22 Sep 2003 Posts: 161 Location: Sydney, Australia.
|
Posted: Wed Feb 25, 2004 11:03 pm Post subject: ntpd won't restart |
|
|
I have ntpd setup and seems to be working ok, but I have a strange problem. If I stop the service
Code: |
root@XXX#/etc/init.d/ntpd stop
|
it stops fine, but then when I got to start it again, this happens.
Code: |
root@XXX#/etc/init.d/ntpd start
* Starting ntpd...
* Failed to start ntpd
|
Now if I reboot the box, its up and running again, and if i start ntpd with
it runs and gives no error.
Any ideas as to what is happening and/or how to fix it? _________________ Pork Chop Sandwiches, Oh Sh*t! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
giannifive n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/1577564071414f0574de4c4.gif)
Joined: 29 Jan 2004 Posts: 50 Location: Chicago, IL
|
Posted: Wed Feb 25, 2004 11:28 pm Post subject: |
|
|
Have you looked at your logs to see what the error might be? Try /var/log/everything/current (for metalog), /var/log/messages (for syslog or syslog-ng). Grep for ntpd. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Valhlalla Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/1101350616419c2f350d953.jpg)
Joined: 22 Sep 2003 Posts: 161 Location: Sydney, Australia.
|
Posted: Wed Feb 25, 2004 11:34 pm Post subject: |
|
|
Nothing that seems helpfull
from metalog:
Code: |
Feb 26 09:48:35 [ntpd] ntpd 4.1.2@1.892 Tue Feb 24 15:23:35 EST 2004(1)
Feb 26 09:48:35 [ntpd] precision = 13 usec
Feb 26 09:48:35 [ntpd] kernel time discipline status 0040
Feb 26 09:57:24 [rc-scripts] Failed to start ntpd
|
and similar in /var/log/ntpd.log
Code: |
26 Feb 09:48:35 ntpd[4086]: frequency initialized -164.949 from /var/lib/ntp/ntp.drift
26 Feb 09:48:35 ntpd[4087]: signal_no_reset: signal 17 had flags 4000000
26 Feb 09:53:06 ntpd[4086]: kernel time discipline status change 41
26 Feb 10:24:15 ntpd[4086]: time reset -0.319923 s
26 Feb 10:24:15 ntpd[4086]: synchronisation lost
|
_________________ Pork Chop Sandwiches, Oh Sh*t! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
lonewolfnight n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/2698443814030fe84753bd.jpg)
Joined: 16 Feb 2004 Posts: 14 Location: St. Paul MN
|
Posted: Thu Feb 26, 2004 3:18 am Post subject: |
|
|
I'm experiencing the same issue right now.
ntp.conf
logfile /var/log/ntpd.log
driftfile /var/lib/ntp/ntp.drift
server nss.nts.umn.edu prefer
server ns.nts.umn.edu
restrict 127.0.0.1
restrict 10.0.0.0 mask 255.0.0.0
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
/etc/conf.d/ntpd
NTPD_OPTS="-U ntp -g"
I'm not recieving any log output that is current. Seems something to do with the boot script. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Valhlalla Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/1101350616419c2f350d953.jpg)
Joined: 22 Sep 2003 Posts: 161 Location: Sydney, Australia.
|
Posted: Thu Feb 26, 2004 3:32 am Post subject: |
|
|
perhaps in the latest ebuild, has the rc script changed recently?
It still seems strange that it works fine if I reboot. _________________ Pork Chop Sandwiches, Oh Sh*t! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Valhlalla Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/1101350616419c2f350d953.jpg)
Joined: 22 Sep 2003 Posts: 161 Location: Sydney, Australia.
|
Posted: Thu Feb 26, 2004 11:11 pm Post subject: |
|
|
*bump* anyone have a solution, or maby someone can post an older version of the ntpd start up script to check the differences. _________________ Pork Chop Sandwiches, Oh Sh*t! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
simulacrum Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 30 Nov 2002 Posts: 128 Location: St Paul, MN
|
Posted: Mon Mar 01, 2004 7:18 am Post subject: |
|
|
I just ran into the same error, and (luckily) had an easy fix. I've been playing around with my ntpd configuration and apparently left a pid file which prevented ntpd from starting.
rm /var/run/ntpd.pid
worked for me, hopefully this helps. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Valhlalla Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/1101350616419c2f350d953.jpg)
Joined: 22 Sep 2003 Posts: 161 Location: Sydney, Australia.
|
Posted: Tue Mar 02, 2004 12:38 am Post subject: |
|
|
Thank you simulacrum worked perfectley,
Any ideas as to why this pid file is hanging around, should't it be removed when the process is killed? _________________ Pork Chop Sandwiches, Oh Sh*t! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
simulacrum Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 30 Nov 2002 Posts: 128 Location: St Paul, MN
|
Posted: Wed Mar 03, 2004 4:17 am Post subject: |
|
|
I'm starting to believe it is a bug with ntpd. I restarted ntpd last night and noticed that the pid file was not removed when it shut down so I ran into this same problem again. Perhaps as a workaround the init script could be modified to remove it on shutdown. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ferdam n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 05 Jan 2004 Posts: 10 Location: Sao Paulo - Brazil
|
Posted: Wed Mar 03, 2004 5:17 pm Post subject: |
|
|
There is a bug in /etc/init.d/ntpd :
add this line :
...
stop() {
ebegin "Stopping ntpd"
start-stop-daemon --stop --quiet --pidfile /var/run/ntpd.pid
rm -f /var/run/ntpd.pid
eend $? "Failed to stop ntpd"
}
Regards,
Fernando _________________ ferdam - Linux user #394173 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Valhlalla Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/1101350616419c2f350d953.jpg)
Joined: 22 Sep 2003 Posts: 161 Location: Sydney, Australia.
|
Posted: Thu Mar 04, 2004 5:17 am Post subject: |
|
|
I used this, but I thought ntp should remove this file itself shouldnt it?
Code: |
stop() {
ebegin "Stopping ntpd"
if [ -f /var/run/ntpd.pid ]; then
rm -f /var/run/ntpd.pid;
fi
eend $? "Failed to stop ntpd"
}
|
_________________ Pork Chop Sandwiches, Oh Sh*t! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|