Problems with Apache2 starting up
Scott Haneda
talklists at newgeo.com
Wed Jan 28 01:40:08 PST 2009
On Jan 28, 2009, at 1:34 AM, Ryan Schmidt wrote:
> Yes. I use lighttpd more than apache2, but on one of my machines, a
> Power Mac G4 with Mac OS X 10.5.6, it never starts lighttpd at
> startup time, though the plist gets loaded. I have to "sudo port
> unload lighttpd" and then "sudo port load lighttpd" to get it to
> load properly.
>
> I believe it has to do with the order in which plists are loaded. At
> the time the OS tries to load the lighttpd plist, probably the
> network stack or some other service that lighttpd vitally needs has
> not yet been brought up, so lighttpd cannot start.
>
> The launchd plist syntax provides for a way to specify what other
> services must be started first. However MacPorts exposes no
> mechanism by which those fields of the plist could be filled -- at
> least, not a way they could be configured by the portfile. Though it
> might not be unreasonable for MacPorts to just decide that all
> launchd plists require network access.
>
> On another machine, a MacBook Pro with Mac OS X 10.4.11, lighttpd
> has no trouble starting up at system startup time. I haven't yet
> done enough testing to know whether it's the OS version or the
> difference in CPU speed that's making this show up on the Power Mac
> but not the MacBook Pro. It's probably not any of those that are
> actually responsible for the problem -- it's probably just a
> coincidence with differences in how long different things take to
> get going at startup, i.e. it's just luck that it's working
> correctly when it is.
If it really is load order, you could solve it by putting your start
commands in some other script. Before it the start of lighttpd, run a
little loop that looks for the network stack to be up, when it is up,
exit the loop and start your server.
Of course, point your launchd at this new script. I have done this
with an email server before, since I needed to load an unruly amount
of IP's into the machine, which takes OS X a long time to bring
online, at least, on 10.4 it did.
--
Scott
More information about the macports-users
mailing list