HOWTO: Plex Media Server on FFP 0.7-arm

Marvell Kirkwood based
Post Reply
User avatar
offbeatdave
Posts: 8
Joined: Tue Oct 28, 2014 11:13 pm

Re: HOWTO: Plex Media Server on FFP 0.7-arm

Post by offbeatdave » Mon Jan 04, 2016 9:58 pm

@barmalej2

Thanks for the interest in helping me out here...

I stopped Plex and then ran

Code: Select all

sh /ffp/start/plexmediaserver.sh
and updated to latest version via the GUI.

I then exited and attempted to start Plex with with command

Code: Select all

sh -x /ffp/start/plexmediaserver.sh start
The output was as follows:

root@Humboldt-Media:/# sh -x /ffp/start/plexmediaserver.sh start
+ PMS_RUN_USER=plex
+ PLEXUID=5000
+ PLEX_MEDIA_SERVER_HOME=/ffp/lib/plexmediaserver
+ PLEX_MEDIA_SERVER_ROOT=/mnt/HD_a2/programs/plex
+ PLEX_MEDIA_SERVER_TMPDIR=/mnt/HD_a2/programs/plex/tmp
+ PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/mnt/HD_a2/programs/plex/lib
+ PLEX_TMP_INSTALL=/mnt/HD_a2/programs/plex/tmp/.tmp
+ SCRIPTVERSION=20151018
+ ARMVERSION=auto
+ PID_FILE='/mnt/HD_a2/programs/plex/lib/Plex Media Server/plexmediaserver.pid'
+ WGET_NO_CHECK_CERTIFICATE=--no-check-certificate
+ wget --help
+ grep no-check-certificate
+ TMPFILE1=/tmp/plextmp_1
+ TMPFILE2=/tmp/plextmp_2
+ ARM_PREFIX='# PLEX_URL_v5='
+ ARM_POSTFIX='\-arm.bin'
+ COMMAND=
+ ParseParams start
+ '[' '!' -z start ']'
+ local command=
+ case $1 in
+ command=start_plex
+ shift
+ '[' -z start_plex ']'
+ '[' '!' -z ']'
+ COMMAND=start_plex
+ '[' '!' -z '' ']'
+ '[' -z start_plex ']'
+ for armversion in auto v5 v7 v7neon
+ '[' auto = auto ']'
+ return
+ start_plex
+ echo -n 'Starting Plex Media Server...'
Starting Plex Media Server...+ create_user_and_homedir
+ cat /etc/passwd
+ grep '^plex:'
+ mkdir -p /mnt/HD_a2/programs/plex/tmp
+ mkdir -p /mnt/HD_a2/programs/plex/lib
+ chown -R plex /mnt/HD_a2/programs/plex
+ check_pid
+ '[' -f '/mnt/HD_a2/programs/plex/lib/Plex Media Server/plexmediaserver.pid' ']'
+ return 1
+ '[' '!' -x '/ffp/lib/plexmediaserver/Plex Media Server' ']'
+ '[' '!' -d /mnt/HD_a2/programs/plex/tmp ']'
+ '[' '!' -f /lib/ld-linux.so.3 -a -f /lib/ld-linux-armhf.so.3 ']'
+ su plex -s /ffp/bin/sh -c '/ffp/bin/sh /ffp/start/plexmediaserver.sh start_pms'
+ echo done
done


Which all looks OK. There was a very long wait after

Code: Select all

+ mkdir -p /mnt/HD_a2/programs/plex/tmp
+ mkdir -p /mnt/HD_a2/programs/plex/lib
+ chown -R plex /mnt/HD_a2/programs/plex
However, I can't access the web interface and if I try

Code: Select all

root@Humboldt-Media:/#  sh /ffp/start/plexmediaserver.sh stop && sleep 5
I get

Code: Select all

 It seems that Plex Media Server is not running (no process found)...
Hmm...once again, downgrading back to 0.9.12.19 works.
"Every day I'm Joggle-ing!"
Joggle-ing since Dec 2009;
Tinkering away since Feb 2010 thanks to PMJ, Jogtools & PnP;
Finally giving something back from Feb 2012 with PnP Mk II & PnP III!

barmalej2
Posts: 2387
Joined: Sun Apr 29, 2012 5:24 pm

Re: HOWTO: Plex Media Server on FFP 0.7-arm

Post by barmalej2 » Tue Jan 05, 2016 8:21 am

However, I can't access the web interface
Did you wait enough after start command (at least 30 minutes), before entering plex web interface? You can check if plex is running manually with:

Code: Select all

ps aux | grep plex | grep -v grep
Please paste outputs of the following commands:

Code: Select all

time find "/mnt/HD_a2/programs/plex" ! -user "plex"

Code: Select all

time chown -R plex /mnt/HD_a2/programs/plex
and

Code: Select all

find /mnt/HD_a2/programs/plex -type f | wc -l

Code: Select all

find /mnt/HD_a2/programs/plex -type d | wc -l

Code: Select all

