You are not logged in.

#1 2009-09-02 01:40:30

happycodemonkey
Member
From: Muncie, IN
Registered: 2009-09-02
Posts: 2

Openntpd won't start at boot [SOLVED]

Hi all!

My system clock is perpetually off by 4 hours, and I've narrowed it down to an issue with Openntpd; it seems to be refusing to start at boot time. Here are the relevant lines from daemon.log:

Sep  1 21:30:26 raskolnikov ntpd[1440]: Terminating

and the output of ps aux | grep ntpd:

[raskolnikov@raskolnikov ~]$ ps aux | grep ntpd
ntp       1323  0.0  0.0   3184   700 ?        S    17:32   0:00 /usr/sbin/ntpd -s
root      1332  0.0  0.0   3292   256 ?        Ss   17:32   0:00 /usr/sbin/ntpd -s
1000      1412  0.0  0.0   3616   800 pts/0    S+   17:33   0:00 grep ntp

I can manually restart the daemon via /etc/rc.d/openntpd restart, which works fine, and the time is set correctly. However, when I reboot, the adjustments are wiped out, and the daemon does not start again (same message in daemon.log). I have the default ntpd.conf. I have found very little helpful information on Google, I would greatly appreciate it if someone could point me in the right direction, I've wasted quite a few hours this evening working on this problem! Thanks! smile smile

Edit: Just in case it's helpful, here is my daemons array from rc.conf:

DAEMONS=(syslog-ng !network acpid eee hal networkmanager netfs crond openntpd bitlbee)

Last edited by happycodemonkey (2009-09-02 03:55:46)


<3 Arch

Offline

#2 2009-09-02 02:04:19

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: Openntpd won't start at boot [SOLVED]

I've had this problem too, although I do not use networkmanager. I've found that openntpd fails to configure itself properly if the network is not up when it starts (in my case this happens when I background the network daemon and start openntpd in the daemons array).

My current working solution* is to add this line to rc.local:

(sleep 300 && /etc/rc.d/openntpd start) &

That will wait 5 minutes before starting the openntpd daemon which gives the network more than sufficient time to start. An alternative would be run "/etc/rc.d/openntpd restart" in an hourly cronjob if your network settings change often.






* Why not just unbackground the network daemon you ask? If the network isn't up then it takes a while to timeout and I don't want to wait to boot in that case.

Last edited by Xyne (2009-09-02 02:05:52)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#3 2009-09-02 03:55:24

happycodemonkey
Member
From: Muncie, IN
Registered: 2009-09-02
Posts: 2

Re: Openntpd won't start at boot [SOLVED]

Perfect! Thanks so much smile


<3 Arch

Offline

#4 2009-10-01 11:09:56

Runiq
Member
From: Germany
Registered: 2008-10-29
Posts: 1,053

Re: Openntpd won't start at boot [SOLVED]

This has nothing to do with networkmanager, but if you use netcfg profiles, you could run "/etc/rc.d/openntpd start" as a POST_UP command. Thus it would run at the earliest possible time and it also wouldn't interfere with your daemons, Xyne.

Offline

#5 2009-10-01 16:29:07

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: Openntpd won't start at boot [SOLVED]

@Runiq
I don't use netcfg, but I'll keep that in mind in case I ever do. Thanks.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#6 2010-06-30 16:30:03

trusktr
Banned
From: .earth
Registered: 2010-02-18
Posts: 907
Website

Re: Openntpd won't start at boot [SOLVED]

Thank you for this solution! big_smile


joe@trusktr.io - joe at true skater dot io.

Offline

#7 2010-06-30 17:13:47

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: Openntpd won't start at boot [SOLVED]

You could also maybe try static IP instead of dhcp. Static IP comes up in a snap, so there shouldn't be that dhcp lag which ntpd will be waiting on.

Offline

#8 2010-08-29 21:37:15

trusktr
Banned
From: .earth
Registered: 2010-02-18
Posts: 907
Website

Re: Openntpd won't start at boot [SOLVED]

I have an idea! If you use networkmanager, why not put the "/etc/rc.d/openntpd" file into /etc/NetworkManager/dispatcher.d/ then that way openntpd will start as soon as networkmanager makes a connection.

In the wiki it says to put a slightly modified version into that folder, but it doesn't appear to work for me.


joe@trusktr.io - joe at true skater dot io.

Offline

#9 2010-09-03 19:23:56

trusktr
Banned
From: .earth
Registered: 2010-02-18
Posts: 907
Website

Re: Openntpd won't start at boot [SOLVED]

In case anyone's wondering, my method in the previous post isn't working for some reason for me. Stick to the method detailed further above (for now).


joe@trusktr.io - joe at true skater dot io.

Offline

Board footer

Powered by FluxBB