Plex Media Server Uninstalled then Reinstalled now the process won't start

    • OMV 3.x
    • Plex Media Server Uninstalled then Reinstalled now the process won't start

      So since I upgrade from OMV 2 to OMV 3 Plex was kinda working. I lost all my previous settings and had to redo all the media directories.
      Then yesterday it stopped working. I started it manually using /etc/init.d/plexmediaserver start it started back right up and it was the install from before my OMV 3 install. All my settings were back etc.

      So this morning, I was thinking that it must have installed in two locations during my upgrade to OMV 3. So I backed up all the database files from Plex and disabled the plugin. After doing this Plex was still running, so this solidified the fact that it was installed in two locations. I removed the plugin and restarted the server.

      Plex is not currently running now. I apt clean and installed the plex media server plugin from the repo and enabled it. Now it won't load and I don't even see a process running for plex.

      Any ideas?

      I ran this command and plex looks to be the current version:

      Source Code

      1. dpkg -l | grep openm
      2. ii openmediavault 3.0.59 all Open network attached storage solution
      3. ii openmediavault-backup 3.4 all backup plugin for OpenMediaVault.
      4. pc openmediavault-docker-gui 3.1.3 amd64 OpenMediaVault plugin for Docker
      5. ii openmediavault-keyring 1.0 all GnuPG archive keys of the OpenMediaVault archiv e
      6. ii openmediavault-nginx 3.0.10 all Nginx plugin for OpenMediaVault.
      7. ii openmediavault-nut 3.2.7 all OpenMediaVault Network UPS Tools (NUT) plugin
      8. ii openmediavault-omvextrasorg 3.4.16 all OMV-Extras.org Package Repositories for OpenMed iaVault
      9. ii openmediavault-plexmediaserver 3.7 all OpenMediaVault Plex Media Server plugin
      10. ii openmediavault-sabnzbd 3.2.3 all SABnzbd plugin for OpenMediaVault.
      11. ii openmediavault-sensors 3.0 all Provides a cpu temperature monitor
      12. ii openmediavault-sonarr 3.2 all OpenMediaVault Sonarr plugin
      13. ii openmediavault-transmissionbt 3.0.9 all OpenMediaVault Transmission (BitTorrent client) plugin.
      14. ii openmediavault-websites 1.2 all Web sites plugin for OpenMediaVault.
      Display All
    • Okay I think I found the problems. I found so many old references of plexmediaserver on my server. I removed them all after uninstalling the plugin.

      Now there's no reference to plex on my server except for my database folder on my shared media drive.

      I reinstalled Plex and had to perform this fix Codec Issue to get Plex to load.

      The problem I'm seeing is that Plex is using

      Source Code

      1. /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases

      as the database location. I want it to go to

      Source Code

      1. /media/dd3de295-9705-4573-b299-53e77a01fada/plexmediaserver
      where I have it pointing within the Plugin settings page.



      How can I change/fix this to point to the correct location?
    • I believe I fixed the problem. I don't know if this is a problem with the OMV 3 version of the Plex Media Server. When you install the plugin it installs Plex Media Server to

      Source Code

      1. /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases
      It ignores the database directory that you point the install to in the plugin settings page. I had to manually adjust the file before I enable Plex

      Find this file

      Source Code

      1. /lib/systemd/system/plexmediaserver.service


      Edit the line

      Source Code

      1. Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/var/lib/plexmediaserver/Library/Application Support"
      With the proper location of your Plex database (mine looks like this)

      Source Code

      1. Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/media/dd3de295-9705-4573-b299-53e77a01fada/plexmediaserver/Library/Application Support"
      Once that is complete now enable the plugin.

      This seems to have corrected the issue. Now I'm not sure what will happen when there's an update to Plex. I will have to keep an eye open and see if it changes back.

      Hope this helps some of you. Could a dev look into this issue as to why in the plugin settings the database doesn't change this file automatically?
    • The plugin doesn't change this file because I a plex upgrade file would be overwritten same as you mentioned. But I know that the plugin creates an override for that systemd unit in reference to that particular env var, which is the proper way not to altere vendor units.

      github.com/OpenMediaVault-Plug…conf/plexmediaserver#L127
      New wiki
      chat support at #openmediavault@freenode IRC | Spanish & English | GMT+10
      telegram.me/openmediavault broadcast channel
      openmediavault discord server
    • The plugin wasn't writing the unit override file unless you changed the database location. This has been fixed in 3.8.1 in the repo now.
      omv 4.1.11 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.11
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!

      The post was edited 1 time, last by ryecoaaron ().

    • Source Code

      1. root@TericaNAS:/etc/systemd/system/plexmediaserver.service.d# systemctl status plexmediaserver
      2. ● plexmediaserver.service - Plex Media Server for Linux
      3. Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled)
      4. Drop-In: /etc/systemd/system/plexmediaserver.service.d
      5. └─db_folder.conf
      6. Active: activating (auto-restart) (Result: exit-code) since Thu 2017-05-25 14:48:09 SAST; 2s ago
      7. Process: 3993 ExecStart=/bin/sh -c LD_LIBRARY_PATH=/usr/lib/plexmediaserver /usr/lib/plexmediaserver/Plex\ Media\ Server (code=exited, status=255)
      8. Process: 3990 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" (code=exited, status=0/SUCCESS)
      9. Main PID: 3993 (code=exited, status=255)
      10. May 25 14:48:09 TericaNAS systemd[1]: Unit plexmediaserver.service entered failed state.
      Display All
    • The shared folder can not be uppercase and has no special characters.

      Der freigegebene Ordner darf nicht groß geschrieben sein und keine Sonderzeichen haben.
      forum-bpi.de Visit on and help us, The Germany Forum :thumbsup:
      github.com/Wolf2000Pi
      Banana Pi /Armbian 3.4.109 / Openmediavault 2.x
      Banana Pi /Armbian 4.11.5-sunxi / Openmediavault 3.0.xx (Test)
      Dell Inspiron One 2205 | Openmediavault 3.0.xx / Kernel 4.7 (Test)
    • I know this thread is old but I also had the same issue.
      I found that the folder located /var/lib/plexmediaserver would remain after a uninstall. So i navigated to /var/lib/ and run the command sudo rmdir plexmediaserver and the try to reinstall the plex plug in. In my case this solved my issue but wanted to see if anyone else had the same luck.
    • Oh man... I have ripping my hair out over this. I saw that in there and how it would change the folder on a reinstall but didn't even think it was causing the issue. thanks to someone on another thread for pointing me to this thread. had been coming the web for 2 days trying to find this issue.
    • Hello,

      I have the same issue (plex not starting, status/code=134). I understand that this fix is not the proper one:

      JSKershaw wrote:



      Edit the line

      Source Code

      1. Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/var/lib/plexmediaserver/Library/Application Support"

      With the proper location of your Plex database (mine looks like this)

      Source Code

      1. Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/media/dd3de295-9705-4573-b299-53e77a01fada/plexmediaserver/Library/Application Support"
      Once that is complete now enable the plugin.
      So, what is the proper fix?

      This is what I checked:

      Source Code

      1. root@homeserver:/etc/systemd/system/plexmediaserver.service.d# cat db_folder.conf
      2. [Service]
      3. EnvironmentFile=/etc/default/plexmediaserver
      4. Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/srv/dev-disk-by-label-Daten/plexmediaserver/Library/Application Support"
      5. plex@homeserver:/etc/systemd/system/plexmediaserver.service.d$ cd "/srv/dev-disk-by-label-Daten/plexmediaserver/Library/Application Support"
      6. plex@homeserver:/etc/systemd/system/plexmediaserver.service.d$ ls "/srv/dev-disk-by-label-Daten/plexmediaserver/Library/Application Support"
      7. Plex Media Server

      Regards,
      Hendrik

      The post was edited 1 time, last by henfri ().

    • Actually I think it is the correct fix. That's how I got mine working. By correct I mean it fixes the issue. But I think the actual problem is with the Plex plugin and not OMV. It points to the wrong directory upon imstall. It's been a while, the plugin may have been fixed but I'm not sure. I haven't updated to see. And frankly am a little nervous to do so since it has been working fine since fixing it.
    • And this is why I keep telling people to stop using the plugin in favor of docker. I guess if I remove the plugin from the repo...
      omv 4.1.11 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.11
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Well, I think the reason, and I may be speaking for myself here, that people insist on using Plex is that some of us have the liftime pass. So to not use it defeats the purpose of having it. I've had Plex since before I had OMV so naturally I installed it. It's a good platform if they would just get that plugin to behave.

      Someone may be able to shed some light on this but the last system update to OMV changed some things directory wise right? I didn't have the issue till I updated OMV. Not saying it's an OMV issue, just that the developers of the Plex plugin are a little behind. Usually fixes don't take this long.

      Maybe someone can shed some light on this. I'm used to having to tweak things with Linux so it was more frustrating finding the solution than actually applying it. But to those who just want it to work, well, I'm not sure what to say there.
    • mattejacob wrote:

      just that the developers of the Plex plugin are a little behind
      Yep, the developer (me) of the plex plugin just said to not use the plugin :) I don't use or like plex and it changes too often to keep up with. And not using it makes it very difficult to know why some things break. Many people are using plex in a docker now. It seems odd that you couldn't use lifetime pass in a docker since the important files are stored in persistent storage.
      omv 4.1.11 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.11
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!