PmsService icon indicating copy to clipboard operation
PmsService copied to clipboard

PMS 64 bit update does not work

Open antczakp opened this issue 2 years ago • 42 comments

Hello, thanks for the great little tool that has helped to keep my PMS up :-)

I seem to have an issue when trying to update PMS while the Service is keeping track of it. Before it waited until the update was done but now it seems to just restart Plex during the update causing the update to fail. Any idea what I may be doing wrong here?

antczakp avatar Oct 27 '22 09:10 antczakp

Seeing the same thing when I finally got round to installing the update and thought I'd try just allowing it to install instead of stopping the server, running the program, installing the update, stopping the program and starting the service. The PmsService immediately recognises that the server has stopped and jumps in. I tried setting it to only restart after 300 seconds thinking that it would give time for the update to complete but it immediately kills any other processes and then waits 300 seconds before starting PMS so it still kills the update. Logfile snippet to show what's happening.

[12:44:35 INF][PmsMonitor][Plex_Exited] Plex Media Server has stopped! [12:44:35 INF][PmsMonitor][KillSupportingProcesses] Killing supporting processes. [12:44:35 INF][PmsMonitor][KillSupportingProcess] Looking for process: Plex DLNA Server [12:44:35 INF][PmsMonitor][KillSupportingProcess] 0 instances of Plex DLNA Server found. [12:44:35 INF][PmsMonitor][KillSupportingProcess] Looking for process: PlexScriptHost [12:44:35 INF][PmsMonitor][KillSupportingProcess] 0 instances of PlexScriptHost found. [12:44:35 INF][PmsMonitor][KillSupportingProcess] Looking for process: PlexTranscoder [12:44:35 INF][PmsMonitor][KillSupportingProcess] 0 instances of PlexTranscoder found. [12:44:35 INF][PmsMonitor][KillSupportingProcess] Looking for process: PlexNewTranscoder [12:44:35 INF][PmsMonitor][KillSupportingProcess] 0 instances of PlexNewTranscoder found. [12:44:35 INF][PmsMonitor][KillSupportingProcess] Looking for process: Plex Media Scanner [12:44:35 INF][PmsMonitor][KillSupportingProcess] 0 instances of Plex Media Scanner found. [12:44:35 INF][PmsMonitor][KillSupportingProcess] Looking for process: PlexRelay [12:44:35 INF][PmsMonitor][KillSupportingProcess] 0 instances of PlexRelay found. [12:44:35 INF][PmsMonitor][KillSupportingProcess] Looking for process: Plex Relay [12:44:35 INF][PmsMonitor][KillSupportingProcess] 0 instances of Plex Relay found. [12:44:35 INF][PmsMonitor][KillSupportingProcess] Looking for process: EasyAudioEncoder [12:44:35 INF][PmsMonitor][KillSupportingProcess] 0 instances of EasyAudioEncoder found. [12:44:35 INF][PmsMonitor][KillSupportingProcess] Looking for process: Plex Tuner Service [12:44:35 INF][PmsMonitor][KillSupportingProcess] 0 instances of Plex Tuner Service found. [12:44:35 INF][PmsMonitor][KillSupportingProcess] Looking for process: Plex Media Fingerprinter [12:44:35 INF][PmsMonitor][KillSupportingProcess] 0 instances of Plex Media Fingerprinter found. [12:44:35 INF][PmsMonitor][Plex_Exited] Waiting 300 seconds before re-starting the Plex process. [12:44:35 WRN][TrayInteraction][PlexStateChange] Exception on plex state change callback: The operation 'OnPlexStateChange' could not be completed because the sessionful channel timed out waiting to receive a message. To increase the timeout, either set the receiveTimeout property on the binding in your configuration file, or set the ReceiveTimeout property on the Binding directly.

Cenedd avatar Nov 05 '22 12:11 Cenedd

Not sure if same issue but today I couldn't connect to plex server after an update which seemed to fail. I then installed latest Plex version manually and after restarting PMS, it worked again.

roughnecks avatar Nov 08 '22 13:11 roughnecks

I just updated Plex from 1.28 32bit to 1.30 64bit, and now the PMSservice tray seems to have the wrong data path. IE it's showing a C drive path, but I've always had Plex installed on the D drive.

DarkLogicX avatar Nov 23 '22 00:11 DarkLogicX

I downgraded from 64bit 1.30 to 32bit 1.28 and it's working now.