du -sh /mnt/HD_a2/programs/plex

ShaneHastings
Posts: 2
Joined: Sun Jan 03, 2016 8:47 pm
Location: Ireland
Contact:

Re: HOWTO: Plex Media Server on FFP 0.7-arm

Post by ShaneHastings » Tue Jan 05, 2016 7:14 pm

Hi guys,

I've just gotten my NSA320S and am trying to install Plex (already installed ffp) however whenever I run the command

Code: Select all

slacker -UaA mz:plexmediaserver
or

Code: Select all

slacker -UaA mz:plex
- it tries to connect to rsync for a few minutes then gives up.
It outputs the following:

Code: Select all

root@SwiftNAS:~# slacker -UaA mz:plexmediaserver
Updating package lists...
fetch: rsync -q 'rsync://ffp.inreto.de/ffp/0.7/arm/packages/CHECKSUMS.md5' '/ffp/funpkg/cache/s'
rsync: failed to connect to ffp.inreto.de (109.75.188.159): Connection timed out (110)
rsync error: error in socket IO (code 10) at clientserver.c(122) [Receiver=3.0.9]
FATAL: s: No CHECKSUMS.md5
root@SwiftNAS:~#
I've tried rebooting and setting my DNS to 8.8.8.8 and 8.8.4.4 but no cigar. Is there something I'm doing wrong or is the inreto.de server just down?

Cheers.

barmalej2
Posts: 2387
Joined: Sun Apr 29, 2012 5:24 pm

Re: HOWTO: Plex Media Server on FFP 0.7-arm

Post by barmalej2 » Tue Jan 05, 2016 7:31 pm

inreto.de server is just down. You can still download manually from mz repo and install packages with funpkg or use uwsiteloader.sh tool to unselect s: repository temporary.
P.S. For me ctrl+c works when running

Code: Select all

slacker -UaA mz:plexmediaserver
It breaks download operation of CHECKSUMS.md5 from s: repo and continues further with others.

ShaneHastings
Posts: 2
Joined: Sun Jan 03, 2016 8:47 pm
Location: Ireland
Contact:

Re: HOWTO: Plex Media Server on FFP 0.7-arm

Post by ShaneHastings » Tue Jan 05, 2016 7:42 pm

barmalej2 wrote:inreto.de server is just down. You can still download manually from mz repo and install packages with funpkg or use uwsiteloader.sh tool to unselect s: repository temporary.
P.S. For me ctrl+c works when running

Code: Select all

slacker -UaA mz:plexmediaserver
It breaks download operation of CHECKSUMS.md5 from s: repo and continues further with others.
Ah, thanks! Used the tool to deselect the inreto server and to select Mz's repo. Seems to have worked fine :)

User avatar
offbeatdave
Posts: 8
Joined: Tue Oct 28, 2014 11:13 pm

Re: HOWTO: Plex Media Server on FFP 0.7-arm

Post by offbeatdave » Tue Jan 05, 2016 9:55 pm

OK, I ran the update again and left it running for an hour (I did receive the timeout message in the GUI).
The outputs are as follows:

Code: Select all

root@Humboldt-Media:/home/shares# ps aux | grep plex | grep -v grep
Nothing

Code: Select all

time find "/mnt/HD_a2/programs/plex" ! -user "plex"
gave

Code: Select all

real    3m45.155s
user    0m3.600s
sys     0m13.370s

Code: Select all

time chown -R plex /mnt/HD_a2/programs/plex
gave

Code: Select all

real    4m19.545s
user    0m2.800s
sys     0m14.830s

Code: Select all

find /mnt/HD_a2/programs/plex -type f | wc -l
gave

Code: Select all

84815

Code: Select all

find /mnt/HD_a2/programs/plex -type d | wc -l
gave

Code: Select all

69151

Code: Select all

du -sh /mnt/HD_a2/programs/plex
gave

Code: Select all

5.2G    /mnt/HD_a2/programs/plex
Hope this means something to someone!
"Every day I'm Joggle-ing!"
Joggle-ing since Dec 2009;
Tinkering away since Feb 2010 thanks to PMJ, Jogtools & PnP;
Finally giving something back from Feb 2012 with PnP Mk II & PnP III!

barmalej2
Posts: 2387
Joined: Sun Apr 29, 2012 5:24 pm

Re: HOWTO: Plex Media Server on FFP 0.7-arm

Post by barmalej2 » Wed Jan 06, 2016 7:39 am

Well, it means "something" to me. You have 84815 files and 69151 subdirectories in /mnt/HD_a2/programs/plex directory. Total amout of data inside /mnt/HD_a2/programs/plex is 5,2 GB. Large number of files and directories might explain, why are you getting timeout, when starting from GUI. Timeout is set for 15 seconds for start command from GUI, while using sh /ffp/start/plexmediaserver.sh start there is no timeout set. On start command in both cases, /ffp/start/plexmediaserver.sh script changes ownership of files and subdirectories to plex user inside /mnt/HD_a2/programs/plex dir by running command
chown -R plex /mnt/HD_a2/programs/plex
You have measured how long it takes and according to your output it has taken 4 min. 20 seconds. That is the main reason, why are you getting timeout starting from GUI. So, instead that, always use:

Code: Select all

sh /ffp/start/plexmediaserver.sh start

Another side of your problem is that it takes too long to execute:
find "/mnt/HD_a2/programs/plex" ! -user "plex"
I have done similar testing on mine NSA310, which has slow 2,5'' HDD instead normal 3,5". Also I used whole mine HDD tree (/mnt/HD_a2) instead (/mnt/HD_a2/programs/plex) and here is results:
Total files on /mnt/HD_a2 - 701547
Total dirs on /mnt/HD_a2 - 68748
Total data amount on /mnt/HD_a2 - 821 GB
As you can see, I have similar quantity of dirs as you inside /mnt/HD_a2/programs/plex, but 8 times more files. Still it was twice faster, when I run
time find "/mnt/HD_a2/" ! -user "plex" > /dev/null
real 1m 51.25s
user 0m 13.69s
sys 0m 28.66s
This command measures how long it takes to find files and folders, whose owner is not plex on whole mine HDD.

You have measured only inside /mnt/HD_a2/programs/plex:
time find "/mnt/HD_a2/programs/plex" ! -user "plex"
real 3m45.155s
user 0m3.600s
sys 0m13.370s
However, it taken twice slower than for me, while imo it should be at least 10 times faster instead, taken in to account my slow HDD and 8 times bigger files amount. I have no clue why, maybe something wrong is with your HDD. Draw conclusions for yourself.

User avatar
offbeatdave
Posts: 8
Joined: Tue Oct 28, 2014 11:13 pm

Re: HOWTO: Plex Media Server on FFP 0.7-arm

Post by offbeatdave » Wed Jan 06, 2016 10:34 pm

Thanks anyway. I shall stick with the 0.9.12.19, which works fine every time I reinstall it!

I certainly appreciate you taking the time to explain everything. At least I understand more now than I did previously. Thank you.
"Every day I'm Joggle-ing!"
Joggle-ing since Dec 2009;
Tinkering away since Feb 2010 thanks to PMJ, Jogtools & PnP;
Finally giving something back from Feb 2012 with PnP Mk II & PnP III!

barmalej2
Posts: 2387
Joined: Sun Apr 29, 2012 5:24 pm

Re: HOWTO: Plex Media Server on FFP 0.7-arm

Post by barmalej2 » Wed Jan 06, 2016 10:57 pm

It's OK.
How long it takes to start with the 0.9.12.19 approximately? As far as I understand you can start it from GUI?

jpmad4it
Posts: 7
Joined: Thu Jan 14, 2016 3:53 pm

Re: HOWTO: Plex Media Server on FFP 0.7-arm

Post by jpmad4it » Thu Jan 14, 2016 11:39 pm

Very quick question - is it possible to locate the Plex plugins directory on the NAS via SFTP / SCP? If so, where can I find the folder? Thank you.

barmalej2
Posts: 2387
Joined: Sun Apr 29, 2012 5:24 pm

Re: HOWTO: Plex Media Server on FFP 0.7-arm

Post by barmalej2 » Fri Jan 15, 2016 5:55 am

1.Yes.
2.
/mnt/HD_a2/programs/plex/lib/Plex\ Media\ Server/Plug-ins

jpmad4it
Posts: 7
Joined: Thu Jan 14, 2016 3:53 pm

Re: HOWTO: Plex Media Server on FFP 0.7-arm

Post by jpmad4it » Fri Jan 15, 2016 7:02 am

barmalej2 wrote:1.Yes.
2.
/mnt/HD_a2/programs/plex/lib/Plex\ Media\ Server/Plug-ins
Thank you :-)

barmalej2
Posts: 2387
Joined: Sun Apr 29, 2012 5:24 pm

Re: HOWTO: Plex Media Server on FFP 0.7-arm

Post by barmalej2 » Fri Jan 15, 2016 7:44 am

Don't forget to restart plex service after plugin installation. Plex service needs to change ownership of plugin files.

jpmad4it
Posts: 7
Joined: Thu Jan 14, 2016 3:53 pm

Re: HOWTO: Plex Media Server on FFP 0.7-arm

Post by jpmad4it » Fri Jan 15, 2016 8:23 am

barmalej2 wrote:Don't forget to restart plex service after plugin installation. Plex service needs to change ownership of plugin files.
Ok I'll make sure to do that.

Korleone
Posts: 7
Joined: Fri Jan 22, 2016 4:19 pm

Re: HOWTO: Plex Media Server on FFP 0.7-arm

Post by Korleone » Fri Jan 22, 2016 4:26 pm

Hi, i succesfully installed Plex on my Nsa 325v2 , but everytime when I want to play a mouvie on Plex App from Samsung Tv I receive this error, why? :(
You do not have the required permissions to view the files attached to this post.

Post Reply