Jump to content

Server can't restart or update


Recommended Posts

tjmcd.314
Posted

I'm having issues restarting and updating the server. Windows 7, build 3.0.5943.0 (at least I think). I have the checkboxes clicked for automatic installs and restarts for updates for beta builds.

 

Ignoring the automatic part for a moment, if I sign in to the server using the web ui (IE 11), it tells me there is an update installed and that I need to restart. If I click on the restart button, a second server process appears in task manager for a moment but then disappears. After a few minutes the original process closes as well. The original process creates a log file (see attached log server-1) that has a few errors on the shut down:

 

HttpAsyncTaskHandler: Error occured while Processing Request: Object reference not set to an instance of an object.

 

I don't know what that means, but it continues on immediately until the last line about calling environment.exit

 

the second process creates another log (server-2) that just shows it starting up, seeing the running original process, waiting 15 seconds, and then giving up and shutting down.

 

At this point you can wait forever and nothing will happen. Trying to start the server again creates another log file (server-3) which just shows the server starting up, seeing the update, and then immediately shutting down. But I'm not sure what's supposed to happen here because again you can wait forever but nothing happens. I don't see any reference to another installer.exe that should be started here for me to try and run manually.

 

Starting the server again shows the normal startup behavior (server-4) but it's the old version. At which point I can start the whole process again.

 

I did find an installer exe located in %appdata\local\temp\mediabrowser.installer.exe, but clicking on it seemed to have no effect.

 

As a side note if I do nothing the server will eventually try to automatically update at which point it will shut down and never restart. Prompting me to complete the cycle manually. Also when I select restart from the web UI it doesn't exit IE, it just becomes unresponsive (the web UI not the server which has already closed).

server-1.txt

server-2.txt

server-3.txt

server-4.txt

tjmcd.314
Posted

I did see this post, which seemed to have similar issues:

 

http://emby.media/community/index.php?/topic/33428-server-fails-to-restart-after-upgrade/

 

But as far as I can tell they are able to manually update, it just isn't automatic as the server doesn't restart.

 

I'm pretty sure there was also a post about the server taking a while to shut down, causing issues with the restart because the new process gives up before the old one is closed. I can't find it now but form what I recall the solution was upgrading to 3.0.5943, which is what I'm on now.

 

I've also seen some threads with allusions to hanging ffmpeg processes, but I don't see any related errors in my logs, and I don't see any ffmpeg processes in the process manager.

 

Finally, I noticed in this post:

 

http://emby.media/community/index.php?/topic/33967-emby-server-unresponsive/

 

the OP was mentioning DLNA errors. While I didn't any errors in my actual log I did have these types of reports:

 

Debug Dlna: No matching device profile via headers found. The default will be used.

Debug HttpServer: Exiting HttpConnection.OnReadInternal because nread=0.

Posted

Hi, yes for some reason we're seeing some situations where the server does not shut down in a timely manner and we're still hunting down the cause of that.

  • 2 months later...
tjmcd.314
Posted

Was there ever a resolution for this? I am still having updating/restarting issues. I am now on server 3.0.5983.0 and I haven't made any manual installs so it appears to be able to work sometimes.

 

I don't remember there being an emby-install folder last time, but there is an app-update and server-update log that give the same error about not being able to access the backup file because it is in use (see app-update.log). Server logs give the same error as before about there being an instance of the server already open when trying to restart and then shutting down.

 

I searched back through some of the forum posts but I didn't see anything conclusive. There was one post where the OP had luck restarting their computer but that doesn't seem to fix my issue. The same post someone mentioned there being a problem closing the process listening on the 8096 port, or something to that affect, which reminded me that I am installed on a limited user account so I don't know if there are permission issues there with the networking side of things. I know that I had to give the account temporary admin privilages to install the server, but after that finished I removed them, so the server is running under the limited account. Not sure if that is relevant in any way.

app-update.log

Happy2Play
Posted (edited)

It is random across the board, I haven't see the issue in quit awhile.  You say restarting the machine make no difference, are you running the server as a service?  But something holding the system folder during the update process.

 

Not sure on account level. 

Edited by Happy2Play
revengineer
Posted

It's worse than not shutting down in a timely manner. For me the service does not shut down period. It can't be killed in task manager either. Only solution is to disable service, reboot, then run installer. Do not update through interface. Upon finish, emby will start as app. This won't shut down either so a second reboot is required. After that you can re-enable the service. Good luck.

overClocked!
Posted (edited)

It's worse than not shutting down in a timely manner. For me the service does not shut down period. It can't be killed in task manager either. Only solution is to disable service, reboot, then run installer. Do not update through interface. Upon finish, emby will start as app. This won't shut down either so a second reboot is required. After that you can re-enable the service. Good luck.

Theres an easier way. When I run into a situation where the service is stuck in limbo, I use the "TASKLIST" command from the Windows command line to get the process ID (PID) of the service and then run

 

TASKKILL /F /PID {number just retrieved from TASKLIST}

 

and it shuts it down immediately.

 

I can then just start up the service and it works every time.

 

 

Sent from my iPhone using Tapatalk

Edited by overClocked!
  • Like 1
tjmcd.314
Posted

It is random across the board, I haven't see the issue in quit awhile.  You say restarting the machine make no difference, are you running the server as a service?  But something holding the system folder during the update process.

 

Not sure on account level.

 

It's running as a tray icon. I was sort of wrong about the restart though. If I restarted while the server was running normally, everything would start fine but after a few minutes idle it would try to restart and hit the same problem as before, where the previous instance seems to hang on close. However, when I restarted after it tried to update but before manually restarting the server it actually finished the update rather than reverting to the previous version. Which is probably how it has been working so far, with an automatic Windows update forcing a restart while the server is in a limbo state.

Happy2Play
Posted

One thing I have noticed occasionally when an update fails do to "The process cannot access the file because it is being used by another process." is the browser is holding the system folder.  Not sure if it only related to Chrome but closing the browser released the system folder.

  • Like 1
  • 2 weeks later...
tjmcd.314
Posted (edited)

I think I figured this out, for me at least. First some things that did not seem to have an affect:

 

- I did a clean install of my whole system to squeeze in windows 10 at the last minute, and with basically a fresh install and not much else besides WMC and emby server/emby for WMC I was still seeing the issue of not being able to restart.

 

- Tried updating/restarting through emby for wmc which automatically closes itself and I had no browser open, but still no beuno, so it wasn't the browser holding things up.

 

Finally I tried removing my smart TV (a sony bravia x830c, pretty sure it is android based) from the network and everything started working as intended. My recollection is that I have seen some errors in the log files about not being able to identify the TV (for DLNA purposes) and so needing to load a default profile, but the log always proceeded on so I ignored it. I don't currently have any emby software loaded on the TV.

 

If there's any interest I can generate some more log files, but it seemed fairly reproducible that with the TV connected the server would hang and fail to restart, without it everything would go fine.

 

Edit - Since I would rather not unplug the TV for every update, is there anyway to have the server ignore specific devices?

Edited by tjmcd.314
  • Like 1

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