Jump to content

MB server fails to start on startup.


Swynol
Go to solution Solved by Swynol,

Recommended Posts

Swynol

been having this issue recently, i try to start MB server as a service but it just times out. so i disabled the service and ticked the run at windows start up in MB but it just doesnt start.

 

any ideas what i can do?

Link to comment
Share on other sites

Swynol

no errors in event viewer, 

 

i've noticed when starting up my network connection has the spinning blue circle on it for 20 seconds before it connects, I have drivepool installed so i think it takes a few seconds for this to initiate, i'm not sure if media browser is trying to run before this and cannot connect to the shares as they are on the drivepool. 

 

so checking the media browser service and it hasn't started, but if i right click on it and start it works fine. So i thought i would disable the service and use the start MB at logon within MB server however that fails aswell. i might write a .bat file to delay MB server from starting for a few seconds after login.

 

i already have a bat file which delays MB theatre from starting straight away as it often starts before MB server has loaded so i get the welcome and setting up screen

 

 

i've also noticed recently that my transcoding directory keeps reverting back to default. I've set my transcoding path to \\server\MB3transcode\  but noticed in the info tab that it defaults back after a while to c:\...... even though in the trascoding tab it still has \\server\MB3transcode...

Edited by Crazypete00
Link to comment
Share on other sites

The directory not sticking is a known issue that has been fixed for the next release.

 

The other problem does sound like the network isn't ready.  Can't you use the service configuration to delay the start of MB?

Link to comment
Share on other sites

Swynol

ye thats what im thinking, 

 

does the network have to start up before MB server successfully loads via a service? never done a delay using a service config, i will give it a go when i get home.

 

thanks for the help, keep up the awesome work.

Link to comment
Share on other sites

saitoh183

If your using MB as a service, you might need to change the logon user from "system" to an actual user that has network permissions.

  • Like 1
Link to comment
Share on other sites

saitoh183

If it works once running then this probably isn't your problem but: Unable to access media when running server as a service

 

After re-reading OP,  i agree since it doesnt even seem to start when he runs it normally from exe. I would suggest making sure you do a run As Admin when you start it from exe to make sure

Link to comment
Share on other sites

Swynol

doesnt start automatically as a service, if i wait a few seconds and manually start it it works fine, you have given me a few ideas to try, i think it might be waiting for drivepool service to successfully start, so if i add that as a dependency for media browser service to start it may help. other wise i will create a bat file to start the service after a certain time period. 

 

 

running the exe does work but i have to manually do it.

Link to comment
Share on other sites

Why a bat file?  Can't you just use "Automatic (Delayed Start)" in the service setup?

Link to comment
Share on other sites

Swynol

Automatic-delayed runs a program 2 mins after the last automatic program has started up. This is a little too long as MB3 server is on my HTPC which also runs MB theatre, so waiting for the last service to start which is usually about 60 seconds after logging in then waiting a further 2 mins for the delayed start ups to start and then waiting for MB theatre to start will take too long, if I can make the process shorter it would be great and the wife wont moan so much  :P

 

i'll also try the recovery option in services, maybe on first failure "restart service" second failure run program C:\users\%username%\.....\mediabrowser3.application.server.exe

 531de424f1b5d_Untitled.png

Link to comment
Share on other sites

Swynol

ye, tried to keep the costs down by not having it run on 2 seperate machines. 

 

btw thanks for the help, i know this isnt technically media browser related its more my setup and issues with starting up. so thanks for the input

Link to comment
Share on other sites

saitoh183

So it works from EXE but not via service...you have tried to change the logon to a admin account yet? Also is MB installed on the Drivepool drive or on the C drive?

Link to comment
Share on other sites

Swynol

ye works if i run the exe manually, but not if i set it in MB server to run automatically at logon.

 

not changed anything yet, will when i get home. MB is installed on C drive but all my media shares are on the Drivepool drive including the cache and transcoding directories. 

 