Seems like there should be some setting in the service manager to point it to the correct directory. I was hoping that 64bit would allow plex to better use the ram I have.

DarkLogicX avatar Nov 23 '22 00:11 DarkLogicX

Well the thing I don't get it, is that it correctly identifies which version to use but then fails to recognise that it is being updated. Then somehow restarts Plex before the update Process is complete and blocks the update in itself... There must be something that can be done about this? Is there some sort of delay that we can add that will wait for n seconds before restarting Plex?

antczakp avatar Nov 29 '22 17:11 antczakp

Not as stands. If you set the delay that is there, when spots that Plex has stopped (ie is updating) it kills all the Plex processes (including the update) and then waits that delay time before restarting them.

Cenedd avatar Nov 29 '22 18:11 Cenedd

Well how does it work in the 32 bit version? How does it know it is updating and waits as I never had an issue until the 64bit version?

antczakp avatar Dec 01 '22 14:12 antczakp

Same issue. Reinstalled Plex and it runs, will only display a web interface (or any interface) if I shut down PMSService completely. Did some experimentation and Plex fails to run even after PMSService is uninstalled. I believe it has something to do with the Plex Update Service, because Plex started again and worked after I removed that service.

jackkerouac avatar Jan 11 '23 11:01 jackkerouac

The service reads the plex log to detect the update, its possible the log has changed or the order of events has changed. I'll try and find some time to investigate. regarding the 64 bit, it should find it on its own. if not, there is a file called location.txt where you can manually specify the plex path. I'll look at bringing that up to the settings interface. I just need to find some time to look at all this. appologies.

cjmurph avatar Jan 12 '23 12:01 cjmurph

can you please try the new release and see if it works any better for you. v1.2.1

cjmurph avatar Jan 12 '23 16:01 cjmurph

Thanks for looking into it cjmurph. I've updated PMS and it did look hopeful at first in that it picked up the correct location for the logs:

[06:41:55 DBG][PmsMonitor][WatchLog] PMS Log Path: C:\Users<username>\AppData\Local\Plex Media Server\Logs [06:41:55 WRN][PmsMonitor][WatchLog] Exception: The directory name C:\Users<username>\AppData\Local\Plex Media Server\Logs is invalid. [06:41:55 INF][PmsMonitor][Start] Plex executable found at C:\Program Files\Plex\Plex Media Server\Plex Media Server.exe <PMS upgraded between here> [18:46:29 DBG][PmsMonitor][WatchLog] PMS Log Path: F:\PlexData\Plex Media Server\Logs [18:46:29 INF][PmsMonitor][GetPlexExecutable] Plex executable found using hard coded lookup [18:46:29 INF][PmsMonitor][Start] Plex executable found at C:\Program Files\Plex\Plex Media Server\Plex Media Server.exe

But when I tried an update, it spotted that Plex had stopped, waited 10 secs and then killed everything before restarting it.

