Solved

Service Recovery Windows 2003 - what about when service fails to start after reboot?

Posted on 2015-01-29
9
70 Views
Last Modified: 2015-02-05
If you set service to restart after failure I guess this applies to FAILURE only?

i.e. Not if service fails to start after server is booted?

Is there any way to do this? At the moment, our server reboots (planned) every night but sometimes services fail to start.
0
Comment
Question by:paul williams
  • 4
  • 3
  • 2
9 Comments
 
LVL 29

Accepted Solution

by:
Rich Weissler earned 500 total points
ID: 40578962
Is there any way to do this?

You can write a batch file, which checks to see if the service is running, and if it isn't, attempts to start it.  So do 'net start' from the command line, and find the name for your service.
Then have the batch file perform a:
net start | find /i "[exact name of service found above]"
if errorlevel==1 net start "[exact name of service you want to make certain is running]"

You can then use "Scheduled Tasks" to run the batch file, scheduled to run daily at a time after the server should have recovered from it's reboot.  (And if you like, you can use the Advanced Schedule Options to repeatedly run the task... it'll only attempt to start the service if it doesn't find it in the list of running tasks.)
0
 
LVL 68

Expert Comment

by:Qlemo
ID: 40579291
If it are a few, specific services, set them to Delayed start. Often start failures on boot are caused by dependant services not running on time.
0
 
LVL 29

Expert Comment

by:Rich Weissler
ID: 40579336
I believe the option to set services to 'Delayed Start' was added to Windows Server 2008.  That said, if you can identify a dependent service, you can delay the start of your problematic service(s) by setting a dependency.
0
 
LVL 68

Expert Comment

by:Qlemo
ID: 40579447
Sorry, that is correct. Didn't see "Windows 2003". So "Delayed Start" is not available.
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:paul williams
ID: 40579608
For now, we're using a batch file and scheduled job.
0
 

Author Comment

by:paul williams
ID: 40590858
I've requested that this question be closed as follows:

Accepted answer: 0 points for paul williams's comment #a40579608

for the following reason:

This is the only way under 2003.
0
 
LVL 29

Expert Comment

by:Rich Weissler
ID: 40590859
I believe this is exactly what was suggested under the first comment (#40578962).
0
 

Author Comment

by:paul williams
ID: 40591232
sorry you are correct.
0
 

Author Closing Comment

by:paul williams
ID: 40591299
Sorry I missed this one. Excellent idea.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Numerous times I have been asked this questions that what is it that makes my machine log on so slow, there have been cases where computers took 23 minute exactly after taking password and getting to the desktop. Interesting thing was the fact th…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now