Server Version#: 1.27.2.5929
Player Version#: 1.48.2.3124-647ff031 (Flatpak)
If the Plex Desktop app is killed while running, the (I assume) internal Plex Media Server doesn’t have the opportunity to clean itself up and ~/.var/app/tv.plex.PlexDesktop/data/plex/Plex Media Server/plexmediaserver.pid does not get deleted. While this file exists, subsequent launches fail with Plex Media Server is already running. Will not start.... Deleting the pidfile manually fixes the problem.
To reproduce the issue (with the Flatpak):
- Run the app with
flatpak run tv.plex.PlexDesktop - While it is running, kill the app with
flatpak kill tv.plex.PlexDesktop - Try to run the app with
flatpak run tv.plex.PlexDesktop
This pidfile is not necessary anyway (at least with the Flatpak, not sure how snap or other operating systems handle this) since each separate launch of the app runs in its own container (with a separate PID namespace, like Docker) and the two separate instances both work fine.
You can test this (with the Flatpak) by:
- Launching the first instance with
flatpak run tv.plex.PlexDesktop - Deleting
~/.var/app/tv.plex.PlexDesktop/data/plex/Plex Media Server/plexmediaserver.pid - Launching the second instance with
flatpak run tv.plex.PlexDesktop