when drivepool service starts it delays my network initialisation from starting until its completed, and im guessing Media Browser needs the network initialisation before it starts successfully. 

Link to comment
Share on other sites

  • Solution
Swynol

just an update for those who helped me and might have a similar issue in future:

 

I changed the Media Browser dependencies in services to be dependent on DrivePoolService, so it doesnt start until drive pool initiates. i also set in recovery that at first fail restart service, second fail to launch the media browser server app.

 

this has cured my issue so thanks for all that suggested ideas above. 

  • Like 2
Link to comment
Share on other sites

saitoh183

just an update for those who helped me and might have a similar issue in future:

 

I changed the Media Browser dependencies in services to be dependent on DrivePoolService, so it doesnt start until drive pool initiates. i also set in recovery that at first fail restart service, second fail to launch the media browser server app.

 

this has cured my issue so thanks for all that suggested ideas above. 

 

Glad you resolve it :)

Link to comment
Share on other sites

TheShanMan

After rebuilding my htpc I'm also running into this problem. I'm going to set the service to restart after failure (thanks for the tip on how to solve this), but clearly this needs to be made more resilient. In my case I have a totally clean startup log, but the process just seems to end without any indication in the log. The windows event viewer has this (not sure if it's related but it sounds like it could be):

Windows detected your registry file is still in use by other applications or services. The file will be unloaded now. The applications or services that hold your registry file may not function properly afterwards.  

 DETAIL - 
 3 user registry handles leaked from \Registry\User\S-1-5-21-3965492788-3152543234-29460700-1109:
Process 2132 (\Device\HarddiskVolume3\Users\Jeff\AppData\Roaming\MediaBrowser-Server\System\MediaBrowser.ServerApplication.exe) has opened key \REGISTRY\USER\S-1-5-21-3965492788-3152543234-29460700-1109
Process 2132 (\Device\HarddiskVolume3\Users\Jeff\AppData\Roaming\MediaBrowser-Server\System\MediaBrowser.ServerApplication.exe) has opened key \REGISTRY\USER\S-1-5-21-3965492788-3152543234-29460700-1109\Software\Microsoft\Windows\CurrentVersion\Explorer
Process 2132 (\Device\HarddiskVolume3\Users\Jeff\AppData\Roaming\MediaBrowser-Server\System\MediaBrowser.ServerApplication.exe) has opened key \REGISTRY\USER\S-1-5-21-3965492788-3152543234-29460700-1109\Control Panel\International

Entire server log:

2014-03-10 16:37:57.6809 Info - Main: Media Browser Server started
2014-03-10 16:37:57.9617 Info - Main: Command line: C:\Users\Jeff\AppData\Roaming\MediaBrowser-Server\system\MediaBrowser.ServerApplication.exe -service
2014-03-10 16:37:57.9617 Info - Main: Server: THEATER
2014-03-10 16:37:57.9929 Info - Main: Operating system: Microsoft Windows NT 6.1.7601 Service Pack 1
2014-03-10 16:37:57.9929 Info - Main: Program data path: C:\Users\Jeff\AppData\Roaming\MediaBrowser-Server
2014-03-10 16:37:57.9929 Info - Main: Application Path: C:\Users\Jeff\AppData\Roaming\MediaBrowser-Server\system\MediaBrowser.ServerApplication.exe
2014-03-10 16:38:03.3437 Info - App: Application Configuration:
	{"WeatherLocation":"Hillsboro, OR","WeatherUnit":"Fahrenheit","EnableHttpLevelLogging":true,"EnableUPnP":true,"HttpServerPortNumber":8096,"LegacyWebSocketPortNumber":8945,"EnableInternetProviders":true,"SeasonZeroDisplayName":"Specials","MetadataRefreshDays":30,"SaveLocalMeta":true,"RefreshItemImages":true,"PreferredMetadataLanguage":"en","MetadataCountryCode":"US","SortReplaceCharacters":[".","+","%"],"SortRemoveCharacters":[",","&","-","{","}","'"],"SortRemoveWords":["the","a","an"],"ShowLogWindow":false,"RecentItemDays":10,"MinResumePct":5,"MaxResumePct":90,"MinResumeDurationSeconds":300,"RealtimeWatcherDelay":20,"EnableDashboardResponseCaching":true,"ManualLoginClients":[],"EnableTvDbUpdates":true,"EnableTmdbUpdates":false,"EnableFanArtUpdates":false,"ImageSavingConvention":"Legacy","EnablePeoplePrefixSubFolders":false,"MediaEncodingQuality":"Auto","AllowVideoUpscaling":false,"EnableMovieChapterImageExtraction":true,"EnableEpisodeChapterImageExtraction":false,"EnableOtherVideoChapterImageExtraction":false,"MetadataOptions":[{"ItemType":"Book","ImageOptions":[{"Type":"Backdrop","Limit":1,"MinWidth":1280}],"DisabledMetadataSavers":[],"LocalMetadataReaderOrder":[],"DisabledMetadataFetchers":[],"MetadataFetcherOrder":[],"DisabledImageFetchers":[],"ImageFetcherOrder":[]},{"ItemType":"MusicAlbum","ImageOptions":[{"Type":"Backdrop","Limit":1,"MinWidth":1280}],"DisabledMetadataSavers":[],"LocalMetadataReaderOrder":[],"DisabledMetadataFetchers":[],"MetadataFetcherOrder":[],"DisabledImageFetchers":[],"ImageFetcherOrder":[]},{"ItemType":"MusicArtist","ImageOptions":[{"Type":"Backdrop","Limit":1,"MinWidth":1280}],"DisabledMetadataSavers":[],"LocalMetadataReaderOrder":[],"DisabledMetadataFetchers":[],"MetadataFetcherOrder":[],"DisabledImageFetchers":[],"ImageFetcherOrder":[]},{"ItemType":"Season","ImageOptions":[{"Type":"Backdrop","Limit":0,"MinWidth":1280}],"DisabledMetadataSavers":[],"LocalMetadataReaderOrder":[],"DisabledMetadataFetchers":[],"MetadataFetcherOrder":[],"DisabledImageFetchers":[],"ImageFetcherOrder":[]}],"EnableDebugEncodingLogging":false,"EnableAutomaticRestart":true,"TvFileOrganizationOptions":{"IsEnabled":false,"MinFileSizeMb":50,"LeftOverFileExtensionsToDelete":[],"WatchLocations":[],"SeasonFolderPattern":"Season %s","SeasonZeroFolderName":"Season 0","EpisodeNamePattern":"%sn - %sx%0e - %en.%ext","MultiEpisodeNamePattern":"%sn - %sx%0e-x%0ed - %en.%ext","OverwriteExistingEpisodes":false,"DeleteEmptyFolders":false},"LiveTvOptions":{},"EnableRealtimeMonitor":true,"PathSubstitutions":[],"EnableDebugLevelLogging":true,"EnableAutoUpdate":true,"SystemUpdateLevel":"Beta","LogFileRetentionDays":7,"RunAtStartup":false,"IsStartupWizardCompleted":true}
2014-03-10 16:38:03.8585 Info - App: Loading AutoBoxSets, Version=0.0.1.2, Culture=neutral, PublicKeyToken=null
2014-03-10 16:38:03.8585 Info - App: Loading MediaBrowser.Plugins.ADEProvider, Version=1.0.5163.42927, Culture=neutral, PublicKeyToken=null
2014-03-10 16:38:03.8585 Info - App: Loading MediaBrowser.Plugins.RottenTomatoes, Version=1.0.5180.37338, Culture=neutral, PublicKeyToken=null
2014-03-10 16:38:03.8585 Info - App: Loading PodCasts, Version=1.0.1.1, Culture=neutral, PublicKeyToken=null
2014-03-10 16:38:03.8585 Info - App: Loading wmc2mb, Version=1.0.0.26, Culture=neutral, PublicKeyToken=null
2014-03-10 16:38:03.8585 Info - App: Loading MediaBrowser.Api, Version=3.0.5171.19958, Culture=neutral, PublicKeyToken=null
2014-03-10 16:38:03.8585 Info - App: Loading MediaBrowser.WebDashboard, Version=3.0.5171.19957, Culture=neutral, PublicKeyToken=null
2014-03-10 16:38:03.8585 Info - App: Loading MediaBrowser.Model, Version=3.0.5171.19956, Culture=neutral, PublicKeyToken=null
2014-03-10 16:38:03.8585 Info - App: Loading MediaBrowser.Common, Version=3.0.5171.19957, Culture=neutral, PublicKeyToken=null
2014-03-10 16:38:03.8585 Info - App: Loading MediaBrowser.Controller, Version=3.0.5171.19957, Culture=neutral, PublicKeyToken=null
2014-03-10 16:38:03.8585 Info - App: Loading MediaBrowser.Providers, Version=3.0.5171.19958, Culture=neutral, PublicKeyToken=null
2014-03-10 16:38:03.8585 Info - App: Loading MediaBrowser.Common.Implementations, Version=3.0.5171.19957, Culture=neutral, PublicKeyToken=null
2014-03-10 16:38:03.8585 Info - App: Loading MediaBrowser.Server.Implementations, Version=3.0.5171.19958, Culture=neutral, PublicKeyToken=null
2014-03-10 16:38:03.8585 Info - App: Loading MediaBrowser.Dlna, Version=3.0.5171.19958, Culture=neutral, PublicKeyToken=null
2014-03-10 16:38:03.8585 Info - App: Loading MediaBrowser.IsoMounter, Version=1.0.5079.1480, Culture=neutral, PublicKeyToken=null
2014-03-10 16:38:03.8585 Info - App: Loading MediaBrowser.ServerApplication, Version=3.0.5171.19958, Culture=neutral, PublicKeyToken=null
2014-03-10 16:38:05.6993 Info - App: Version 3.0.5171.19958 initializing
2014-03-10 16:38:07.3061 Info - SqliteUserRepository: Opening C:\Users\Jeff\AppData\Roaming\MediaBrowser-Server\data\users.db
2014-03-10 16:38:08.9909 Info - SqliteItemRepository: Opening C:\Users\Jeff\AppData\Roaming\MediaBrowser-Server\data\chapters.db
2014-03-10 16:38:09.0845 Info - SqliteItemRepository: Opening C:\Users\Jeff\AppData\Roaming\MediaBrowser-Server\data\mediainfo.db
2014-03-10 16:38:09.2093 Info - SqliteFileOrganizationRepository: Opening C:\Users\Jeff\AppData\Roaming\MediaBrowser-Server\data\fileorganization.db
2014-03-10 16:38:10.9409 Info - SqliteDisplayPreferencesRepository: Opening C:\Users\Jeff\AppData\Roaming\MediaBrowser-Server\data\displaypreferences.db
2014-03-10 16:38:10.9409 Info - SqliteItemRepository: Opening C:\Users\Jeff\AppData\Roaming\MediaBrowser-Server\data\library.db
2014-03-10 16:38:10.9409 Info - SqliteNotificationsRepository: Opening C:\Users\Jeff\AppData\Roaming\MediaBrowser-Server\data\notifications.db
2014-03-10 16:38:11.0033 Info - SqliteUserDataRepository: Opening C:\Users\Jeff\AppData\Roaming\MediaBrowser-Server\data\userdata_v2.db
2014-03-10 16:38:11.6429 Info - SqliteProviderInfoRepository: Opening C:\Users\Jeff\AppData\Roaming\MediaBrowser-Server\data\refreshinfo.db
2014-03-10 16:38:12.5165 Info - HttpServer: Calling ServiceStack AppHost.Init
2014-03-10 16:38:14.2169 Info - ServiceStackHost: Initializing Application took 4134.0073ms
2014-03-10 16:38:14.2481 Info - App: Loading Http Server
2014-03-10 16:38:14.4821 Info - HttpServer: Adding HttpListener prefix http://+:8096/mediabrowser/
2014-03-10 16:38:14.5289 Info - HttpServer: Starting HttpListner
2014-03-10 16:38:14.6849 Info - App: Starting Alchemy web socket server on port 8945
2014-03-10 16:38:14.7161 Info - App: Alchemy Web Socket Server started
2014-03-10 16:38:15.8081 Info - ServerWMC: Config IP: 127.0.0.1 (127.0.0.1), Config Port: 9080
Edited by TheShanMan
Link to comment
Share on other sites

saitoh183

You have UAC enabled? if so , try to disable it entirely and run the server

Link to comment
Share on other sites

Swynol

what you can check is when you first log into windows go straight into task manager and sort the service list by started, starting, not started.

 

check which ones are taking the longest to start, they could be the cause. then what you can try is adding the service that's taking the longest to start as a dependency for media browser to start. So in other words after the last service starts then the Media Browser starts. 

 

I had to do the above because DrivePool was taking too long to initialise and causing my network initialization to take longer than normal.

Link to comment
Share on other sites

TheShanMan

You have UAC enabled? if so , try to disable it entirely and run the server

 

That wouldn't be it because the service starts fine if I try a short while after windows finishes booting.

 

what you can check is when you first log into windows go straight into task manager and sort the service list by started, starting, not started.

 

check which ones are taking the longest to start, they could be the cause. then what you can try is adding the service that's taking the longest to start as a dependency for media browser to start. So in other words after the last service starts then the Media Browser starts. 

 

I had to do the above because DrivePool was taking too long to initialise and causing my network initialization to take longer than normal.

 

It looks like I'm going to have to take this approach because setting the service to restart on error doesn't help the case where it doesn't start properly to begin with. It doesn't even retry in that case, from what I can see in the event viewer.

 

Is this going to get fixed? It certainly isn't reasonable to expect users to set up service dependencies. Whether MB should be setting up a dependency or just internally waiting for whatever it needs to start properly, it should be resilient.

Link to comment
Share on other sites

It is pretty hard for us to know exactly what we will be dependent on in each environment but we're getting better with each release.

 

Running as a service is an advanced feature right now so it is expected that you have a bit of advanced knowledge.

Link to comment
Share on other sites

Swynol

That wouldn't be it because the service starts fine if I try a short while after windows finishes booting.

 

 

It looks like I'm going to have to take this approach because setting the service to restart on error doesn't help the case where it doesn't start properly to begin with. It doesn't even retry in that case, from what I can see in the event viewer.

 

Is this going to get fixed? It certainly isn't reasonable to expect users to set up service dependencies. Whether MB should be setting up a dependency or just internally waiting for whatever it needs to start properly, it should be resilient.

did you find out which service was causing the issue? narrowing the service down could help the media browser team find out why this is happening.

Link to comment
Share on other sites

TheShanMan

It is pretty hard for us to know exactly what we will be dependent on in each environment but we're getting better with each release.

 

Running as a service is an advanced feature right now so it is expected that you have a bit of advanced knowledge.

 

Great. It helps a lot to know that the intention is to improve this! I can live with the idiosyncrasies for now because I do fall into the "advanced knowledge" category. My concern is for when adoption of MB3 takes off, especially with non-early adopter types. As long as this has the eyes of the developers I'm not worried though.

 

did you find out which service was causing the issue? narrowing the service down could help the media browser team find out why this is happening.

 

I haven't had time to try debugging it. My setup doesn't normally lend itself to debugging bootup issues, so the couple of times I've had to reboot so far I've just remoted into the box to start the service manually. Of course I could just set the service to start delayed, but that certainly isn't the permanent solution to this problem because who wants to add an additional 2 minutes to the effective boot time?

 

Thanks guys!

Link to comment
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...