Service startup order

  • Thread starter Thread starter Jon Espen Carlsen
  • Start date Start date
J

Jon Espen Carlsen

Guest
I've got a bit of a headache. Im trying to control the startup order of a few
services, but I cant get to actually work. Platform, Windows 2003 SP2 R2

I started with using the "dependency" method, but adding the
"DependOnService" for the services in question.
The service "lanmanserver" (shares) depends on a SAN-disk and it's service,
"Z-SANService".
So I added the key:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver]
"DependOnService"=hex(7):5a,00,2d,00,53,00,41,00,4e,00,53,00,65,00,72,00,76,00,\
69,00,63,00,65,00,00,00,4e,00,6c,00,61,00,00,00,00,00

No joy - the shares are not created in timely manner enough after the
volumes are available.
I tested with 3 other services that depends on the availability of shares -
I set them to be depended on "lanmanserver".

Looking at the services in the service-console shows the dependency correctly.

Rebooting the server - still no joy. The services that are told to depend on
lanmanserver starts up too soon, according to the even-log. "Failed to start
service, path not found". (Yes, they are stored on the SAN disk - the whole
solution is stored there.

So I researched some more. It seems you can change the "ServiceGroupOrder"
too in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ServiceGroupOrder
I tried to find if lanmanserver was part of a group, obviously it was not.
So I added all of them there, just to see if it worked.
At the end I appended:
Z-SANService
lanmanserver
MEngine
MTask
MTrigger

Still no joy - the MEngine (stored on the SAN disk) is still not found.

Any ideas? Do I have a bug here? Or are there other things I can try?
 
RE: Service startup order

I forgot to add that I do have the "Always wait for the network at computer
startup and logon" policy enabled for the whole domain in general (there's a
few services depending on this).
Maybe it's interfering with what Im trying to do?
 
Re: Service startup order


"Jon Espen Carlsen" <Jon Espen Carlsen@discussions.microsoft.com> wrote in
message news:71E52E68-D289-4B73-9F76-C4C1CA584EFF@microsoft.com...
> I've got a bit of a headache. Im trying to control the startup order of a
> few
> services, but I cant get to actually work. Platform, Windows 2003 SP2 R2
>
> I started with using the "dependency" method, but adding the
> "DependOnService" for the services in question.
> The service "lanmanserver" (shares) depends on a SAN-disk and it's
> service,
> "Z-SANService".
> So I added the key:
> [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver]
> "DependOnService"=hex(7):5a,00,2d,00,53,00,41,00,4e,00,53,00,65,00,72,00,76,00,\
> 69,00,63,00,65,00,00,00,4e,00,6c,00,61,00,00,00,00,00
>
> No joy - the shares are not created in timely manner enough after the
> volumes are available.
> I tested with 3 other services that depends on the availability of
> shares -
> I set them to be depended on "lanmanserver".
>
> Looking at the services in the service-console shows the dependency
> correctly.
>
> Rebooting the server - still no joy. The services that are told to depend
> on
> lanmanserver starts up too soon, according to the even-log. "Failed to
> start
> service, path not found". (Yes, they are stored on the SAN disk - the
> whole
> solution is stored there.
>
> So I researched some more. It seems you can change the "ServiceGroupOrder"
> too in
> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ServiceGroupOrder
> I tried to find if lanmanserver was part of a group, obviously it was not.
> So I added all of them there, just to see if it worked.
> At the end I appended:
> Z-SANService
> lanmanserver
> MEngine
> MTask
> MTrigger
>
> Still no joy - the MEngine (stored on the SAN disk) is still not found.
>
> Any ideas? Do I have a bug here? Or are there other things I can try?
>
>


Put all services on "Manual start", then use the Task Scheduler
to launch a batch file at boot time. Inside this batch file you
place a number of statements like so:

net start Z-SANService
net start lanmanserver
ping localhost -n 30 > nul
net start MEngine
net start MTask
net start MTrigger

This will give you full control over the order in which services
are launched. It will also let you add delays if desired.
 
Re: Service startup order

"Pegasus (MVP)" wrote:
>
> Put all services on "Manual start", then use the Task Scheduler
> to launch a batch file at boot time. Inside this batch file you
> place a number of statements like so:
>
> net start Z-SANService
> net start lanmanserver
> ping localhost -n 30 > nul
> net start MEngine
> net start MTask
> net start MTrigger
>
> This will give you full control over the order in which services
> are launched. It will also let you add delays if desired.
>
>


Good workaround - will do the job. Sometimes one can become blind because of
so many different tests. ;)
Just curious tough - do you think we're dealing with a "bug" or was I trying
to push the intended mechanisms a bit too far?
 
Re: Service startup order


"Jon Espen Carlsen" <JonEspenCarlsen@discussions.microsoft.com> wrote in
message news:9267129F-0D8B-4EB5-84ED-E460CABC00D8@microsoft.com...
> "Pegasus (MVP)" wrote:
>>
>> Put all services on "Manual start", then use the Task Scheduler
>> to launch a batch file at boot time. Inside this batch file you
>> place a number of statements like so:
>>
>> net start Z-SANService
>> net start lanmanserver
>> ping localhost -n 30 > nul
>> net start MEngine
>> net start MTask
>> net start MTrigger
>>
>> This will give you full control over the order in which services
>> are launched. It will also let you add delays if desired.
>>
>>

>
> Good workaround - will do the job. Sometimes one can become blind because
> of
> so many different tests. ;)
> Just curious tough - do you think we're dealing with a "bug" or was I
> trying
> to push the intended mechanisms a bit too far?
>


I never call something a but until I have performed many tests
and acquired a good understanding of how it's supposed to
work. Since neither is the case with the startup order of
services, I cannot offer an opinion.
 
Re: Service startup order

Thank you very much for your assistance and input. ;)

- Jon
 
Back
Top