cjmurph / PmsService

Plex Media Server service wrapper for windows
MIT License
512 stars 58 forks source link

Plex keeps getting killed: Exception on plex state change callback #90

Closed BoxcarFields closed 1 month ago

BoxcarFields commented 1 month ago

It works for a while and then dies. I have to right-click the PMS Service Tray icon and hit 'restart Plex' to get PMS going again. The OS is Win Server 2022 and Plex is 64-bit, PMS Service version is 1.2.3.0. I'm pasting the log lines below. Thanks.

[15:59:50 INF][PmsMonitor][Restart] Restarting Plex...
[15:59:50 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.
[15:59:50 INF][PmsMonitor][EndPlex] Killing Plex.
[15:59:50 WRN][][PlexStopped] Exception running callback: The operation 'OnPlexStopped' 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.
[15:59:50 INF][PmsMonitor][Plex_Exited] Plex Media Server has stopped!
[15:59:50 INF][PmsMonitor][KillSupportingProcesses] Killing supporting processes.
[15:59:50 INF][PmsMonitor][KillSupportingProcess] Looking for process: Plex DLNA Server
[15:59:50 INF][PmsMonitor][KillSupportingProcess] 0 instances of Plex DLNA Server found.
[15:59:50 INF][PmsMonitor][KillSupportingProcess] Looking for process: PlexScriptHost
[15:59:50 INF][PmsMonitor][KillSupportingProcess] 1 instances of PlexScriptHost found.
[15:59:50 INF][PmsMonitor][KillSupportingProcess] Stopping PlexScriptHost with PID of 6496.
[15:59:50 INF][PmsMonitor][KillSupportingProcess] PlexScriptHost with PID stopped
[15:59:50 INF][PmsMonitor][KillSupportingProcess] Looking for process: PlexTranscoder
[15:59:50 INF][PmsMonitor][KillSupportingProcess] 0 instances of PlexTranscoder found.
[15:59:50 INF][PmsMonitor][KillSupportingProcess] Looking for process: Plex Transcoder
[15:59:50 INF][PmsMonitor][KillSupportingProcess] 0 instances of Plex Transcoder found.
[15:59:50 INF][PmsMonitor][KillSupportingProcess] Looking for process: PlexNewTranscoder
[15:59:50 INF][PmsMonitor][KillSupportingProcess] 0 instances of PlexNewTranscoder found.
[15:59:50 INF][PmsMonitor][KillSupportingProcess] Looking for process: Plex Media Scanner
[15:59:50 INF][PmsMonitor][KillSupportingProcess] 0 instances of Plex Media Scanner found.
[15:59:50 INF][PmsMonitor][KillSupportingProcess] Looking for process: PlexRelay
[15:59:50 INF][PmsMonitor][KillSupportingProcess] 0 instances of PlexRelay found.
[15:59:50 INF][PmsMonitor][KillSupportingProcess] Looking for process: Plex Relay
[15:59:50 INF][PmsMonitor][KillSupportingProcess] 0 instances of Plex Relay found.
[15:59:50 INF][PmsMonitor][KillSupportingProcess] Looking for process: EasyAudioEncoder
[15:59:50 INF][PmsMonitor][KillSupportingProcess] 0 instances of EasyAudioEncoder found.
[15:59:50 INF][PmsMonitor][KillSupportingProcess] Looking for process: Plex Tuner Service
[15:59:50 INF][PmsMonitor][KillSupportingProcess] 0 instances of Plex Tuner Service found.
[15:59:50 INF][PmsMonitor][KillSupportingProcess] Looking for process: Plex Media Fingerprinter
[15:59:50 INF][PmsMonitor][KillSupportingProcess] 0 instances of Plex Media Fingerprinter found.
[15:59:50 INF][PmsMonitor][Plex_Exited] Waiting 5 seconds before re-starting the Plex process.
[15:59:50 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.
[15:59:55 INF][PmsMonitor][GetPlexExecutable] Plex executable found using hard coded lookup
[15:59:55 INF][PmsMonitor][Start] Plex executable found at C:\Program Files\Plex\Plex Media Server\Plex Media Server.exe
[15:59:55 DBG][PmsMonitor][StartPlex] Disabling first run.
[15:59:55 DBG][PmsMonitor][DisableFirstRun] First run is: 0
[15:59:55 DBG][PmsMonitor][StartPlex] No plex defined, checking for running process.
[15:59:55 INF][PmsMonitor][StartPlex] Attempting to start Plex.
[15:59:55 INF][PmsMonitor][StartPlex] Plex Media Server version is 1.40.4.8679. Can use startup argument.
[15:59:55 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.
[15:59:55 INF][PmsMonitor][StartPlex] Plex Media Server Started.
[18:15:28 INF][PmsMonitor][Restart] Restarting Plex...
[18:15:28 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.
[18:15:28 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.
[18:15:28 INF][PmsMonitor][EndPlex] Killing Plex.
[18:15:28 WRN][][PlexStopped] Exception running callback: The operation 'OnPlexStopped' 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.
[18:15:28 WRN][][PlexStopped] Exception running callback: The operation 'OnPlexStopped' 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.
[18:15:28 INF][PmsMonitor][Plex_Exited] Plex Media Server has stopped!
[18:15:28 INF][PmsMonitor][KillSupportingProcesses] Killing supporting processes.
[18:15:28 INF][PmsMonitor][KillSupportingProcess] Looking for process: Plex DLNA Server
[18:15:28 INF][PmsMonitor][KillSupportingProcess] 0 instances of Plex DLNA Server found.
[18:15:28 INF][PmsMonitor][KillSupportingProcess] Looking for process: PlexScriptHost
[18:15:28 INF][PmsMonitor][KillSupportingProcess] 1 instances of PlexScriptHost found.
[18:15:28 INF][PmsMonitor][KillSupportingProcess] Stopping PlexScriptHost with PID of 11524.
[18:15:28 INF][PmsMonitor][KillSupportingProcess] PlexScriptHost with PID stopped
[18:15:28 INF][PmsMonitor][KillSupportingProcess] Looking for process: PlexTranscoder
[18:15:28 INF][PmsMonitor][KillSupportingProcess] 0 instances of PlexTranscoder found.
[18:15:28 INF][PmsMonitor][KillSupportingProcess] Looking for process: Plex Transcoder
[18:15:28 INF][PmsMonitor][KillSupportingProcess] 0 instances of Plex Transcoder found.
[18:15:28 INF][PmsMonitor][KillSupportingProcess] Looking for process: PlexNewTranscoder
[18:15:28 INF][PmsMonitor][KillSupportingProcess] 0 instances of PlexNewTranscoder found.
[18:15:28 INF][PmsMonitor][KillSupportingProcess] Looking for process: Plex Media Scanner
[18:15:28 INF][PmsMonitor][KillSupportingProcess] 0 instances of Plex Media Scanner found.
[18:15:28 INF][PmsMonitor][KillSupportingProcess] Looking for process: PlexRelay
[18:15:28 INF][PmsMonitor][KillSupportingProcess] 0 instances of PlexRelay found.
[18:15:28 INF][PmsMonitor][KillSupportingProcess] Looking for process: Plex Relay
[18:15:28 INF][PmsMonitor][KillSupportingProcess] 0 instances of Plex Relay found.
[18:15:28 INF][PmsMonitor][KillSupportingProcess] Looking for process: EasyAudioEncoder
[18:15:28 INF][PmsMonitor][KillSupportingProcess] 0 instances of EasyAudioEncoder found.
[18:15:28 INF][PmsMonitor][KillSupportingProcess] Looking for process: Plex Tuner Service
[18:15:28 INF][PmsMonitor][KillSupportingProcess] 0 instances of Plex Tuner Service found.
[18:15:28 INF][PmsMonitor][KillSupportingProcess] Looking for process: Plex Media Fingerprinter
[18:15:28 INF][PmsMonitor][KillSupportingProcess] 0 instances of Plex Media Fingerprinter found.
[18:15:28 INF][PmsMonitor][Plex_Exited] Waiting 5 seconds before re-starting the Plex process.
[18:15:28 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.
[18:15:28 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.
[18:15:33 INF][PmsMonitor][GetPlexExecutable] Plex executable found using hard coded lookup
[18:15:33 INF][PmsMonitor][Start] Plex executable found at C:\Program Files\Plex\Plex Media Server\Plex Media Server.exe
[18:15:33 DBG][PmsMonitor][StartPlex] Disabling first run.
[18:15:33 DBG][PmsMonitor][DisableFirstRun] First run is: 0
[18:15:33 DBG][PmsMonitor][StartPlex] No plex defined, checking for running process.
[18:15:33 INF][PmsMonitor][StartPlex] Attempting to start Plex.
[18:15:33 INF][PmsMonitor][StartPlex] Plex Media Server version is 1.40.4.8679. Can use startup argument.
[18:15:33 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.
[18:15:33 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.
[18:15:34 INF][PmsMonitor][StartPlex] Plex Media Server Started.
cjmurph commented 1 month ago

Interestingly, I don't think the errors in the log are the cause of the stopping, although they do signify that something is wrong. Have you checked the plex logs to see if there is anything in there that could be the root cause of plex stopping? the service appears to be simply responding to the plex process exiting.

BoxcarFields commented 1 month ago

Thanks for that feedback (good to know that no issues with the PMS Service application). I will investigate the Plex logs in that case, and close this issue for now :)