Thursday, February 3, 2011

What are Apache's real service dependencies? (Failing to start on reboot but works fine after that.)

I've had varied luck with my Apache service starting successfully after a reboot in the past. Nowadays, I have several Apache services running, and on the last reboot (after a Windows Update) none of them successfully started (alloc_listener: failed to set up sockaddr). Starting them manually after such an occurrence hasn't yet failed.

Is there some 'proper' way to change the startup order, so that they start after the network services are ready to give them a socket? Or do I have to resort to a batch file that runs after all the other services have started?

Edit: Given Kara Marfia's link in the comments, what is Apache actually dependent upon besides AFD Networking Support Environment and TCP/IP Protocol Driver?

  • They're magical and unknowable by mere mortals.

    I love this note on the MS article:

    Note If you have a service that needs to start late in the boot cycle but you do not have a specific service dependency, as explained above, then choose one of the services which startup last as the data value for the value "Depends on Service". Services commonly selected are Spooler and Messenger.

    Why would you "need" to start something late in the boot cycle besides having a dependency on something?

    I guess I'll have it depend on Print Spooler. How did they know that that starts generally later?

    Kev : Also this means that if you need to restart your Print Spooler service, it will down your falsely-dependent Apache service in order to do that...I don't think this is good advice from MS.
    From Kev
  • DNS

    If the message contains just before the alloc_listener part something like 'The requested name is valid, but no data of the requested type was found,' the 'name' part means you might need DNS to be fully operational to start Apache. This happens when you're setting up Apache to listen under specific server aliases.

    Kev : Okay, this is getting frustrating. This was working, but now, when I do a server restart, despite having a DNS dependency, I can see in the log that my Apache service fails at 00:12 and the DNS successfully starts at 00:21. Then after that Apache can start fine. Why is it not honouring the dependency anymore?
    From Kev

0 comments:

Post a Comment