[18:55:55 INF][PmsMonitor][Plex_Exited] Plex Media Server has stopped! [18:55:55 INF][PmsMonitor][Plex_Exited] Wait some time for the update log to be written before reacting to this exit event [18:56:05 INF][PmsMonitor][KillSupportingProcesses] Killing supporting processes. [18:56:05 INF][PmsMonitor][KillSupportingProcess] Looking for process: Plex DLNA Server [18:56:05 INF][PmsMonitor][KillSupportingProcess] 0 instances of Plex DLNA Server found. [18:56:05 INF][PmsMonitor][KillSupportingProcess] Looking for process: PlexScriptHost [18:56:05 INF][PmsMonitor][KillSupportingProcess] 0 instances of PlexScriptHost found. [18:56:05 INF][PmsMonitor][KillSupportingProcess] Looking for process: PlexTranscoder [18:56:05 INF][PmsMonitor][KillSupportingProcess] 0 instances of PlexTranscoder found. [18:56:05 INF][PmsMonitor][KillSupportingProcess] Looking for process: PlexNewTranscoder [18:56:05 INF][PmsMonitor][KillSupportingProcess] 0 instances of PlexNewTranscoder found. [18:56:05 INF][PmsMonitor][KillSupportingProcess] Looking for process: Plex Media Scanner [18:56:05 INF][PmsMonitor][KillSupportingProcess] 0 instances of Plex Media Scanner found. [18:56:05 INF][PmsMonitor][KillSupportingProcess] Looking for process: PlexRelay [18:56:05 INF][PmsMonitor][KillSupportingProcess] 0 instances of PlexRelay found. [18:56:05 INF][PmsMonitor][KillSupportingProcess] Looking for process: Plex Relay [18:56:05 INF][PmsMonitor][KillSupportingProcess] 0 instances of Plex Relay found. [18:56:05 INF][PmsMonitor][KillSupportingProcess] Looking for process: EasyAudioEncoder [18:56:05 INF][PmsMonitor][KillSupportingProcess] 0 instances of EasyAudioEncoder found. [18:56:05 INF][PmsMonitor][KillSupportingProcess] Looking for process: Plex Tuner Service [18:56:05 INF][PmsMonitor][KillSupportingProcess] 0 instances of Plex Tuner Service found. [18:56:05 INF][PmsMonitor][KillSupportingProcess] Looking for process: Plex Media Fingerprinter [18:56:05 INF][PmsMonitor][KillSupportingProcess] 0 instances of Plex Media Fingerprinter found. [18:56:05 INF][PmsMonitor][Plex_Exited] Waiting 20 seconds before re-starting the Plex process. [18:56:25 INF][PmsMonitor][GetPlexExecutable] Plex executable found using hard coded lookup [18:56:25 INF][PmsMonitor][Start] Plex executable found at C:\Program Files\Plex\Plex Media Server\Plex Media Server.exe [18:56:25 DBG][PmsMonitor][StartPlex] Disabling first run. [18:56:25 DBG][PmsMonitor][DisableFirstRun] First run is: 0 [18:56:25 DBG][PmsMonitor][StartPlex] No plex defined, checking for running process. [18:56:25 INF][PmsMonitor][StartPlex] Attempting to start Plex. [18:56:25 INF][PmsMonitor][StartPlex] Plex Media Server version is 1.30.0.6486. Can use startup argument. [18:56:25 INF][PmsMonitor][StartPlex] Plex Media Server Started.

The Plex update logs seem to be rotated when it starts again so I've attached the ones with a recent timestamp as well as the PMS log in case that helps. Am I correct that it's watching "Plex Update Service.log"?

PlexService20230112.log Plex Update Service.1.log Plex Update Service.2.log Plex Update Service.log

Cenedd avatar Jan 12 '23 19:01 Cenedd

It is watching that log, but what I noticed last night is that with the 64 bit version of plex, the log file only gets flushed out to disk after a period. On my server, it wrote 18 lines at once and it happened a few seconds after the last log entry. Many years ago, I actually started having dialog with the plex team about how to manage this, but it stalled as that was right when they had a little data breach :), I might need to try and tackle this in a completely different way I think.

cjmurph avatar Jan 13 '23 03:01 cjmurph

Well, let me know if I can test anything or supply any logs that might help. As a workaround how about a configurable delay between when it detects that Plex has stopped and when it kills everything. There is a configurable delay between kill and restart but because it kills everything that interrupts the update.

Cenedd avatar Jan 13 '23 08:01 Cenedd

its still stucks in "plex updating" status

reloxx13 avatar Jan 15 '23 11:01 reloxx13

What about checking if the plex updating service executable is running? I believe it only gets started when an update is in progress, no?

antczakp avatar Jan 16 '23 09:01 antczakp

Question, so you're talking about the self updating issue, but is the 64bit issue fixed?

I really don't care about the self updating since I've always just logged in, stopped the service, run the new ver install, then started the service, and I think that works fine, just that now when the new ver is the 64bit ver the service isn't(wasn't) finding plex anymore.

So is the 64bit part fixed now?

DarkLogicX avatar Jan 16 '23 10:01 DarkLogicX

Question, so you're talking about the self updating issue, but is the 64bit issue fixed?

I really don't care about the self updating since I've always just logged in, stopped the service, run the new ver install, then started the service, and I think that works fine, just that now when the new ver is the 64bit ver the service isn't(wasn't) finding plex anymore.

So is the 64bit part fixed now?

this is another ticket and its closed.
pls dont go further offtopic.

reloxx13 avatar Jan 16 '23 10:01 reloxx13

Question, so you're talking about the self updating issue, but is the 64bit issue fixed?

I really don't care about the self updating since I've always just logged in, stopped the service, run the new ver install, then started the service, and I think that works fine, just that now when the new ver is the 64bit ver the service isn't(wasn't) finding plex anymore.

So is the 64bit part fixed now?

it should pick it up more reliably, I've also added an option in the settings to manually specify the location if it still can't find it.

cjmurph avatar Jan 16 '23 12:01 cjmurph

