Solved

Service is not restarted automaticly

Posted on 2011-03-18
2
286 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 500 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Because virtualization becomes more and more common, and, with Microsoft Hyper-V included in Windows Server at no additional costs, and, most server hardware nowadays is more than capable of running a physical Small Business Server (SBS) 2008 or 201…
I’m often asked about newer and larger USB drives connected to SBS2008 and 2011 failing Windows Server Backup vs the older USB drives not failing. As disk space continues to grow and drive technology change SBS2008 and some SBS2011 end up with the f…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

730 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