Jump to content

How to Automatically Start Server Service?


Go to solution Solved by ebr,

Recommended Posts

Hey guys,

I run MB3 server on my home server with WHS2011, and was wondering what the proper way of automatically starting it up as a service?

For now, the only way I've gotten it to work is to enter "services.msc", and start it myself.

I thought I set up the service to start automatically, but that doesn't happen. Which means I still need to log into a session to get it started, which is what I'd been doing using the tray icon anyway.

Am I missing something?

Thanks for the help,

CFC

Link to post
Share on other sites

Just having it set to Automatic works for me.  At least I'm pretty sure it does.  I don't think I've restarted the server in quite some time.

 

 526a6b3175389_server.jpg

  • Like 1
Link to post
Share on other sites

Also, make sure you do not have the Media Browser Server program (not service) running at startup.  Go to the dashboard, under advanced, and make sure this it not checked.

 

526a7bcd7abc1_server2.jpg

Link to post
Share on other sites

hmmm.... Yes:

526a8371be92a_GeneralTab.jpg

 

Yes:

526a83989cdb5_LogOn.jpg

 

but this is the result on startup - compared for example with the Logitech service right above it:

 

526a83d05dfcc_ServiceStatus.jpg

 

It's not doing anything, and I have to manually start it nonetheless.

 

Thanks for the help.
Any other tips? :D

CFC

Edited by CFC
Link to post
Share on other sites

I don't know what else might be wrong with it.  I didn't do anything differently than that and it works on mine.  I just restarted the server to make sure and everything worked correctly.

 

I don't have the Logitech Media Server service.  I can't say that it would interfere or anything.  It's just something different than on mine.

Edited by mboehler
Link to post
Share on other sites

Debug. Check the event viewer. Also, check the services that it depends on and make sure they've started.

Thanks.

Maybe we're getting somewhere. These are the two event viewer messages:

Event 7009:
A timeout was reached (30000 milliseconds) while waiting for the Media Browser service to connect.
Event 7000:
The Media Browser service failed to start due to the following error: 
The service did not respond to the start or control request in a timely fashion.

Interesting.

Wish I were better versed at this to figure it out.

 

CFC

Link to post
Share on other sites

Ok.

I believe I've figured out the issue.

The service wouldn't start because apparently by default in WHS there's a 30 second timeout for startup and this requires a little more time.

Perharps this is due to the modest specs of the server, an HP Proliant N54L, or my HD is slow, or maybe it's competing with other services like the Logitech server.

 

Nevertheless, I followed the steps outlined here: http://communities.quest.com/docs/DOC-12526, and put my "ServicesPipeTimeout" at 60000 (60 seconds):

 

 

As per KB http://support.microsoft.com/kb/824344

 

  1. When a service starts, the service communicates to the Service Control Manager how long the service must have to start (the time-out period for the service). If the Service Control Manager does not receive a "service started" notice from the service within this time-out period, the Service Control Manager terminates the process that hosts the service. This time-out period is typically less than 30 seconds. If you do not adjust this time-out period, the Service Control Manager ends the process and the attached debugger while you are trying to debug. To adjust this time-out period, follow these steps:

 

  1. In Registry Editor, locate, and then right-click the following registry subkey:

 

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control

 

  1. Point to New, and then click DWORD Value. In the right pane of Registry Editor, notice that New Value #1 (the name of a new registry entry) is selected for editing.
  2. Type ServicesPipeTimeout to replace New Value #1, and then press ENTER.
  3. Right-click the ServicesPipeTimeout registry entry that you created in step c, and then click Modify. The Edit DWORD Value dialog box appears.
  4. In the Value data text box, type TimeoutPeriod, and then click OK

 

Note TimeoutPeriod is a placeholder for the value of the time-out period (in milliseconds) that you want to set for the service. For example, if you want to set the time-out period to 24 hours (86400000 milliseconds), type 86400000.

  1. Restart the computer. You must restart the computer for Service Control Manager to apply this change.

 

Upon restart, the server was up and running automatically.

This might be worth looking at by the devs to see if there are performance gains that could be made, or this could be just a specific problem on my end.

I'll go ahead and mark this as solved.

EDIT: Here are instructions from Microsoft: http://support.microsoft.com/kb/922918

 

Thanks for the help,

CFC

Edited by CFC
Link to post
Share on other sites
  • Solution

It may have been waiting for other things to initialize (like disk drives or the network) so putting a delay on the startup could make it work as well.  I've never seen the server take more than a few seconds to start.

  • Like 1
Link to post
Share on other sites

It may have been waiting for other things to initialize (like disk drives or the network) so putting a delay on the startup could make it work as well. I've never seen the server take more than a few seconds to start.

I'm willing to try this also just to check. How can I add the delay?

 

CFC

Link to post
Share on other sites

I'm willing to try this also just to check. How can I add the delay?

 

CFC

 

Change the service Startup type from Automatic to Automatic (Delayed Start).

  • Like 1
Link to post
Share on other sites

Thanks.

It also started up properly with a delayed start (after adjusting "ServicesPipeTimeout" back to 30 seconds).

Glad it's running as expected.

Perhaps this'll help someone with the same issue.

CFC

  • Like 1
Link to post
Share on other sites
  • 5 months later...

For your information, I had the same issue although using a "delay start"...

 

IMO, it was due to Media Browser Server trying to auto-update at start ?!.

I.e.: 

I did start Media Browser Server manually (not as a service) and saw there was a pending update...

I did click on "restart" to install that update.

Once successfully restarted, I did "Exit" Media Browser Server and

Did "Start" the service.

 

It was now starting without timeout anymore...

 

Definitively, the service should not do to much as start - or - request more time to start (seems easy with .Net).

 

V.

Edited by vletroye
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...