hansolo77 11 Posted April 21, 2016 Posted April 21, 2016 (edited) I posted about this a few updates ago, and nothing was done about it. It was forgotten as other issues were taken priority. I get that. But I'd still like to have this issue addressed and hopefully a solution found. I'm having trouble with the Server on a Windows Server 2012 machine. It runs fine. But if I need to restart it, either to update an addon or to update the Server itself, it fails to shut down. I'm using the Server with the Tray Icon. I had to do this in order to get it to (believe it or not) restart via the restart addon, since it didn't work at all when running it as a service. Now that's not working either, so I've temporarily disabled it. What happens, is the request to restart will be sent to the running application, and it turns off the tray icon. The application, however remains running. I've watched the Task Manager for up to 15 minutes and it won't end. I can watch the CPU usage drop to 0 on the task, but the RAM stays constant. Then another task will start before the other has a chance to end (this will typically throw up an error in the logs). I have to manually force the END TASK on both of the application to get them to close. Only then I can manually re-launch the Server from the desktop icon. I submitted logs of the entire process and it was looked over by Luke I believe. But it was determined that everything was working fine. Clearly it's not. If you click on the RESTART button in the website's admin panel, it should do just that. Stop it and restart it. Instead, all it does is close out the tray icon. Multiple new versions have come out that still have this exact same problem. I'm not usually the kind of person to complain. But I really feel like this issue shouldn't be "more trouble than it's worth". Especially when it used to work fine before. I'm a cash supporting member. I would think that should have more weight in troubleshooting, vs prioritizing non-member requests for new things. It looks like Emby is upgrading in technology and features, yet the programmers are forgetting the fundamentals of not breaking other things. The ability to restart the addon was a core function of the program, and it's broken. Maybe not for everybody, but I'm sure I'm not the only one. All negativity aside... would uninstalling Emby completely (uninstall, erase leftover files/folders, remove all leftover entries in the system registry) and reinstalling it maybe fix some corrupted file? What about maybe just eliminating whatever .dll or whatever is used to process the restart, and replace it with a different one? I'm really willing to try anything. So long as my data it's indexing isn't messed with that is. --- EDIT Another potentially related issue I'm having is that my scheduled tasks are being missed and ignored. I have my setup configured to do a media scan every day, yet there are days where I'll check and it says it hasn't been ran for 3 or 4 days. Maybe the computer is asleep, but I've created a task to wake the system up prior to the test, and every day I'm home I KNOW it's on and running. I feel like a lot of the user accessible automation is flaking apart. I say "user accessible" because I'm sure there's lots of automated functionality happening behind the scenes that I have no control to or access to see if it's working. But restarts, scheduled tasks, etc have all just about stopped working completely for me. Edited April 21, 2016 by hansolo77
Luke 42078 Posted April 21, 2016 Posted April 21, 2016 We have looked into this issue but just haven't yet found the cause. It's difficult to chase down since it's not affecting everyone. Do you have any plugins installed? see if it reproduces with just the core server.
hansolo77 11 Posted April 21, 2016 Author Posted April 21, 2016 The only plugins I have installed are the Kodi Sync, Rotten Tomato Reviews, Server Backup, and Trakt. The only thing NEW I guess since it started doing this would be the Kodi bit. But if that's the case, I'll just have to live with it because Kodi is now my primary media player since I no longer use Windows Media Center.
Luke 42078 Posted April 21, 2016 Posted April 21, 2016 Well if you could do some tests by removing some or all of those plugins that would help us determine where the issue is, thanks.
hansolo77 11 Posted April 21, 2016 Author Posted April 21, 2016 Ok, I uninstalled all 4 plugins. I then restarted Emby. It did the exact same thing, where it started up another instance of the server before the previous one was completely stopped, then I had to force stop both and manually restart it. I then tried rebooting. What it looks like it's doing now is just launching up the new instance before even trying to close down the old one. Where before it would wait until the CPU usage dropped to 0%, now it's the instant I hit the OK button to make it restart. Regardless of the case, if I do the restart, and the Emby Server task is running, I can't connect to Emby or the webserver until I force end it (after I do a restart that is).
Luke 42078 Posted April 21, 2016 Posted April 21, 2016 can you provide the server log of the shutdown? thanks.
hansolo77 11 Posted April 21, 2016 Author Posted April 21, 2016 (edited) Ok... I had reinstalled the plugins since they made no difference. But since you previously asked, I went ahead and uninstalled them again. I then rebooted. Once everything was up and running, I opened the web utility and clicked restart, then ok. This is the log I got: server-63596850342.txt Watching the task manager.. I saw it bring up the 2nd instance simultaneously. It then kicked out another log: server-63596850678.txt After a short while.. the 2nd instance ends, and the first instance remains. However, no more logs are created, and the initial logs I uploaded here are now gone. I then end task forcibly on the 1st instance, then restarted it. A new log is created. After waiting a few minutes I attempted the restart again, and this was the log output: server-63596850920.txt It also created another 2nd instance log: server-63596851014.txt Edited April 21, 2016 by hansolo77
Luke 42078 Posted April 21, 2016 Posted April 21, 2016 Thanks. can we find out if it's related to app activity? as a test, start up the server, then close down all emby apps on all devices, including browser windows. then see if restarting from the tray icon exhibits the same behavior. thanks.
hansolo77 11 Posted April 21, 2016 Author Posted April 21, 2016 (edited) That might take some time. My brother uses my Emby library at his house and I don't know how long it'll take him to turn off his client. But I will certainly test this. I also tried shutting it down using Internet Explorer instead of Firefox (since the log shows an error specific to Firefox). Unfortunately, IE couldn't even work with the buttons, it just sat there instead of popping up the "are you sure" request. EDIT 1 - I will say though, that it looks like the server task DOES eventually close at least on it's own, rather than me having to force end it.. it just takes like 2-3 minutes. EDIT 2 - I just tried using the Restart Server option from the tray icon, and it's acting the exact same way. I sent my brother a text so when he unplugs his Pi I built him for Kodi, I'll try again. Edited April 21, 2016 by hansolo77
revengineer 142 Posted April 21, 2016 Posted April 21, 2016 In my case the server sometimes shuts down after several minutes but at other times the process never exits and when this happens cannot be be killed with a task manager either. Googling the issue showed indications that this is IO related. One way to trigger the issue is the following update procedure. My emby runs as service. I shutdown via web interface, this takes several minutes. Then log into server start the emby as app (not as service). I let it update then shut down app through web interface. This again takes several minutes. Then I restart as app and it will perform the update. When server is then running, I shut down again through web interface (because I need to restart as service). At this point the app will not quit.
hansolo77 11 Posted April 22, 2016 Author Posted April 22, 2016 My brother disconnected his connection to my server last night. I woke up this morning and confirmed that. The first thing I did was completely reboot. Then when the computer was rebooted, the server started the app autmatically. I then did the "Restart Server" from the tray icon. It still does the same thing. No clients connected to Emby, and no plugins are installed. Here is the startup to restart log: server-63596915530.txt I noticed you didn't bother reading the 2nd log I posted earlier (the one about the 2nd instance starting before the 1st had ended). So I'm not going to bother posting that one again. Something else I noticed. There seems to be a sub-application listed under the Emby Server task in Task Manager (like there's an arrow for a drop down). That task is "WMI Performance Adapter". It only appears when the restart command is issued. Maybe that is what's causing the shutdown delay? If I watch Task Manager, it appears the moment the restart is confirmed, then it's present the entire time the 2nd instance is trying to load, then disappears. The 1st instance still runs after the 2nd instance and the "WMI" are gone.
ebr 16178 Posted April 22, 2016 Posted April 22, 2016 That task is "WMI Performance Adapter". It only appears when the restart command is issued. Maybe that is what's causing the shutdown delay? If I watch Task Manager, it appears the moment the restart is confirmed, then it's present the entire time the 2nd instance is trying to load, then disappears. The 1st instance still runs after the 2nd instance and the "WMI" are gone. That is a component of the Windows Server architecture and may point to you having some sort of performance-monitoring software in the system that could be causing trouble...
Luke 42078 Posted April 22, 2016 Posted April 22, 2016 I'm making a change on the dev and beta branches. we'll see if it helps or not.
epayson85 72 Posted April 22, 2016 Posted April 22, 2016 This is on my parents server which luckily I can access remotely. I just moved them over to emby this past weekend and this is the 2nd time this has happened this week. Basically they go to use it and the server is not running. If I start emby up manually its fine but taking a look at the logs there are errors but I don't know what they are. It looks like it trys to install an update and reboot, but then never start up. When I manually started the server it again told me it had an update to install but it was the same one on the original logs that I guess failed to install. After manually rebooting it started up again just fine with the new version. The logs are below... This first log shows the new update and then the server "rebooting" 2016-04-22 14:27:33.7272 Info App: Application has been updated to version 3.0.59432016-04-22 14:27:33.7732 Info TaskManager: Check for application updates Completed after 0 minute(s) and 36 seconds2016-04-22 14:27:33.7732 Info TaskManager: ExecuteQueuedTasks2016-04-22 14:27:52.8773 Info TaskManager: IntervalTrigger fired for task: Download missing subtitles2016-04-22 14:27:52.8773 Info TaskManager: Queueing task SubtitleScheduledTask2016-04-22 14:27:52.8773 Info TaskManager: Executing Download missing subtitles2016-04-22 14:27:52.8933 Info TaskManager: IntervalTrigger fired for task: Convert media2016-04-22 14:27:52.8933 Info TaskManager: Queueing task SyncConvertScheduledTask2016-04-22 14:28:06.8501 Info TaskManager: Download missing subtitles Completed after 0 minute(s) and 13 seconds2016-04-22 14:28:06.8501 Info TaskManager: ExecuteQueuedTasks2016-04-22 14:28:07.0211 Info TaskManager: Executing Convert media2016-04-22 14:28:07.0401 Info TaskManager: Convert media Completed after 0 minute(s) and 0 seconds2016-04-22 14:28:07.0401 Info TaskManager: ExecuteQueuedTasks2016-04-22 14:28:49.2465 Info App: Loading live tv data from C:\Users\HTPC\AppData\Roaming\Emby-Server\data\livetv\seriestimers2016-04-22 14:28:49.2765 Info App: Loading live tv data from C:\Users\HTPC\AppData\Roaming\Emby-Server\data\livetv\recordings2016-04-22 14:28:52.3377 Info TaskManager: Refresh Guide Completed after 1 minute(s) and 30 seconds2016-04-22 14:28:52.3377 Info TaskManager: ExecuteQueuedTasks2016-04-22 14:29:54.1843 Info HttpClient: HttpClientManager GET: http://www.omdbapi.com/?plot=full&r=json&t=Keepers+of+the+Game&type=movie2016-04-22 14:29:54.4003 Info HttpClient: HttpClientManager GET: http://api.themoviedb.org/3/configuration?api_key=f6bd687ffa63cd282b6ff2c6877f26692016-04-22 14:31:03.2022 Info HttpClient: HttpClientManager GET: http://www.omdbapi.com/?plot=full&r=json&t=Keepers+of+the+Game&type=movie2016-04-22 14:32:15.4783 Info HttpClient: HttpClientManager GET: http://www.omdbapi.com/?plot=full&r=json&t=Shakespeare%27s+Tomb&type=movie2016-04-22 14:32:15.5743 Info App: MovieDbProvider: Finding id for item: Shakespeare's Tomb2016-04-22 14:32:15.5743 Info HttpClient: HttpClientManager GET: http://api.themoviedb.org/3/search/movie?api_key=f6bd687ffa63cd282b6ff2c6877f2669&query=Shakespeare%27s+Tomb&language=en2016-04-22 14:32:33.9204 Info App: Calling NativeApp.Restart2016-04-22 14:32:33.9204 Info Main: Disposing app host2016-04-22 14:32:33.9204 Info App: Disposing ApplicationHost2016-04-22 14:32:33.9204 Info App: Disposing TaskManager2016-04-22 14:32:33.9204 Info App: Disposing HttpClientManager2016-04-22 14:32:33.9204 Info App: Disposing InstallationManager2016-04-22 14:32:33.9204 Info App: Disposing IsoManager2016-04-22 14:32:33.9204 Info App: Disposing SqliteUserRepository2016-04-22 14:32:33.9294 Info App: Disposing SqliteDisplayPreferencesRepository2016-04-22 14:32:33.9294 Info App: Disposing SqliteItemRepository2016-04-22 14:32:33.9294 Info App: Disposing SqliteProviderInfoRepository2016-04-22 14:32:33.9294 Info App: Disposing SqliteFileOrganizationRepository2016-04-22 14:32:33.9294 Info App: Disposing AuthenticationRepository2016-04-22 14:32:33.9294 Info App: Disposing SyncRepository2016-04-22 14:32:33.9294 Info App: Disposing LibraryMonitor2016-04-22 14:32:33.9294 Info App: Disposing ProviderManager2016-04-22 14:32:33.9294 Info App: Disposing ServerManager2016-04-22 14:32:33.9294 Error ProviderManager: Error refreshing item *** Error Report *** Version: 3.0.5942.0 Command line: C:\Users\HTPC\AppData\Roaming\Emby-Server\System\MediaBrowser.ServerApplication.exe Operating system: Microsoft Windows NT 6.1.7601 Service Pack 1 Processor count: 2 64-Bit OS: True 64-Bit Process: True Program data path: C:\Users\HTPC\AppData\Roaming\Emby-Server Application Path: C:\Users\HTPC\AppData\Roaming\Emby-Server\System\MediaBrowser.ServerApplication.exe Cannot access a disposed object. Object name: 'SqliteItemRepository has been disposed and cannot be accessed.'. System.ObjectDisposedException at MediaBrowser.Server.Implementations.Persistence.BaseSqliteRepository.CheckDisposed() at MediaBrowser.Server.Implementations.Persistence.SqliteItemRepository.RetrieveItem(Guid id) at MediaBrowser.Server.Implementations.Library.LibraryManager.GetItemById(Guid id) at MediaBrowser.Providers.Manager.ProviderManager.<RefreshTimerCallback>d__8e.MoveNext() 2016-04-22 14:32:34.5874 Info App: Disposing ImageProcessor2016-04-22 14:32:34.5874 Info App: Disposing MediaSourceManager2016-04-22 14:32:34.5874 Info App: Disposing LiveTvManager2016-04-22 14:32:34.5874 Info App: Disposing ContentDirectory2016-04-22 14:32:34.5874 Info App: Disposing MediaReceiverRegistrar2016-04-22 14:32:34.5874 Info App: Disposing DeviceDiscovery2016-04-22 14:32:34.5874 Info App: Disposing MediaEncoder2016-04-22 14:32:34.5874 Info App: Disposing SsdpHandler2016-04-22 14:32:34.5874 Info App: Disposing ActivityRepository2016-04-22 14:32:34.5874 Info App: Disposing SqliteNotificationsRepository2016-04-22 14:32:34.5874 Info App: Disposing MovieDbProvider2016-04-22 14:32:34.5874 Info App: Disposing EmbyTV2016-04-22 14:32:34.5874 Info App: Disposing WMCService2016-04-22 14:32:34.5874 Info App: Disposing OpenSubtitleDownloader2016-04-22 14:32:34.5984 Info App: Disposing ActivityLogEntryPoint2016-04-22 14:32:34.5984 Info App: Disposing ServerEntryPoint2016-04-22 14:32:34.5984 Info App: Disposing AutomaticRestartEntryPoint2016-04-22 14:32:34.5984 Info App: Disposing ApiEntryPoint2016-04-22 14:32:34.5984 Info App: Disposing ExternalPortForwarding2016-04-22 14:32:34.5984 Info App: Disposing ServerEntryPoint2016-04-22 14:32:34.5984 Info App: Disposing LibraryChangedNotifier2016-04-22 14:32:34.5984 Info App: Disposing LoadRegistrations2016-04-22 14:32:34.5984 Info App: Disposing Notifications2016-04-22 14:32:34.5984 Info App: Disposing WebSocketNotifier2016-04-22 14:32:34.5984 Info App: Disposing RefreshUsersMetadata2016-04-22 14:32:34.5984 Info App: Disposing UsageEntryPoint2016-04-22 14:32:34.5984 Info App: Disposing ConnectEntryPoint2016-04-22 14:32:34.5984 Info App: Disposing UdpServerEntryPoint2016-04-22 14:32:34.5984 Info App: Disposing ServerEventNotifier2016-04-22 14:32:34.5984 Info App: Disposing UserDataChangeNotifier2016-04-22 14:32:34.5984 Info App: Disposing LibraryMonitorStartup2016-04-22 14:32:34.5984 Info App: Disposing EntryPoint2016-04-22 14:32:34.5984 Info App: Disposing HdHomerunDiscovery2016-04-22 14:32:34.5984 Info App: Disposing SatIpDiscovery2016-04-22 14:32:34.5984 Info App: Disposing NewsEntryPoint2016-04-22 14:32:34.5984 Info App: Disposing DlnaProfileEntryPoint2016-04-22 14:32:34.5984 Info App: Disposing DlnaEntryPoint2016-04-22 14:32:34.6144 Info App: Disposing EntryPoint2016-04-22 14:32:34.6144 Info App: Disposing KeepServerAwake2016-04-22 14:32:34.6144 Info App: Disposing StartupWizard2016-04-22 14:32:34.6144 Info App: Disposing ServerEntryPoint2016-04-22 14:32:34.6144 Info Main: Starting new instance2016-04-22 14:32:34.6304 Info Main: Calling Application.Exit After this log is the following very short log 2016-04-22 14:32:34.8175 Info Main: Emby Command line: C:\Users\HTPC\AppData\Roaming\Emby-Server\System\MediaBrowser.ServerApplication.exe Operating system: Microsoft Windows NT 6.1.7601 Service Pack 1 Processor count: 2 64-Bit OS: True 64-Bit Process: True Program data path: C:\Users\HTPC\AppData\Roaming\Emby-Server Application Path: C:\Users\HTPC\AppData\Roaming\Emby-Server\System\MediaBrowser.ServerApplication.exe2016-04-22 14:32:34.8175 Info Main: Found a duplicate process. Giving it time to exit.2016-04-22 14:32:34.8685 Info Main: An update is available from C:\Users\HTPC\AppData\Roaming\Emby-Server\updates\MBServer.zip2016-04-22 14:32:34.8685 Info Main: Copying updater to temporary location2016-04-22 14:32:34.8685 Info Main: Copying updater dependencies to temporary location2016-04-22 14:32:34.8825 Info Main: Starting updater process.2016-04-22 14:32:34.8825 Info Main: Args: product=server archive="C:\Users\HTPC\AppData\Roaming\Emby-Server\updates\MBServer.zip" caller=1080 pismo=false version=3.0.5943 service= installpath="C:\Users\HTPC\AppData\Roaming\Emby-Server" startpath="C:\Users\HTPC\AppData\Roaming\Emby-Server\System\MediaBrowser.ServerApplication.exe" systempath="C:\Users\HTPC\AppData\Roaming\Emby-Server\System"2016-04-22 14:32:34.9145 Info Main: Exiting to perform application update.
epayson85 72 Posted April 22, 2016 Posted April 22, 2016 Then the following is when I finally start the server manually almost 3 hours later and it again has to restart for the same server update log.txt
Marc_G 95 Posted April 22, 2016 Posted April 22, 2016 I'll pipe in briefly here... I'm still having the "When Server updates itself, it doesn't restart" issue. I'll put details in the thread I started a few weeks ago on the topic. I've attempted a quick uninstall MB3 then install Emby (without doing the "wipe everything" option) and that DIDN'T resolve the issue. I'm sure working together we'll all track this down eventually!
Guest asrequested Posted April 23, 2016 Posted April 23, 2016 I experience this, frequently. I just manually start the server straight away, apply the update and all is good. It is a pain to have to do this so often, though.
hansolo77 11 Posted April 23, 2016 Author Posted April 23, 2016 I'm just glad it's been acknowledged this time, and work is in progress. If not to fully fix the problem, at least to identify the cause. I'm willing to work with the staff, try things, submit logs and results. Just let me know!
Luke 42078 Posted April 23, 2016 Posted April 23, 2016 Once you have 5943, see what happens with future updates after that. i made a change to the server shutdown process.
Guest asrequested Posted April 23, 2016 Posted April 23, 2016 Once you have 5943, see what happens with future updates after that. i made a change to the server shutdown process. 5943 is installed, I will report back if there are further instances.
Luke 42078 Posted April 23, 2016 Posted April 23, 2016 actually you can try it now just by installing a plugin, since that will require a restart.
Guest asrequested Posted April 23, 2016 Posted April 23, 2016 actually you can try it now just by installing a plugin, since that will require a restart. I installed the anime plugin. The server restarted perfectly and much faster than it has in the past. Very nice! Great job, Luke! I should mention though, that it didn't have problems restarting every time, but very often.
epayson85 72 Posted April 23, 2016 Posted April 23, 2016 I have never had an issue on my server so new to me. I turned off updates on their server so I will turn them back on and see what happens.
hansolo77 11 Posted April 24, 2016 Author Posted April 24, 2016 (edited) How do I get 5943? Is it a beta update? I think I have Emby configured to get just official ones. Then again, I got an email today saying a new version of the Server was now available, then I go and check and it's telling me I already have the latest update (which isn't 5943, but I must be getting the updates prior to the official announcements.. EDIT - Nevermind.. I checked and I did have it set to just Official. Changed it to Beta and it showed up... installing it now. EDIT 2 - Same problem for me. I simply uninstalled the Rotten Tomatoes plugin, which prompted the restart. Clicked the restart button at the bottom of the screen. Watching Task Manager, it immediately launched a 2nd instance, while the CPU usage of the 1st was drained to 0%. A minute later, the 2nd instance disappears. Another minute after that, the first instance disappears. Then the system sits idle without trying to restart again. A manual launch of the server at that point then brings it online. Edited April 24, 2016 by hansolo77
hansolo77 11 Posted May 5, 2016 Author Posted May 5, 2016 Just wanted to update.. I'm now using v3.0.5951.0 and I'm still having this same problem...
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