Plex Media Server - error on reinstall

    • OMV 2.x
    • Resolved
    • Plex Media Server - error on reinstall

      Hi All,

      I originally installed Plex a while ago, but uninstalled it when I had some issues and was unable / too lazy to fix. Now I've decided I want to give it another try, but am getting errors when installing the plugin.

      Running OMV 2.2.2
      omv-extras plugin/repo installed, plex is visible. I get the below error when trying to install:
      Note: the drive starting 'ae94abf0' is old and no longer present, probably why it cannot find this directory.

      Source Code

      1. >>> *************** Error ***************
      2. Failed to execute command 'export LANG=C; export DEBIAN_FRONTEND=noninteractive; apt-get --yes --force-yes --fix-missing --allow-unauthenticated --reinstall install openmediavault-plexmediaserver 2>&1': Reading package lists...
      3. Building dependency tree...
      4. Reading state information...
      5. The following NEW packages will be installed:
      6. openmediavault-plexmediaserver
      7. 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
      8. Need to get 0 B/22.4 kB of archives.
      9. After this operation, 316 kB of additional disk space will be used.
      10. WARNING: The following packages cannot be authenticated!
      11. openmediavault-plexmediaserver
      12. Authentication warning overridden.
      13. Selecting previously unselected package openmediavault-plexmediaserver.
      14. (Reading database ...
      15. 79881 files and directories currently installed.)
      16. Unpacking openmediavault-plexmediaserver (from .../openmediavault-plexmediaserver_1.0.14_all.deb) ...
      17. Processing triggers for openmediavault ...
      18. Restarting engine daemon ...
      19. Setting up openmediavault-plexmediaserver (1.0.14) ...
      20. stat: cannot stat `/media/ae94abf0-6fb3-4859-a8be-4b28eabf21c5/plexmediaserver/Library': No such file or directory
      21. dpkg: error processing openmediavault-plexmediaserver (--configure):
      22. subprocess installed post-installation script returned error exit status 1
      23. Processing triggers for openmediavault ...
      24. Restarting engine daemon ...
      25. Errors were encountered while processing:
      26. openmediavault-plexmediaserver
      27. Creating index of upgradeable packages ...
      28. Creating index of openmediavault plugins ...
      29. E: Sub-process /usr/bin/dpkg returned an error code (1)
      30. <<< *************************************
      Display All



      Then upon reloading the page, I get this error repeatedly until I uninstall the plugin again.


      Error #3003:
      exception 'OMVException' with message 'Failed to get configuration (xpath=//services/plexmediaserver)' in /usr/share/openmediavault/engined/module/plexmediaserver.inc:82
      Stack trace:
      #0 /usr/share/openmediavault/engined/rpc/services.inc(63): OMVModulePlexMediaServer->getStatus()
      #1 [internal function]: OMVRpcServiceServices->getStatus(Array, Array)
      #2 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
      #3 /usr/share/php/openmediavault/rpc.inc(79): OMVRpcServiceAbstract->callMethod('getStatus', Array, Array)
      #4 /usr/sbin/omv-engined(500): OMVRpc::exec('Services', 'getStatus', Array, Array, 1)
      #5 {main}


      Any help or suggestions would be appreciated!

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

    • Another guy had this same error on a bpi. What device or cpu are you using??? The plexmediaserver is not starting. The plugin is trying to stat the library folder and it is not there because plex is not starting. The library and other files/folders are created upon starting plex.

      Basically, the plugin will not install until the plexmediaserver is installed correctly.

      Give results of:
      cat /etc/passwd | grep plex

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

    • subzero79 wrote:

      There should be a condition folder check in postinst. Try this

      <code class="inlineCode">mkdir -p /media/ae94abf0-6fb3-4859-a8be-4b28eabf21c5/plexmediaserver/Library</code>

      thentry to install the plugin again



      This seemed to work. My guess is that when I uninstalled (removed the plugin) the first time, something was saved pointing to the old hdd. By creating the old folder path, I was able to re-install then change the path to a current hdd. Thanks for the advice!
    • I have the same problem. A while ago, I had PlexMediaServer @ my OMV4. Then, I've deleted this plugin. Today, I was trying to reinstall PMS again.
      I've encountered this problem:

      Source Code

      1. Reading package lists...
      2. Building dependency tree...
      3. Reading state information...
      4. The following additional packages will be installed:
      5. avahi-utils git git-core git-man liberror-perl plexmediaserver
      6. Suggested packages:
      7. git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk
      8. gitweb git-arch git-cvs git-mediawiki git-svn
      9. Recommended packages:
      10. patch less
      11. The following NEW packages will be installed:
      12. avahi-utils git git-core git-man liberror-perl
      13. openmediavault-plexmediaserver plexmediaserver
      14. 0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
      15. Need to get 0 B/109 MB of archives.
      16. After this operation, 258 MB of additional disk space will be used.
      17. Selecting previously unselected package liberror-perl.
      18. (Reading database ... (Reading database ... 5%(Reading database ... 10%(Reading database ... 15%(Reading database ... 20%(Reading database ... 25%(Reading database ... 30%(Reading database ... 35%(Reading database ... 40%(Reading database ... 45%(Reading database ... 50%(Reading database ... 55%(Reading database ... 60%(Reading database ... 65%(Reading database ... 70%(Reading database ... 75%(Reading database ... 80%(Reading database ... 85%(Reading database ... 90%(Reading database ... 95%(Reading database ... 100%(Reading database ... 52536 files and directories currently installed.)
      19. Preparing to unpack .../0-liberror-perl_0.17024-1_all.deb ...
      20. Unpacking liberror-perl (0.17024-1) ...
      21. Selecting previously unselected package git-man.
      22. Preparing to unpack .../1-git-man_1%3a2.11.0-3+deb9u4_all.deb ...
      23. Unpacking git-man (1:2.11.0-3+deb9u4) ...
      24. Selecting previously unselected package git.
      25. Preparing to unpack .../2-git_1%3a2.11.0-3+deb9u4_amd64.deb ...
      26. Unpacking git (1:2.11.0-3+deb9u4) ...
      27. Selecting previously unselected package avahi-utils.
      28. Preparing to unpack .../3-avahi-utils_0.6.32-2_amd64.deb ...
      29. Unpacking avahi-utils (0.6.32-2) ...
      30. Selecting previously unselected package git-core.
      31. Preparing to unpack .../4-git-core_1%3a2.11.0-3+deb9u4_all.deb ...
      32. Unpacking git-core (1:2.11.0-3+deb9u4) ...
      33. Selecting previously unselected package plexmediaserver.
      34. Preparing to unpack .../5-plexmediaserver_1.13.9.5456-ecd600442_amd64.deb ...
      35. Unpacking plexmediaserver (1.13.9.5456-ecd600442) ...
      36. Selecting previously unselected package openmediavault-plexmediaserver.
      37. Preparing to unpack .../6-openmediavault-plexmediaserver_3.8.2_all.deb ...
      38. Unpacking openmediavault-plexmediaserver (3.8.2) ...
      39. Setting up git-man (1:2.11.0-3+deb9u4) ...
      40. Processing triggers for mime-support (3.60) ...
      41. Setting up liberror-perl (0.17024-1) ...
      42. Processing triggers for systemd (232-25+deb9u6) ...
      43. Setting up avahi-utils (0.6.32-2) ...
      44. Processing triggers for openmediavault (4.1.13-1) ...
      45. Restarting engine daemon ...
      46. Setting up git (1:2.11.0-3+deb9u4) ...
      47. Setting up plexmediaserver (1.13.9.5456-ecd600442) ...
      48. Created symlink /etc/systemd/system/multi-user.target.wants/plexmediaserver.service -> /lib/systemd/system/plexmediaserver.service.
      49. Job for plexmediaserver.service failed because the control process exited with error code.
      50. See "systemctl status plexmediaserver.service" and "journalctl -xe" for details.
      51. dpkg: error processing package plexmediaserver (--configure):
      52. subprocess installed post-installation script returned error exit status 1
      53. dpkg: dependency problems prevent configuration of openmediavault-plexmediaserver:
      54. openmediavault-plexmediaserver depends on plexmediaserver | plexmediaserver-installer; however:
      55. Package plexmediaserver is not configured yet.
      56. Package plexmediaserver-installer is not installed.
      57. dpkg: error processing package openmediavault-plexmediaserver (--configure):
      58. dependency problems - leaving unconfigured
      59. Setting up git-core (1:2.11.0-3+deb9u4) ...
      60. Errors were encountered while processing:
      61. plexmediaserver
      62. openmediavault-plexmediaserver
      63. >>> *************** Error ***************
      64. <<< *************************************
      Display All


      After refreshing OMV web-admin, this error code pops up:

      Source Code

      1. Failed to execute XPath query '//services/plexmediaserver'.
      2. Error #0:
      3. OMV\Config\DatabaseException: Failed to execute XPath query '//services/plexmediaserver'. in /usr/share/php/openmediavault/config/database.inc:78
      4. Stack trace:
      5. #0 /usr/share/openmediavault/engined/module/plexmediaserver.inc(58): OMV\Config\Database->get('conf.service.pl...')
      6. #1 /usr/share/openmediavault/engined/rpc/services.inc(56): OMVModulePlexMediaServer->getStatus()
      7. #2 [internal function]: OMVRpcServiceServices->getStatus(Array, Array)
      8. #3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
      9. #4 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('getStatus', Array, Array)
      10. #5 /usr/sbin/omv-engined(536): OMV\Rpc\Rpc::call('Services', 'getStatus', Array, Array, 1)
      11. #6 {main}
      Display All
      Executed command systemctl status plexmediaserver.service gives this result:

      Source Code

      1. ● plexmediaserver.service
      2. Loaded: not-found (Reason: No such file or directory)
      3. Active: failed (Result: exit-code) since Wed 2018-11-21 13:17:21 CET; 4min 30s ago
      4. Nov 21 13:17:16 OpenMediaVault systemd[1]: plexmediaserver.service: Unit entered failed state.
      5. Nov 21 13:17:16 OpenMediaVault systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
      6. Nov 21 13:17:21 OpenMediaVault systemd[1]: plexmediaserver.service: Service hold-off time over, scheduling restart.
      7. Nov 21 13:17:21 OpenMediaVault systemd[1]: Stopped Plex Media Server for Linux.
      8. Nov 21 13:17:21 OpenMediaVault systemd[1]: plexmediaserver.service: Start request repeated too quickly.
      9. Nov 21 13:17:21 OpenMediaVault systemd[1]: Failed to start Plex Media Server for Linux.
      10. Nov 21 13:17:21 OpenMediaVault systemd[1]: plexmediaserver.service: Unit entered failed state.
      11. Nov 21 13:17:21 OpenMediaVault systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
      Display All
    • This is an excerpt from syslog:

      Source Code

      1. Nov 21 13:50:16 OpenMediaVault systemd[1]: Starting Plex Media Server for Linux...
      2. Nov 21 13:50:16 OpenMediaVault sh[2953]: /bin/mkdir: cannot create directory ‘/var/lib/plexmediaserver/Library/Application Support’: Permission denied
      3. Nov 21 13:50:16 OpenMediaVault systemd[1]: plexmediaserver.service: Control process exited, code=exited status=1
      4. Nov 21 13:50:16 OpenMediaVault systemd[1]: Failed to start Plex Media Server for Linux.
      5. Nov 21 13:50:16 OpenMediaVault systemd[1]: plexmediaserver.service: Unit entered failed state.
      6. Nov 21 13:50:16 OpenMediaVault systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
      7. Nov 21 13:50:21 OpenMediaVault systemd[1]: plexmediaserver.service: Service hold-off time over, scheduling restart.
      8. Nov 21 13:50:21 OpenMediaVault systemd[1]: Stopped Plex Media Server for Linux.
      It seems like some process is trying to create folder and subfolders inside /var/lib/plexmediaserver/ and cannot do it due to restrictions.