Jump to content

Updating Server Manually due to using the service?


Crestj
 Share

Go to solution Solved by CBers,

Recommended Posts

I started using the service feature and now notice that each server update requires me to download the update manually and install them after shutting the service down.

 

Is this because I'm using the service or is it a feature of the new server?

 

The server always used to just prompt me to update and I could just click to restart MBServer.

 

My server is logged in with a user permenantly anyway (for MediaCentreMaster) so I don't really need to use a service but I thought it would be neater.

 

Also, I know the Dashboard cannot restart the service yet but does the Shutdown Server button stop the service?

Edited by Crestj
Link to comment
Share on other sites

  • Solution

It's due to a current limitation within the service.

 

During dev testing, we were having issues with consistently restarting the service, so the manual download and restart was implemented.

 

If it's causing a problem, stop the service and restart as previously done.

 

Automatic downloads and updates will be performed, you will only have to restart the server.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

1 month is old now ;).

 

Yes, this is still the case.  We were not able to reliably restart the application when running as a service.

Link to comment
Share on other sites

time flies  :D.  Does your restart server app work with running as a service?

 

Give it a try.  I fear it will have the same issues.  If so, I will modify it to not run if you are in service mode.

Link to comment
Share on other sites

Yea, IApplicationHost has a CanSelfRestart property. It might be throwing an exception if that's false and you try to call it anyway.

Link to comment
Share on other sites

I've had the plugin installed since it was released and am running the server as a service.  This morning was the first time the service did not start automatically.  The server also restarted last night due to Windows Update, so that may have had something to do with it.  

Link to comment
Share on other sites

I've had the plugin installed since it was released and am running the server as a service.  This morning was the first time the service did not start automatically.  The server also restarted last night due to Windows Update, so that may have had something to do with it.  

 

So, is it actually re-starting or are you getting the exception Luke mentioned and it isn't?

Link to comment
Share on other sites

2013-11-14 04:00:01.0696, Info, App, DailyTrigger fired for task: Scheduled Server Restart
2013-11-14 04:00:01.0852, Info, App, Executing Scheduled Server Restart
2013-11-14 04:00:01.1008, Info, App, Re-starting server as requested/scheduled...
2013-11-14 04:00:01.5688, Info, Main, Disposing app host
2013-11-14 04:00:01.5844, Info, App, Disposing ApplicationHost
2013-11-14 04:00:01.5844, Info, App, Disposing TaskManager
2013-11-14 04:00:05.1256, Info, Main, Media Browser Server started
2013-11-14 04:00:05.1568, Info, Main, Command line: C:\Users\Administrator\AppData\Roaming\MediaBrowser-Server\System\MediaBrowser.ServerApplication.exe
2013-11-14 04:00:05.1568, Info, Main, Server: SERVER
2013-11-14 04:00:05.1568, Info, Main, Operating system: Microsoft Windows NT 6.1.7601 Service Pack 1
2013-11-14 04:00:05.1568, Info, Main, Program data path: C:\Users\Administrator\AppData\Roaming\MediaBrowser-Server
2013-11-14 04:00:05.1724, Info, Main, Executable: C:\Users\Administrator\AppData\Roaming\MediaBrowser-Server\System\MediaBrowser.ServerApplication.exe

It looks like it to me.

Edited by gthrift
Link to comment
Share on other sites

It is throwing an exception, so if running as a service it's not going to get very far...

 

            if (!CanSelfRestart)
            {
                throw new InvalidOperationException("The server is unable to self-restart. Please restart manually.");
            }
 
 
If the plugin calls this without a try/catch it may crash the server.
Link to comment
Share on other sites

gthrift - based on your command line it doesn't look like you are running as a service...

 

luke - it is within a scheduled task so the task should simply fail with the message you provided.

Link to comment
Share on other sites

That's weird.  It is running as a service.  Its on a headless server that had not been logged into until I pulled those logs.

Link to comment
Share on other sites

I may be off base on my understanding of the topic but why not just create a script to restart the service and then create a scheduled task to run the script every night? This will just automatically download and install updates no?

 

Script I have for this already in place is quite simple..

 

Net Stop "MediaBrowser"
Net Start "MediaBrowser"
Link to comment
Share on other sites

 

I may be off base on my understanding of the topic but why not just create a script to restart the service and then create a scheduled task to run the script every night? This will just automatically download and install updates no?

 

Script I have for this already in place is quite simple..

 

Net Stop "MediaBrowser"
Net Start "MediaBrowser"

 

Problem with the script is that there is no actual feedback. You run the script, but you don't know if the script actually executed properly, just that it ran.

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
 Share

×
×
  • Create New...