0

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?

womble
  • 95,029
  • 29
  • 173
  • 228
Kev
  • 964
  • 4
  • 23
  • 46
  • 1
    this may help http://serverfault.com/questions/84181/can-the-startup-order-for-windows-services-be-configured-if-so-where – Kara Marfia Nov 17 '09 at 14:17
  • Thanks, I didn't see that on the search results. – Kev Nov 17 '09 at 14:56
  • No worries, I've done it too, and that was new info for me. ;) If this is a duplicate, I'll just mark it, if you don't need this Q anymore? – Kara Marfia Nov 17 '09 at 16:05
  • I think I've tailored it a bit more so as to be no longer a duplicate. Besides, in the other question it was just said 'you need to add dependencies' but not how to actually do that. I see nothing in the Services GUI. – Kev Nov 17 '09 at 16:11
  • Maybe I'll split the questions. – Kev Nov 23 '09 at 13:58
  • Turns out phrasing them separately lead me to the answer much more easily: http://serverfault.com/questions/24821/how-to-add-dependency-on-a-windows-service-after-the-service-is-installed – Kev Nov 23 '09 at 14:01
  • But my question as to which real dependencies to add still remains. – Kev Nov 23 '09 at 14:01

2 Answers2

1

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
  • 964
  • 4
  • 23
  • 46
  • 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? – Kev Aug 17 '10 at 12:31
0

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
  • 964
  • 4
  • 23
  • 46
  • 1
    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. – Kev Aug 17 '10 at 12:29