View previous topic :: View next topic |
Author |
Message |
guero61 l33t
Joined: 14 Oct 2002 Posts: 811 Location: Behind you
|
Posted: Thu Dec 08, 2005 2:37 am Post subject: ntpd & sshd not starting |
|
|
Something rather curious - I've installed dozens of random system, and can't figure this one out.
I've installed a standard x86 system for a fileserver at home, but for some reason the networked services won't start. I've got net.eth0 set up to start in the default runlevel, as well as ntpd and sshd, but upon boot-up (with eth0 set to a static address or getting one from DHCP) neither will start. Logging in from the serial console, I can start the services with their init.d scripts, but starting them at any time during the init process just craps out with the following message:
Code: |
Dec 7 20:05:42 sparky rc-scripts: ERROR: Problem starting needed services.
Dec 7 20:05:42 sparky rc-scripts: "sshd" was not started.
|
I'm lost. Could grsec or pax have something to do with this? |
|
Back to top |
|
|
sub_zero Apprentice
Joined: 12 Sep 2004 Posts: 169
|
Posted: Thu Dec 08, 2005 3:11 am Post subject: |
|
|
do you know the order in which they're being started? It is very possible that sshd and ntpd are being started before net.eth0, which could cause your problem |
|
Back to top |
|
|
guero61 l33t
Joined: 14 Oct 2002 Posts: 811 Location: Behind you
|
Posted: Thu Dec 08, 2005 12:08 pm Post subject: |
|
|
Well, they both *have* to come after net, unless something has been very badly broken in /sbin/rc; they both have at least the following depend() hook:
Code: |
depend() {
use logger dns
need net
}
|
In addition, RC_PARALLEL_STARTUP is "no" and RC_NET_STRICT_CHECKING is set to "yes" (did try with "no", but no love there).
I've tried both baselayout-1.12.0_pre11-r3 (which is happily running on 2 other machines right now) and baselayout-1.12.0_pre11-r1 (which is on one other). |
|
Back to top |
|
|
PaulBredbury Watchman
Joined: 14 Jul 2005 Posts: 7310
|
Posted: Thu Dec 08, 2005 1:59 pm Post subject: |
|
|
Is net.lo started at boot? |
|
Back to top |
|
|
nielchiano Veteran
Joined: 11 Nov 2003 Posts: 1287 Location: 50N 3E
|
Posted: Thu Dec 08, 2005 2:57 pm Post subject: Re: ntpd & sshd not starting |
|
|
guero61 wrote: | Logging in from the serial console |
Try attaching a screen to the machine to see the bootup (or reconfigue the kernel to use the serial port as console).
Mostly the scripts will spit out some description of what went wrong before returning an error code. |
|
Back to top |
|
|
guero61 l33t
Joined: 14 Oct 2002 Posts: 811 Location: Behind you
|
Posted: Thu Dec 08, 2005 8:44 pm Post subject: Re: ntpd & sshd not starting |
|
|
nielchiano wrote: |
Mostly the scripts will spit out some description of what went wrong before returning an error code. |
I'm using RC_BOOTLOG (and have the requisite additional packages installed), and I don't see anything untoward in /var/log/boot.log... I have everything set up to spew out the serial console anyway, but I'll give that a whirl.
I'll have to check on net.lo when I get home, but AFAICR Gentoo's default is to always start that, and I know I've not messed with it.
[edit]
Nope; net.lo certainly is coming up. Any other thoughts? I'll go hook it up to a VGA console, but I don't recall seeing anything untoward last time I tried.
[/edit] |
|
Back to top |
|
|
guero61 l33t
Joined: 14 Oct 2002 Posts: 811 Location: Behind you
|
Posted: Fri Dec 09, 2005 1:33 am Post subject: |
|
|
The VGA console by itself didn't help (I didn't see anything else I wouldn't have otherwise), but I figured out what the problem is... now we've got to come up with a good fix!
The issue is due to a fugly interaction between coldplug and the other net-dependent rc-scripts. In short, since I was letting coldplug discover my interface and load it's driver, it automatically started that rc-script. BUT, when time came around to start ntpd and sshd and they tried to start their dependency, they got an error of some sort (what, I don't know) and failed to start. All I do know was that adding my ethernet driver to /etc/modules.autoload.d/kernel-2.6 alleviated the problem.
Does coldplug background the scripts it automagically starts, or what? That would somewhat explain the fact that I could start these services immediately following rc's exit, but not before.
I would say this could precipitate one or two changes: first, to coldplug to make the stuff it does more compatible with following rc-scripts; second, to the ntpd and sshd init-scripts to make them more robust/resistant to this kind of problem.
Thoughts? Comments? Rotten fruit? |
|
Back to top |
|
|
khanyooh n00b
Joined: 10 Dec 2005 Posts: 1 Location: Poland
|
Posted: Sat Dec 10, 2005 5:21 pm Post subject: |
|
|
check rc levels..
coldplug should be in the boot level and even hotplug in the default
should help |
|
Back to top |
|
|
|