Jump to content
lifespeed

server doesn't auto start as service

Recommended Posts

lifespeed

Hi,

 

I am trying to migrate from Media Browser 2 to the new client/server configuration using server 3.0.5607.2 and Emby Classic.

 

I have been able to get it to work on my local network so long as it is running.  But it won't run as a service automatically.  I have it configured to automatically start (both delayed and not) and to run as a local system service.  When I check it after logging in the service is not running, even though it is set to automatic.  I still have to start it manually.  I have the option to start automatically in the server localhost configurator unchecked.

 

I need this to work when no users are logged in to the PC that is running Emby server.

 

Lifespeed

Share this post


Link to post
Share on other sites
ebr

Are logs generated when you re-start the machine?  It may just be that it is starting up before things like the network have initialized so it is failing.

 

Also, be sure you give it user credentials with proper access to your media location(s).  See: Unable to access media when running server as a service

Share this post


Link to post
Share on other sites
nagetech

I have this issue too. In my server's case, it is becuase the TCP/IP doesn't start up fast enough. I have to manually start the service, which I think defeats the purpose of it.

 

I'm curious, can't I change the dependencies on the Media Browser Service to not have dependencies? Would it hurt anything?

Share this post


Link to post
Share on other sites
FrostByte

Does the system's event viewer show any kind of error?  It works fine on my old i3 and it's not delayed

Share this post


Link to post
Share on other sites
nagetech

I don't see an error, but considering I saw the depencies, I know for a fact that that TCP/IP Driver loads last. Active Directory Throws errors at me every boot about it because the Intel NIC in there (by design) has a delayed start. I am willing to try editing the dependencies for Media Browser and remove them, but want to confirm from one of the developers removing the dependencies from Media Browser won't affect anything.

Share this post


Link to post
Share on other sites
lifespeed

This is all good information.  I will add that I don't believe running the service as a local system service is a permissions issue.  When I manually start it, I can access the media fine.  Also, I think (not sure about this) that running as a local system service means it can run when no users are logged on.

 

Not starting the service because other services are not yet started sounds like a reasonable problem to investigate.  I know my PC starts up painfully slow due to having a regular spinning HDD that is not that fast.  I did try setting the service as automatic delayed start, but I don't think this helped.  I will check again this evening.

 

I believe it is critically important the server can run automatically at startup, without a user logging in.  Just as an automatic service comparison, I have Filezilla FTP server on this same PC and it runs automatically and can be accessed over the internet without issue without a user login.

Share this post


Link to post
Share on other sites
FrostByte

On the service recovery tab you can also tell it to keep retrying restarting the service on failure if you think the delay isn't enough time for all the other services to start. 

 

Or if you're familiar with Powershell you might be able to add a script to the local group policy editor (gpedit) to start the service on startup (not logon) that way you don't have to be logged in as with a batch file

 

Something like this might get you started

 

Start-Sleep -Seconds 300

Start-Service - Name "MediaBrowser"

 

 

-OR

 

You can also change the time in which all delayed services start by adding the AutoStartDelay key and setting it to something higher than the default of 120 seconds after the last automatic service starts

 

Open regedit

Select HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ in the keys tree

Right click the right panel -> New -> String Value , name it as AutoStartDelay

Set AutoStartDelay value to 300, or to the desired delay in seconds

Edited by FrostByte

Share this post


Link to post
Share on other sites
lifespeed

Here is a link for the quote below regarding local system service account.  It would appear to have the needed permissions to run the server, which I noticed is located in:

C:\Users\Username\AppData\Roaming\MediaBrowser-Server\System\MediaBrowser.ServerApplication.exe

LocalSystem account

  • Name: .\LocalSystem (can also use LocalSystem or ComputerName\LocalSystem)
  • the account has no password (any password information you provide is ignored)
  • HKCU represents the default user (LocalSystem has no profile of its own)
  • has extensive privileges on the local computer
  • presents the computer's credentials to remote servers

Completely trusted account, moreso than the administrator account. There is nothing on a single box that this account can not do and it has the right to access the network as the machine (this requires Active Directory and granting the machine account permissions to something)

 

Share this post


Link to post
Share on other sites
GhostRider

Hi

 

The service needs to run as the userid that you installed Media Browser Server with. Have you tried selecting the Media Browser Service - select the "Log On" tab, Check the "This Account" radio button and enter the account name and password. The account has to have a password set.

Share this post


Link to post
Share on other sites
FrostByte

Only has to be a different account if you have shares on another server such as a NAS. Mine is using the fault system account.

  • Like 1

Share this post


Link to post
Share on other sites
lifespeed

Only has to be a different account if you have shares on another server such as a NAS. Mine is using the fault system account.

 

This is what I have seen.  Local System account will work if Automatic Delayed Start is used, the media HDD is local not networked in my case.  Does not work if Automatic Start (no delay) is used.  Seems to be accessible from boot with no user login at the server.

Share this post


Link to post
Share on other sites
moviefan

Also, I think (not sure about this) that running as a local system service means it can run when no users are logged on.

 

Just wanted to point out that an automatic service can start without any users logged on while configured to use any account - user accounts or system defaults.  

 

I have this setup with a regular user account and password and it works great.

Edited by moviefan

Share this post


Link to post
Share on other sites
FrostByte

Right now I'm running the service using the default system account and no delayed startup. As mentioned one of the benefits of running as a service is that you don't have to be logged on which has a few benefits. For me using a dedicated htpc with an old dual core processor and having no one logged in I find the system uses a lot less resources.

 

I guess everyone's system is different and what a person has going on during system startup may determine if they need the delay or not when running as a service. Some may even find that the default delay may not be enough time for them and need to override it.

Share this post


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...