I tried 1.2.1 and it seems to pick up that plex is updating. However, at least on my system nothing was happening and it was stuck in "updating". I had to restart the service to get it out of the mode, and then no update actually happened (although I did see the updater starting), not sure if the service tried to kill the update process because it saw that plex died and tried to kill helper applications that run? (sorry if I am not 100% sure how pmsservice works yet)

antczakp avatar Jan 19 '23 17:01 antczakp

so, if it gets stuck in 'plex is updating' it means that it saw that plex was updating so does not kill anything, but waits until it reads the update completed in the log. from what I can see on my machine, the update appears to fail, or is looking for user input and since it's in session 0, that can't happen. The 32 bit update process seems to work fine though.

cjmurph avatar Jan 20 '23 04:01 cjmurph

its neiher failing or asking for user input if running without pmsservice.

reloxx13 avatar Jan 20 '23 06:01 reloxx13

I was following it in the task manager and I could see the update start, but then it dissapeared and pmsservice never got out of the "plex is updating" bit. It could have failed but when I start the process manually it went through fine, so not sure what user input it is asking for?

antczakp avatar Jan 20 '23 09:01 antczakp

Just tried updating to the 64bit ver again via the same method I've always used.

  1. Edit local policy to allow the service account to be logged in via RDP
  2. Download the latest plex install file (this time also downloading the PMS 1.2.1 )
  3. Run the 1.2.1 installer to update the service package
  4. Via the tray stop the Plex service
  5. Run the plex installer to update (it sees the 32bit plex and uninstalls it before installing the new ver)
  6. Go to the tray to start the service
  7. It doesn't give any dialog, just fails to start it.

Looked for that location.txt file, still looking.

DarkLogicX avatar Jan 20 '23 10:01 DarkLogicX

Just tried updating to the 64bit ver again via the same method I've always used.

1. Edit local policy to allow the service account to be logged in via RDP

2. Download the latest plex install file (this time also downloading the PMS 1.2.1 )

3. Run the 1.2.1 installer to update the service package

4. Via the tray stop the Plex service

5. Run the plex installer to update (it sees the 32bit plex and uninstalls it before installing the new ver)

6. Go to the tray to start the service

7. It doesn't give any dialog, just fails to start it.

Looked for that location.txt file, still looking.

Offtopic and this works fine.

reloxx13 avatar Jan 20 '23 10:01 reloxx13

Of course if you stop the pmsservice you can update... that was never the question. But in the 32bit version pmsservice would wait during the update and then restart plex server by itself after the update was finished. The location.txt file you can add separately, however I believe it is now in the settings of the tray app.

antczakp avatar Jan 20 '23 10:01 antczakp

The thread title specifically references the new 64bit ver, and the issue I'm seeing is that after updating in the way I always have it won't start post update.

The built in plex update feature has never worked for me and I don't really care about that, so IMO that aspect isn't new or of concern.

Though with PMS service 1.2.1 I did find in the new UI an option to point it to the executable, and doing so resolved the issue for me.

To be clear from my experience being unable to update Plex via the built in updater not working is an old issue and very low priority, and I'm fairly sure it's a Plex issue not a PMSservice issue as even when manually running Plex in a user session it fails to update via the built in updater. (again my experience is it's always been like that and that Plex needs to fix their updater, but there's a long list of things they need to fix)

Props to cjmurph for working on fixing that.

DarkLogicX avatar Jan 20 '23 11:01 DarkLogicX

never had an issue with the built in updater - my plex has always updated by itself to the most recent version using the plex buttler

but in this case the thread really is about why with the new 64bit version this self updating doesn't work

antczakp avatar Jan 20 '23 11:01 antczakp

same issue, running 64 bit plex update to 1.31.0.6654-02189b09f fails if pmsservice is running, I had to stop the service and start plex by hand only then the update went through, else it would be just stuck every time with pmsservice running

Snake4life avatar Feb 04 '23 09:02 Snake4life

I'm not sure what it is about the installer, but it just doesn't ever seem to complete, so everything gets stuck. It works fine for the 32 bit version. I'll do some more testing with watching for the service rather than watching the log.

cjmurph avatar Feb 11 '23 07:02 cjmurph

Thanks for looking into it Cjmurph. I think I'm up to date on updates at the moment but there's bound to be another at some point soon. If there's anything that could be monitored or logged that you'd find useful just let us know and we'll try to attach it to a post.

Cenedd avatar Feb 11 '23 10:02 Cenedd