Automatic Service start should not cause an automatic restart
We have a service which is set to automatic start because it needs to start when the server boots. We also have a tool to stop and start the service from the console (.NET ServiceController). Unfortunately, we have found out that if the service is set to start automatically this also causes the service to start again when stopped by the user. Can this be avoided in anyway? TIA SrenBest regards Soeren D.
April 27th, 2012 10:43am

Check the recovery tab on the service. I'd guess that the tool causes the service to exhibit behaviour of a failure. KarlWhen you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer My Blog: http://unlockpowershell.wordpress.com My Book: Windows PowerShell 2.0 Bible My E-mail: -join ("6B61726C6D69747363686B65406D742E6E6574"-split"(?<=\G.{2})",19|%{[char][int]"0x$_"})
Free Windows Admin Tool Kit Click here and download it now
April 27th, 2012 3:16pm

I'm not sure whether a manually stopped service starts automatically based on the recovery options. still you can change the recovery tab portions to take no action under service properties and see if that works for you. Sachin Gadhave (MCP, MCTS)
April 27th, 2012 3:38pm

Sachin, the answer to that is, it doesn't: services set to automatic do automatically restart when they are stopped through receiving a STOP command (SERVICE_CONTROL_STOP) message from the Service Control Manager. The startup type only affects the post-reboot behaviour. If the service is stopped manually after that time, it has no bearing on the behaviour. If the service fails for some reason or the service process is terminated (i.e. through Task Manager or another means), then as Karl mentioned above, the behaviour is goverened by the recovery actions specified in the Recovery tab. I'd be checking the System event log to see if the service is being stopped by the Service Control Manager, as it should be. As Karl said, then check the Recovery tab. Finally, I'd also suggest checking the Dependencies tab and make sure nothing depends upon this service. If something does, and it's being started or restarted, that will trigger the starting of the service you're trying to stop. Some applications (including other services) monitor services they depend upon and will attempt to start them if they're stopped for any reason. If this is the case here, then it may prove difficult to work around. Along similar lines, monitoring solutions like Systems Center Operations Manager or Nagios can also be configured to monitor services and take remedial action if they're not running. Cheers, Lain
Free Windows Admin Tool Kit Click here and download it now
April 27th, 2012 7:48pm

Check the recovery tab on the service. I'd guess that the tool causes the service to exhibit behaviour of a failure. KarlWhen you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer My Blog: http://unlockpowershell.wordpress.com My Book: Windows PowerShell 2.0 Bible My E-mail: -join ("6B61726C6D69747363686B65406D742E6E6574"-split"(?<=\G.{2})",19|%{[char][int]"0x$_"})
April 27th, 2012 10:07pm

I'm not sure whether a manually stopped service starts automatically based on the recovery options. still you can change the recovery tab portions to take no action under service properties and see if that works for you. Sachin Gadhave (MCP, MCTS)
Free Windows Admin Tool Kit Click here and download it now
April 27th, 2012 10:30pm

Sachin, the answer to that is, it doesn't: services set to automatic do automatically restart when they are stopped through receiving a STOP command (SERVICE_CONTROL_STOP) message from the Service Control Manager. The startup type only affects the post-reboot behaviour. If the service is stopped manually after that time, it has no bearing on the behaviour. If the service fails for some reason or the service process is terminated (i.e. through Task Manager or another means), then as Karl mentioned above, the behaviour is goverened by the recovery actions specified in the Recovery tab. I'd be checking the System event log to see if the service is being stopped by the Service Control Manager, as it should be. As Karl said, then check the Recovery tab. Finally, I'd also suggest checking the Dependencies tab and make sure nothing depends upon this service. If something does, and it's being started or restarted, that will trigger the starting of the service you're trying to stop. Some applications (including other services) monitor services they depend upon and will attempt to start them if they're stopped for any reason. If this is the case here, then it may prove difficult to work around. Along similar lines, monitoring solutions like Systems Center Operations Manager or Nagios can also be configured to monitor services and take remedial action if they're not running. Cheers, Lain
April 28th, 2012 2:40am

Hi thanks for your replies. I have followed your leads: 1) There are no dependencies. 2) Recovery has no actions 3) The STOPPED state are perfectly valid. 4) The eventviewer just logs: The ProcessRunnerService service entered the stopped state. The ProcessRunnerService service entered the running state. With no logs in between. Could it be Symantec or Tivoli software? Best regards Soeren D.
Free Windows Admin Tool Kit Click here and download it now
April 30th, 2012 5:01am

If this is a third party application service can you check if there are any API's designed to trigger any events causing the service to start automatically. Also you can call the application vendor if it's third party product. Could it be Symantec or Tivoli software? I doubt that an AV or a monitoring tool like Tivoli can send a service start/stop control to an non-owned service. Sachin Gadhave (MCP, MCTS)
April 30th, 2012 5:14am

Hi Sachin, thanks for the input, the service is a managed Service written by me :)Best regards Soeren D.
Free Windows Admin Tool Kit Click here and download it now
April 30th, 2012 5:37am

Can you verify if the registry entries for this service are appropriate? Compare with other services. HKEY_LOCAL_MACHINE \System \CurrentControlSet \Services \Service_Name Make sure value of Start is set to 3 (manual). Sachin Gadhave (MCP, MCTS)
April 30th, 2012 5:50am

Sachin, With your final sentence, you're right insofar as an antivirus product shouldn't be doing this, but a management platform such as Tivoli would absolutely be doing something like this if it was configured to do so (important stipulation there): it's precisely what management and monitoring platforms are designed to do. Cheers, Lain
Free Windows Admin Tool Kit Click here and download it now
April 30th, 2012 5:55am

Thanks guys The Value is set to 2, which probably is automatic which is what I want. I need it to start when the server is booted. Lain, I will ask IBM (it is their servers).Best regards Soeren D.
April 30th, 2012 7:03am

Can you verify if the registry entries for this service are appropriate? Compare with other services. HKEY_LOCAL_MACHINE \System \CurrentControlSet \Services \Service_Name Make sure value of Start is set to 3 (manual). Sachin Gadhave (MCP, MCTS)
Free Windows Admin Tool Kit Click here and download it now
April 30th, 2012 12:47pm

Sachin, With your final sentence, you're right insofar as an antivirus product shouldn't be doing this, but a management platform such as Tivoli would absolutely be doing something like this if it was configured to do so (important stipulation there): it's precisely what management and monitoring platforms are designed to do. Cheers, Lain
April 30th, 2012 12:53pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics