Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PMS 64 bit update does not work #67

Open
antczakp opened this issue Oct 27, 2022 · 42 comments
Open

PMS 64 bit update does not work #67

antczakp opened this issue Oct 27, 2022 · 42 comments

Comments

@antczakp
Copy link

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?

@Cenedd
Copy link

Cenedd commented Nov 5, 2022

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.

@roughnecks
Copy link

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.

@DarkLogicX
Copy link

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
Copy link

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.

@antczakp
Copy link
Author

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?

@Cenedd
Copy link

Cenedd commented Nov 29, 2022

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.

@antczakp
Copy link
Author

antczakp commented Dec 1, 2022

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?

@jackkerouac
Copy link

jackkerouac commented Jan 11, 2023

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.

@cjmurph
Copy link
Owner

cjmurph commented Jan 12, 2023

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
Copy link
Owner

cjmurph commented Jan 12, 2023

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

@Cenedd
Copy link

Cenedd commented Jan 12, 2023

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

[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

@cjmurph
Copy link
Owner

cjmurph commented Jan 13, 2023

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.

@Cenedd
Copy link

Cenedd commented Jan 13, 2023

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.

@reloxx13
Copy link

its still stucks in "plex updating" status

@antczakp
Copy link
Author

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

@DarkLogicX
Copy link

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?

@reloxx13
Copy link

reloxx13 commented Jan 16, 2023

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.

@cjmurph
Copy link
Owner

cjmurph commented Jan 16, 2023

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.

@antczakp
Copy link
Author

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)

@cjmurph
Copy link
Owner

cjmurph commented Jan 20, 2023

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.

@reloxx13
Copy link

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

@antczakp
Copy link
Author

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?

@DarkLogicX
Copy link

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.

@reloxx13
Copy link

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.

@antczakp
Copy link
Author

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.

@DarkLogicX
Copy link

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.

@antczakp
Copy link
Author

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

@Snake4life
Copy link

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

@cjmurph
Copy link
Owner

cjmurph commented Feb 11, 2023

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.

@Cenedd
Copy link

Cenedd commented Feb 11, 2023

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.

@C-Blais
Copy link

C-Blais commented Feb 11, 2023

I currently have one pending if you need me to grab any info from it.

@Grass5k
Copy link

Grass5k commented Feb 15, 2023

Plex Media Server_x64_2023_02_15__22_12_54.log
Plex Update Service.log

I am having the same issues, looks like the Plex installer log says PMS service is using one of the plex files?

@materrac
Copy link

I'm having the same issue, just curious if this was ever fixed or if anyone has found a decent workaround?

@Snake4life
Copy link

I'm having the same issue, just curious if this was ever fixed or if anyone has found a decent workaround?

well, well, well, 2 solutions:

1.) use plex 32bit

or what I did:

2.) uninstall pmsservice, activate autologin and add a task which locks(no logout) the server after a minute again, works like a charm

@Aemony
Copy link

Aemony commented Apr 21, 2023

2.) uninstall pmsservice, activate autologin and add a task which locks(no logout) the server after a minute again, works like a charm

This was the method I ended up using as well, though without a task to lock it (not necessary in my case).

Basically just:

  1. Stop Plex from running by using the regular PmsService icon in the notification area.
  2. Use the Add/Remove Programs list in Windows to uninstall PmsService.
  3. In my case I also updated Plex using the latest installer, and ensured that the "Start on login" checkbox at the end of the installer was enabled.
  4. Then it was just a matter of searching for and starting netplwiz and uncheck the "Users Must Enter a User Name and Password" option, and applying the changes.

A restart of the system confirmed that the user was automatically signed in and Plex started up successfully, and that's that.

This way the built-in updater will work just fine with a 64-bit installation.

@cjmurph
Copy link
Owner

cjmurph commented Apr 22, 2023

There does seem to be something about the 64 bit installer that requires a user session. 32 bit seems fine.

@reloxx13
Copy link

From plex changelog Version 1.32.5.7349

(Windows) Fixed potential privileged execution in updater by an unprivileged user (#14406)
(Transcoder) Hardware transcoding is now supported when running Plex Media Server on headless Windows systems (#14332)

@jpwilliams91
Copy link

Hi, do you know if this was ever resolved?

I've recently rebuilt two new Plex servers, both now running PMS x64, with the service accounts being different from the primary administrator/user accounts. One is running on W11, and the other on Server2019.

Both have the same issue when attempting to update.

I've had to disable updates for now. Has anyone found a workaround/fix?

@cjmurph
Copy link
Owner

cjmurph commented Oct 11, 2023

yes, but I haven't released a version with the fix. you can pull the master branch and build it yourself if you are desperate. I am struggling for time atm but it's on my radar.

@reloxx13
Copy link

reloxx13 commented Feb 7, 2024

2024-02-07 PMS Version 1.40.0.7996
(Installer) Windows 64 installer did not set correct permissions for Plex Update Service (PM-979)

@jpwilliams91
Copy link

jpwilliams91 commented Apr 9, 2024

The latest version has resolved the auto-update issue with x64.
(v1.2.3)
Thanks.

@Cenedd
Copy link

Cenedd commented Apr 15, 2024

Just got round to installing 1.2.3.0 and can confirm it successfully detected an update started from the web app, flashed up a status to show this, waited for the update to complete and Plex to restart and then killed all the processes in order to restart them as a service.
This in on Windows Server using the x64 version of Plex, with Plex in C:\Program Files and the data on F:\PlexData. Paths were not manually specified (nothing in tray app and nothing in %localappdatal%\Plex Service*.json) but detected by PmsService.
Thanks cjmurph for getting this sorted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests