Challenges with new Plex install on Raspberry Pi (permissions+?)

server-raspberry-pi

#1

I've spent hours this evening attempting to install Plex Server on a new install of Incredible PBX image with Nubs. Once I completed the Incredible PBX install, I proceeded to follow the standard instructions including "sudo apt-get install -t jessie plexmediaserver"

I had missed the step of expanding my disk space and ran out during the Plex install, but I figured out how to completely uninstall and delete support directories.

While the re-install appeared to be successful, every single time I try to start the services I struggle through some new permissions sort of issue (I manually created and changed at least 3-4 directories to be owned by Plex:plex tried chmod 777 too. The current errors are a bit more elusive to me:

-- Logs begin at Tue 2018-02-06 10:03:25 CST, end at Tue 2018-02-06 11:00:10 CST. --
Feb 06 11:00:04 incredible sh[7444]: /usr/lib/plexmediaserver/Plex Media Server: error while loading shared libraries: /usr/lib/plexmediaserver/libboost_filesystem.so.1.59.0: file too short
Feb 06 11:00:04 incredible systemd[1]: plexmediaserver.service: main process exited, code=exited, status=127/n/a
Feb 06 11:00:04 incredible systemd[1]: Unit plexmediaserver.service entered failed state.
Feb 06 11:00:10 incredible systemd[1]: plexmediaserver.service holdoff time over, scheduling restart.
Feb 06 11:00:10 incredible systemd[1]: Stopping Plex Media Server for Linux...
-- Subject: Unit plexmediaserver.service has begun shutting down
-- Defined-By: systemd

-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

-- Unit plexmediaserver.service has begun shutting down.
Feb 06 11:00:10 incredible systemd[1]: Starting Plex Media Server for Linux...
-- Subject: Unit plexmediaserver.service has begun with start-up
-- Defined-By: systemd

-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

-- Unit plexmediaserver.service has begun starting up.
Feb 06 11:00:10 incredible systemd[1]: Started Plex Media Server for Linux.
-- Subject: Unit plexmediaserver.service has finished start-up
-- Defined-By: systemd

-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

-- Unit plexmediaserver.service has finished starting up.

-- The start-up result is done.
Feb 06 11:00:10 incredible sh[7452]: /usr/lib/plexmediaserver/Plex Media Server: error while loading shared libraries: /usr/lib/plexmediaserver/libboost_filesystem.so.1.59.0: file too short
Feb 06 11:00:10 incredible systemd[1]: plexmediaserver.service: main process exited, code=exited, status=127/n/a
Feb 06 11:00:10 incredible systemd[1]: Unit plexmediaserver.service entered failed state.
root@incredible:~#

I'm not opposed to burning down this Plex installer again but fear I'll be rebuilding directories all over again as my permission and ownership changes seem to have no impact in the end. I assume there is no reason why Plex can't coexist with Incredible PBX and other apps but the install just is very unhappy with something in my environment when I presume is permission related. I've thought about starting with fresh NUBS again and then finding a different way to install Incredible PBX but honestly that seems like a lot more work than just tinkering with the Plex installer.

I'm not super unix literate but I understand chown chmod permissions, can ssh and generally stumble around in the system. Now I haven't even started moving my library over from the Mac but if I can't even get the web front end started then I'm way behind the eight ball.

Thanks in advance for your assistance.


#2

by the way the install guide I used had me change the user from Plex to pi so I'm not sure if all my permissions should be pi:pi or plex:plex nor is it clear to me why I needed to change from plex in the first place.


#3

@uglymagoo

Care to jump in?


#4

@Another1 said:

While the re-install appeared to be successful, every single time I try to start the services I struggle through some new permissions sort of issue

-- Logs begin at Tue 2018-02-06 10:03:25 CST, end at Tue 2018-02-06 11:00:10 CST. --
Feb 06 11:00:04 incredible sh[7444]: /usr/lib/plexmediaserver/Plex Media Server: error while loading shared libraries: /usr/lib/plexmediaserver/libboost_filesystem.so.1.59.0: file too short

Let's start from the beginning: /usr/lib/plexmediaserver contains only the plex binaries, is owned by root:root and populated by the plexmediaserver-installer package. Never change ownership or permissions there. Somehow, the files in this directory are corrupted. So please do the following:

# remove the plex installer
sudo apt-get remove plexmediaserver-installer
# clean left over binaries
sudo rm -r /usr/lib/plexmediaserver
# reinstall plex
sudo apt-get install plexmediaserver-installer
# temporarily stop the Plex server to correct the permissions
sudo systemctl stop plexmediaserver

I'm not opposed to burning down this Plex installer again but fear I'll be rebuilding directories all over again as my permission and ownership changes seem to have no impact in the end.

Now, we have to find your meta data. If you have used the broken plex.io guide. then you have not really changed the user to pi (they are doing it completely wrong :wink: ) and the server is still running as user plex. So your meta data is in /var/lib/plexmediaserver and this directory has to be owned by plex:plex recursively. The installer should take care of this. But to be sure use the following command to fix the permissions: sudo chown -R plex:plex /var/lib/plexmediaserver.

If you have used a tutorial that correctly describes how to create the override.conf file to really change the user to "pi", i.e. if you did something you this [1], you know best what you did set as PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR and USER. If you have only changed the USER setting, then your meta data is also in /var/lib/plexmediaserver. However, please move the meta data to the home directory of USER. /var/lib/plexmediaserver is the home of user plex and you should not change it's permissions. Then correctly edit PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR.

Finally, start the Plex server:

sudo systemctl start plexmediaserver

by the way the install guide I used had me change the user from Plex to pi so I'm not sure if all my permissions should be pi:pi or plex:plex nor is it clear to me why I needed to change from plex in the first place.

There is NO reason to change the user to pi in the first place and my 'official' guide does not tell you to do so

[1] https://forums.plex.tv/discussion/286395/customizing-your-plex-configuration#latest


#5

@Another1 Just to make sure: you are not really using a Raspberry Pi (1) but a Raspberry Pi 2 or 3, right? I am just asking because there is no way the armv7 Plex binaries will work on the armv6 Raspberry Pi (1).