Solved

Service is not restarted automaticly

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Small Business Server 2011. NOTE: This guide has been written using the preview version of SBS2011 therefore some of the screens may …
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.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

770 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