Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Service is not restarted automaticly

Posted on 2011-03-18
2
Medium Priority
?
308 Views
Last Modified: 2012-05-11
I have a costumer with a SBS2003 running a LOB application.

At least 2-3 times a day the service stops!
The recovery tab is set to RESTART SERVICE on all failures but it doesn't.
I can manually restart the service though with no problems.

I assumed it could be because of the Data Execution Prevention (DEP) but there is nothing here.

Can anyone give me a good idea?
0
Comment
Question by:Ohmit
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
CombatGold1 earned 2000 total points
ID: 35164468
The service could be stopping itself gracefully. A graceful stop is not a failure, which is why the service manager won't restart it automatically. It is worth checking any logs that the application produces to check if this is the case.

FireDaemon is an excellent utility for extensive services management, which offers the feature to restart a service even if it closes down gracefully.

It's not free though, so you may wish to use a batch file to keep your service alive. First of all use the SC command as follows to retrieve service details. I'm going to use service name LOB for this example.
sc qc LOB

Open in new window

You should get a reply similar to this:
[SC] QueryServiceConfig SUCCESS

SERVICE_NAME: LOB
        TYPE               : 20  WIN32_SHARE_PROCESS
        START_TYPE         : 2   AUTO_START
        ERROR_CONTROL      : 1   NORMAL
        BINARY_PATH_NAME   : C:\Program Files\LOB\lob.exe -parameter value -param2
        LOAD_ORDER_GROUP   :
        TAG                : 0
        DISPLAY_NAME       : LOB
        SERVICE_START_NAME : LocalSystem
We're interested in the BINARY_PATH_NAME value there. Now create a batch file along side the service EXE file like this, but replace "C:\Program Files\LOB\lob.exe -parameter value -param2" for what the BINARY_PATH_NAME value is in your service:
@ECHO OFF
:start
C:\Program Files\LOB\lob.exe -parameter value -param2
goto start

Open in new window

Now all that is left is to change your service to use the batch file rather than the executable file directly:
sc config LOB binPath= C:\Program Files\LOB\lob.bat
sc start LOB

Open in new window

Enjoy your service running 24/7.
0
 

Author Closing Comment

by:Ohmit
ID: 35188287
Youre the BEST! ;-)
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The SBS 2011 release date (RTM) is supposed to be around Christmas, 2011.  This article is a compilation of my notes -- things I have learned first hand.  The items are in a rather random order, but I think this list covers most of what is new and d…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

636 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