revengineer 142 Posted September 26, 2015 Posted September 26, 2015 (edited) Sometimes I cannot shutdown emby server running as windows service. My version is 3.0.5724.5. After pushing shutdown on web interface, the web site becomes unresponsive. However, the task itself is still alive. Typically is takes 2 minutes to shut down the service. However, sometimes the task never shuts down. even taskkill /f cannot kill the process. It gives access denied error. Are there other means to shut down the process? server-63578811011.txt unhandled_7ea039b6-bc8d-4ded-b2f8-6bc731f2c8f0.txt Edited September 26, 2015 by revengineer
Luke 42081 Posted September 26, 2015 Posted September 26, 2015 i'll fix this particular error for the next release, thanks.
revengineer 142 Posted December 22, 2016 Author Posted December 22, 2016 It has been almost a year and this issue still is not resolved. On almost every activity that requires restarting emby (emby server update, plugin update), I have to reboot my server. This is extremely disruptive and time consuming. In 30 years of using windows, this is the first and only program that I cannot kill as admin with task manager. I wish we could get this finally fixed!!!!! Sorry for the double posting, I think these issues are related.
Luke 42081 Posted December 22, 2016 Posted December 22, 2016 Does this happen if you run using the tray icon?
Happy2Play 9783 Posted December 22, 2016 Posted December 22, 2016 (edited) My stable server doesn't currently have this issue but my beta machine has had this issue for awhile and dev machine is hit and miss. Stable machine runs majority of the time as service except for around update time, beta and dev run as application. Stable and beta are on WHS2011 Dev on Windows 10 Pro Edited December 22, 2016 by Happy2Play
revengineer 142 Posted December 22, 2016 Author Posted December 22, 2016 Mostly I run as service, but during the update process I have started as user and the tray icon shows. I tried to shut down tonight via tray icon -> exit without success. After 5 min I gave up and I rebooted the server. As Happy2Play states it is hit or miss, but I would say that in >80% of shutdown attempts, the shutdown via web interface or through windows does not work. 1
Luke 42081 Posted December 22, 2016 Posted December 22, 2016 Were any scheduled tasks running? What plugins are installed?
FrostByte 5392 Posted December 22, 2016 Posted December 22, 2016 I've updating Emby running as a service using a PS script to do everything with no issues for awhile now. Just too much a pita to do it manually I think.
revengineer 142 Posted December 22, 2016 Author Posted December 22, 2016 Were any scheduled tasks running? What plugins are installed? The whole range of default tasks will have run after several days of operation. However, only tasks scheduled by default on application startup ran during the update process when emby initially starts as a program after the update, and I need to the application down before I restart as a service. The plugins installed are coverart, email notifications, folder sync, rotten tomatoes reviews, server configuration backup, and trailers. I wish there was a way to disable one or more plugins rather than uninstalling them, because the uninstall/reinstall/reconfig is a big hassle.
revengineer 142 Posted December 22, 2016 Author Posted December 22, 2016 I've updating Emby running as a service using a PS script to do everything with no issues for awhile now. Just too much a pita to do it manually I think. The problem is that I cannot shutdown the emby application, not even when killed from the task manager. A script will not help with this, unless it includes rebooting the entire hardware twice during the process.
FrostByte 5392 Posted December 22, 2016 Posted December 22, 2016 (edited) Hmm, it forces both the "Emby" service and the "MediaBrowser" process to stop for me every time. Never had an issue. Hopefully you'll find the problem Edited December 22, 2016 by FrostByte
revengineer 142 Posted December 22, 2016 Author Posted December 22, 2016 Hmm, it forces both the "Emby" service and the "MediaBrowser" process to stop for me every time. Never had an issue. Hopefully you'll find the problem Could you post your script and/or the command used to shutdown the emby server application?
revengineer 142 Posted December 22, 2016 Author Posted December 22, 2016 Here are the final log entries. Note the timing. The app was shut down via the web interface at 10:57, and all but the last log entry followed in quick succession. The last entry was added some 10 minutes later when the server was rebooted. Maybe this gives a hint as to where the problem occurs in the code. 2016-12-22 10:57:56.6319 Info HttpServer: HTTP Response 204 to 192.168.1.10. Time: 3ms. http://192.168.1.50:8096/emby/System/Shutdown2016-12-22 10:57:56.7460 Info Main: Disposing app host2016-12-22 10:57:56.7460 Info App: Disposing WindowsAppHost2016-12-22 10:57:56.7460 Info App: Disposing TaskManager2016-12-22 10:57:56.7460 Info App: Disposing HttpClientManager2016-12-22 10:57:56.7460 Info App: Disposing IsoManager2016-12-22 10:57:56.7460 Info App: Disposing InstallationManager2016-12-22 10:57:56.7460 Info App: Disposing SqliteUserRepository2016-12-22 10:57:56.7520 Info App: Disposing SqliteDisplayPreferencesRepository2016-12-22 10:57:56.7520 Info App: Disposing SqliteItemRepository2016-12-22 10:57:56.7520 Info App: Disposing SqliteFileOrganizationRepository2016-12-22 10:57:56.7520 Info App: Disposing AuthenticationRepository2016-12-22 10:57:56.7520 Info App: Disposing SyncRepository2016-12-22 10:57:56.7520 Info App: Disposing LibraryMonitor2016-12-22 10:57:56.7520 Info App: Disposing ProviderManager2016-12-22 10:57:56.7520 Info App: Disposing ServerManager2016-12-22 10:57:56.8080 Info App: Disposing ImageProcessor2016-12-22 10:57:56.8080 Info App: Disposing MediaSourceManager2016-12-22 10:57:56.8080 Info App: Disposing LiveTvManager2016-12-22 10:57:56.8080 Info App: Disposing ContentDirectory2016-12-22 10:57:56.8080 Info App: Disposing MediaReceiverRegistrar2016-12-22 10:57:56.8080 Info App: Disposing DeviceDiscovery2016-12-22 10:57:56.8080 Info App: Disposing MediaEncoder2016-12-22 10:57:56.8080 Info App: Disposing SharingRepository2016-12-22 10:57:56.8080 Info App: Disposing ActivityRepository2016-12-22 10:57:56.8080 Info App: Disposing SqliteNotificationsRepository2016-12-22 10:57:56.8080 Info App: Disposing MovieDbProvider2016-12-22 10:57:56.8080 Info App: Disposing EmbyTV2016-12-22 10:57:56.8080 Info App: Disposing OpenSubtitleDownloader2016-12-22 10:57:56.8080 Info App: Disposing ServerEntryPoint2016-12-22 10:57:56.8080 Info App: Disposing ServerEntryPoint2016-12-22 10:57:56.8080 Info App: Disposing EntryPoint2016-12-22 10:57:56.8080 Info App: Disposing ApiEntryPoint2016-12-22 10:57:56.8150 Info App: Disposing ServerEntryPoint2016-12-22 10:57:56.8150 Info App: Disposing CleanMissingEpisodesEntryPoint2016-12-22 10:57:56.8150 Info App: Disposing SyncNotificationEntryPoint2016-12-22 10:57:56.8150 Info App: Disposing Notifications2016-12-22 10:57:56.8150 Info App: Disposing WebSocketNotifier2016-12-22 10:57:56.8150 Info App: Disposing NewsEntryPoint2016-12-22 10:57:56.8150 Info App: Disposing HdHomerunDiscovery2016-12-22 10:57:56.8150 Info App: Disposing EntryPoint2016-12-22 10:57:56.8150 Info App: Disposing FileOrganizationNotifier2016-12-22 10:57:56.8150 Info App: Disposing AutomaticRestartEntryPoint2016-12-22 10:57:56.8150 Info App: Disposing KeepServerAwake2016-12-22 10:57:56.8150 Info App: Disposing LibraryChangedNotifier2016-12-22 10:57:56.8150 Info App: Disposing LoadRegistrations2016-12-22 10:57:56.8150 Info App: Disposing RecordingNotifier2016-12-22 10:57:56.8150 Info App: Disposing RefreshUsersMetadata2016-12-22 10:57:56.8150 Info App: Disposing ServerEventNotifier2016-12-22 10:57:56.8320 Info App: Disposing StartupWizard2016-12-22 10:57:56.8320 Info App: Disposing SystemEvents2016-12-22 10:57:56.8320 Info App: Disposing UdpServerEntryPoint2016-12-22 10:57:56.8320 Info App: Disposing UsageEntryPoint2016-12-22 10:57:56.8320 Error App: Error receiving udp message*** Error Report ***Version: 3.1.1.0Command line: C:\Users\admin\AppData\Roaming\Emby-Server\System\MediaBrowser.ServerApplication.exeOperating system: Microsoft Windows NT 6.2.9200.064-Bit OS: True64-Bit Process: TrueProcessor count: 4Program data path: C:\Users\admin\AppData\Roaming\Emby-ServerApplication directory: C:\Users\admin\AppData\Roaming\Emby-Server\SystemSystem.Threading.Tasks.TaskCanceledException: A task was canceled.at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)at Emby.Server.Implementations.Udp.UdpServer.d__13.MoveNext()System.Threading.Tasks.TaskCanceledExceptionat System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)at Emby.Server.Implementations.Udp.UdpServer.d__13.MoveNext()2016-12-22 10:57:56.8320 Info App: Disposing UserDataChangeNotifier2016-12-22 10:57:56.8320 Info App: Disposing ConnectEntryPoint2016-12-22 10:57:56.8320 Info App: Disposing ActivityLogEntryPoint2016-12-22 10:57:56.8320 Info App: Disposing LibraryMonitorStartup2016-12-22 10:57:56.8320 Info App: Disposing ExternalPortForwarding2016-12-22 10:57:56.8320 Info App: Disposing DlnaProfileEntryPoint2016-12-22 10:57:56.8320 Info App: Disposing DlnaEntryPoint2016-12-22 11:08:29.3525 Info Main: Calling Environment.Exit
revengineer 142 Posted December 22, 2016 Author Posted December 22, 2016 The problem with shutdown is repeatable even when run as application with task icon. I started the server app, then waited one hour without watching any movies, then shut down via web interface. The app did not shutdown and I had to reboot the machine. One last piece of information. I tried an application called Process Hacker, which some people had success terminating applications that could not be shut down by other means. Process Hacker is not successful either and reports the error "An attempt was made to access an exiting process." Not sure whether or not this helps. 1
Andy777 21 Posted January 1, 2017 Posted January 1, 2017 Just checking: You do know that the normal way of stopping/starting/restarting of windows services has always been either a) mmc-services plugin from "administrative tools" (or "computer management->services), or an Admin command prompt using "net stop [service name]" and "net start [service name]"? Killing from task manager should be the last resort. I know several applications that don't die (even with admin rights) from task manager. Similarly for Unix/Linux "kill -9" is the last resort and sending the "HUP" signal is the normal way. I'm not denying that there is a possible problem with Emby. Just that I have not encountered it myself. BR, Andy777
revengineer 142 Posted January 1, 2017 Author Posted January 1, 2017 I tried all the graceful ways you mentioned to terminate the emby server process; they do not work 90% of times I tried. When these means do not work, not even kill via taskmanager will shut down the process. Reboot is required then.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now