Plex via FFP , managed to get running - Question for Mijzelf

Oxnas 810 based
barmalej2
Posts: 2388
Joined: Sun Apr 29, 2012 5:24 pm

Re: Plex via FFP , managed to get running - Question for Mij

Post by barmalej2 » Wed Jan 30, 2013 6:10 pm

Mijzelf wrote: Are you sure about that? I don't think Plex uses any FFP libs at all, as it cannot find them. It can find it's own libs by LD_LIBRARY_PATH, and /lib/* because that's the default, but /ffp/lib?
Yep. You right. I was a little bit confused with such coincidence on sqlite error. Plex is not using any external libraries except one-Avahi. And this should be strange:

Code: Select all

root@NSA310:~# export LD_LIBRARY_PATH=/ffp/lib/plexmediaserver
root@NSA310:~# ldd /ffp/lib/plexmediaserver/Plex\ Media\ Server
        libboost_system.so.1.47.0 => /ffp/lib/plexmediaserver/libboost_system.so.1.47.0 (0x40005000)
        libboost_filesystem.so.1.47.0 => /ffp/lib/plexmediaserver/libboost_filesystem.so.1.47.0 (0x40010000)
        libboost_thread.so.1.47.0 => /ffp/lib/plexmediaserver/libboost_thread.so.1.47.0 (0x40031000)
        libboost_iostreams.so.1.47.0 => /ffp/lib/plexmediaserver/libboost_iostreams.so.1.47.0 (0x40050000)
        libboost_regex.so.1.47.0 => /ffp/lib/plexmediaserver/libboost_regex.so.1.47.0 (0x40081000)
        libboost_signals.so.1.47.0 => /ffp/lib/plexmediaserver/libboost_signals.so.1.47.0 (0x4017a000)
        libboost_program_options.so.1.47.0 => /ffp/lib/plexmediaserver/libboost_program_options.so.1.47.0 (0x40197000)
        libxml2.so.2 => /ffp/lib/plexmediaserver/libxml2.so.2 (0x401f4000)
        libavutil.so.50 => /ffp/lib/plexmediaserver/libavutil.so.50 (0x403da000)
        libavcodec.so.52 => /ffp/lib/plexmediaserver/libavcodec.so.52 (0x40404000)
        libavformat.so.52 => /ffp/lib/plexmediaserver/libavformat.so.52 (0x40f21000)
        libswscale.so.0 => /ffp/lib/plexmediaserver/libswscale.so.0 (0x41025000)
        libz.so.1 => /ffp/lib/plexmediaserver/libz.so.1 (0x4105a000)
        libcrypto.so.1.0.0 => /ffp/lib/plexmediaserver/libcrypto.so.1.0.0 (0x41083000)
        libssl.so.1.0.0 => /ffp/lib/plexmediaserver/libssl.so.1.0.0 (0x411e7000)
        libnatpmp.so.1 => /ffp/lib/plexmediaserver/libnatpmp.so.1 (0x41239000)
        libminiupnpc.so.8 => /ffp/lib/plexmediaserver/libminiupnpc.so.8 (0x41243000)
        libiconv.so.2 => /ffp/lib/plexmediaserver/libiconv.so.2 (0x41254000)
        libdbus-1.so.3 => /ffp/lib/plexmediaserver/libdbus-1.so.3 (0x41352000)
        libsqlite3.so.0 => /ffp/lib/plexmediaserver/libsqlite3.so.0 (0x413b6000)
        libcurl.so.4 => /ffp/lib/plexmediaserver/libcurl.so.4 (0x4148c000)
        libsoci_core-gcc-3_0-3.0.0.so => /ffp/lib/plexmediaserver/libsoci_core-gcc-3_0-3.0.0.so (0x414e0000)
        libsoci_sqlite3-gcc-3_0-3.0.0.so => /ffp/lib/plexmediaserver/libsoci_sqlite3-gcc-3_0-3.0.0.so (0x4152e000)
        libpython2.7.so.1.0 => /ffp/lib/plexmediaserver/libpython2.7.so.1.0 (0x4154c000)
        libavahi-client.so.3 => /ffp/lib/plexmediaserver/libavahi-client.so.3 (0x416ed000)
        libavahi-common.so.3 => /ffp/lib/plexmediaserver/libavahi-common.so.3 (0x41709000)
        libfreeimage.so.3 => /ffp/lib/plexmediaserver/libfreeimage.so.3 (0x41721000)
        libgcc_s.so.1 => /ffp/lib/libgcc_s.so.1 (0x41c3b000)
        libc.so.6 => not found
        libstdc++.so.6 => /ffp/lib/libstdc++.so.6 (0x41c4e000)
        libm.so.6 => not found
        libpthread.so.0 => /ffp/lib/libpthread.so.0 (0x41d14000)
        libdl.so.2 => not found
        librt.so.1 => not found
        libm.so.6 => not found
        libc.so.6 => not found
        librt.so.1 => not found
        libm.so.6 => not found
        libc.so.6 => not found
        librt.so.1 => not found
        libm.so.6 => not found
        libc.so.6 => not found
        librt.so.1 => not found
        libm.so.6 => not found
        libc.so.6 => not found
        librt.so.1 => not found
        libm.so.6 => not found
        libc.so.6 => not found
        librt.so.1 => not found
        libm.so.6 => not found
        libc.so.6 => not found
        librt.so.1 => not found
        libm.so.6 => not found
        libc.so.6 => not found
        libdl.so.2 => not found
        libm.so.6 => not found
        libc.so.6 => not found
        libm.so.6 => not found
        libc.so.6 => not found
        libm.so.6 => not found
        libc.so.6 => not found
        libm.so.6 => not found
        libc.so.6 => not found
        libm.so.6 => not found
        libc.so.6 => not found
        libc.so.6 => not found
        libdl.so.2 => not found
        libc.so.6 => not found
        libdl.so.2 => not found
        libc.so.6 => not found
        libc.so.6 => not found
        libc.so.6 => not found
        libc.so.6 => not found
        librt.so.1 => not found
        libc.so.6 => not found
        libdl.so.2 => not found
        libc.so.6 => not found
        libidn.so.11 => /ffp/lib/plexmediaserver/libidn.so.11 (0x41d30000)
        librt.so.1 => not found
        libdl.so.2 => not found
        libc.so.6 => not found
        libdl.so.2 => not found
        libm.so.6 => not found
        libc.so.6 => not found
        libdl.so.2 => not found
        libm.so.6 => not found
        libc.so.6 => not found
        libdl.so.2 => not found
        libutil.so.1 => not found
        libm.so.6 => not found
        libc.so.6 => not found
        librt.so.1 => not found
        libdl.so.2 => not found
        libc.so.6 => not found
        libc.so.6 => not found
        libc.so.6 => not found
        libc.so.0 => /ffp/lib/libc.so.0 (0x41d6d000)
        libm.so.0 => /ffp/lib/libm.so.0 (0x41dd2000)
        ld-uClibc.so.0 => /ffp/lib/ld-uClibc.so.0 (0x2a000000)
        libdl.so.0 => /ffp/lib/libdl.so.0 (0x41ded000)
        libc.so.6 => not found
:?:

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

Re: Plex via FFP , managed to get running - Question for Mij

Post by barmalej2 » Wed Jan 30, 2013 7:41 pm

Mijzelf wrote:
Script still needs some corrections
Do you have actual suggestions?
Yes, I have, but don't know, is these suggestions right.
When I starting PMS I am getting strange ending:

Code: Select all

root@NSA310:~# /ffp/start/plexmediaserver.sh start
Starting Plex Media Server...8192
root@NSA310:~#
But this is not big deal. If I click on refresh button in PMS web manage page, now I am getting some backgroud info:

Code: Select all

root@NSA310:~# /ffp/start/plexmediaserver.sh start
Starting Plex Media Server...8192
root@NSA310:~#
root@NSA310:~#  * Refreshing Www

root@NSA310:~# GUI: Requesting metadata for 'fringe.507.hdtv-lol'

The only way to get back command line is CTRL+c.

Suggestion to make some corrections in start up script:

Code: Select all

/ffp/bin/su ${PMS_RUN_USER} -s /ffp/bin/sh -c "$0 start_pms" >/dev/null 2>&1 && echo "done" || echo "something is wrong and Plex Media Server can't start"
and

Code: Select all

${PLEX_MEDIA_SERVER_HOME}/Plex\ Media\ Server &
After correction I am getting:

Code: Select all

root@NSA310:~# /ffp/start/plexmediaserver.sh start
Starting Plex Media Server...done
root@NSA310:~#
The problem above is gone and somehow this better handles with stop command. What I mean?
If execute stop command after start almost immediately, it will only kill PLEX Media Server process and leaves plugins processes running. After editing as my suggestion, all processes are killed. It just takes a little bit more time to kill them, comparing with stop time if you let PMS fully load.
Is these changes are right? >M

P.S. I'am still testing PMS.

Mijzelf
Posts: 6207
Joined: Mon Jun 16, 2008 10:45 am

Re: Plex via FFP , managed to get running - Question for Mij

Post by Mijzelf » Thu Jan 31, 2013 8:58 am

barmalej2 wrote:And this should be strange:
ldd is a part of FFP, and doesn't search /lib. I suppose the libs are there, and I suppose

Code: Select all

export LD_LIBRARY_PATH=/ffp/lib/plexmediaserver:/lib
ldd /ffp/lib/plexmediaserver/Plex\ Media\ Server
will give another result.
... suggestions ...
Excellent. Tonight I'll look at it.

tentakel
Posts: 3
Joined: Thu Jan 31, 2013 3:16 pm

Re: Plex via FFP , managed to get running - Question for Mij

Post by tentakel » Thu Jan 31, 2013 3:31 pm

Hey Guys!,

Thank you for getting Plex on ffp-powered devices! And all the otherstuff you do for the ffp-community! :)


Plex runs quite well on my device, but after some hours it gets unreachable by web-config-page and won't be discovered anymore by my LG TV nor by the plex app on PC.

However all the processes seem to be running according to "ps aux | grep plex"
The DLNA service gets published too, but times out after selecting it on my tv.

Does any of you guys have similar problems?

I will try to catch some logs later, when I'm at home

bye, tentakel

:arrow: EDIT: I'm running a NSA-310

Mijzelf
Posts: 6207
Joined: Mon Jun 16, 2008 10:45 am

Re: Plex via FFP , managed to get running - Question for Mij

Post by Mijzelf » Thu Jan 31, 2013 8:31 pm

I've uploaded a new version plexmediaserver-0.9.7-arm-3.txz. Changes:
  • Applied barmalej2's suggestions
  • Script removes stale pid file & error msg from cat suppressed
  • Added support for ReadNAS package
@tentakel: It's reproducible, the being unreachable after some hours? You could try the ReadyNAS variant. Uninstall the current package:

Code: Select all

/ffp/start/plexmediaserver.sh uninstall
funpkg -r plexmediaserver
Download the latest, and edit the script to let PLEX_URL in the header point to the ReadyNAS package, before running install.

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

Re: Plex via FFP , managed to get running - Question for Mij

Post by barmalej2 » Fri Feb 01, 2013 8:10 am

Mijzelf wrote:ldd is a part of FFP, and doesn't search /lib. I suppose the libs are there, and I suppose

Code: Select all

export LD_LIBRARY_PATH=/ffp/lib/plexmediaserver:/lib
ldd /ffp/lib/plexmediaserver/Plex\ Media\ Server
will give another result.
According to Elan from Plex development team, the only known external dependency of PMS is Avahi, which is required to provide Bonjour-based discovery. Source:http://elan.plexapp.com/2011/05/14/the- ... ia-server/
Tobias Hieta also from Plex dev team confirms that:
All the dependencies are shipped with Plex in /usr/lib/plexmediaserver
Source:http://forums.plexapp.com/index.php/top ... libraries/

But I see something else:
root@NSA310:~# export LD_LIBRARY_PATH=/ffp/lib/plexmediaserver:/lib
root@NSA310:~# ldd /ffp/lib/plexmediaserver/Plex\ Media\ Server
libboost_system.so.1.47.0 => /ffp/lib/plexmediaserver/libboost_system.so.1.47.0 (0x40005000)
libboost_filesystem.so.1.47.0 => /ffp/lib/plexmediaserver/libboost_filesystem.so.1.47.0 (0x40010000)
libboost_thread.so.1.47.0 => /ffp/lib/plexmediaserver/libboost_thread.so.1.47.0 (0x40031000)
libboost_iostreams.so.1.47.0 => /ffp/lib/plexmediaserver/libboost_iostreams.so.1.47.0 (0x40050000)
libboost_regex.so.1.47.0 => /ffp/lib/plexmediaserver/libboost_regex.so.1.47.0 (0x40081000)
libboost_signals.so.1.47.0 => /ffp/lib/plexmediaserver/libboost_signals.so.1.47.0 (0x4017a000)
libboost_program_options.so.1.47.0 => /ffp/lib/plexmediaserver/libboost_program_options.so.1.47.0 (0x40197000)
libxml2.so.2 => /ffp/lib/plexmediaserver/libxml2.so.2 (0x401f4000)
libavutil.so.50 => /ffp/lib/plexmediaserver/libavutil.so.50 (0x403da000)
libavcodec.so.52 => /ffp/lib/plexmediaserver/libavcodec.so.52 (0x40404000)
libavformat.so.52 => /ffp/lib/plexmediaserver/libavformat.so.52 (0x40f21000)
libswscale.so.0 => /ffp/lib/plexmediaserver/libswscale.so.0 (0x41025000)
libz.so.1 => /ffp/lib/plexmediaserver/libz.so.1 (0x4105a000)
libcrypto.so.1.0.0 => /ffp/lib/plexmediaserver/libcrypto.so.1.0.0 (0x41083000)
libssl.so.1.0.0 => /ffp/lib/plexmediaserver/libssl.so.1.0.0 (0x411e7000)
libnatpmp.so.1 => /ffp/lib/plexmediaserver/libnatpmp.so.1 (0x41239000)
libminiupnpc.so.8 => /ffp/lib/plexmediaserver/libminiupnpc.so.8 (0x41243000)
libiconv.so.2 => /ffp/lib/plexmediaserver/libiconv.so.2 (0x41254000)
libdbus-1.so.3 => /ffp/lib/plexmediaserver/libdbus-1.so.3 (0x41352000)
libsqlite3.so.0 => /ffp/lib/plexmediaserver/libsqlite3.so.0 (0x413b6000)
libcurl.so.4 => /ffp/lib/plexmediaserver/libcurl.so.4 (0x4148c000)
libsoci_core-gcc-3_0-3.0.0.so => /ffp/lib/plexmediaserver/libsoci_core-gcc-3_0-3.0.0.so (0x414e0000)
libsoci_sqlite3-gcc-3_0-3.0.0.so => /ffp/lib/plexmediaserver/libsoci_sqlite3-gcc-3_0-3.0.0.so (0x4152e000)
libpython2.7.so.1.0 => /ffp/lib/plexmediaserver/libpython2.7.so.1.0 (0x4154c000)
libavahi-client.so.3 => /ffp/lib/plexmediaserver/libavahi-client.so.3 (0x416ed000)
libavahi-common.so.3 => /ffp/lib/plexmediaserver/libavahi-common.so.3 (0x41709000)
libfreeimage.so.3 => /ffp/lib/plexmediaserver/libfreeimage.so.3 (0x41721000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x41c3b000)
libc.so.6 => /lib/libc.so.6 (0x41c4f000)
libstdc++.so.6 => /lib/libstdc++.so.6 (0x41d7b000)
libm.so.6 => /lib/libm.so.6 (0x41e33000)

libpthread.so.0 => /ffp/lib/libpthread.so.0 (0x41edd000)
libdl.so.2 => /lib/libdl.so.2 (0x41ef9000)
librt.so.1 => not found
librt.so.1 => not found
librt.so.1 => not found
librt.so.1 => not found
librt.so.1 => not found
librt.so.1 => not found
librt.so.1 => not found
librt.so.1 => not found

libidn.so.11 => /ffp/lib/plexmediaserver/libidn.so.11 (0x41f05000)
librt.so.1 => not found
libutil.so.1 => not found
librt.so.1 => not found

ld-linux.so.3 => /lib/ld-linux.so.3 (0x41f42000)
ld-uClibc.so.0 => /ffp/lib/ld-uClibc.so.0 (0x2a000000)
libdl.so.0 => /ffp/lib/libdl.so.0 (0x41f67000)
libc.so.0 => /ffp/lib/libc.so.0 (0x41f72000)

root@NSA310:~#

Give me some light please, I am totally confused. :?

Mijzelf
Posts: 6207
Joined: Mon Jun 16, 2008 10:45 am

Re: Plex via FFP , managed to get running - Question for Mij

Post by Mijzelf » Fri Feb 01, 2013 9:05 am

According to Elan from Plex development team, the only known external dependency of PMS is Avahi
Well, that's clearly not true:

Code: Select all

# lsof -p ` cat /mnt/HD_a2/plextmpdir/lib/Plex\ Media\ Server/plexmediaserver.pid `
COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF    NODE NAME
Plex    6642 plex  cwd    DIR    9,0     4096 3014657 /i-data/3a22b091/plex
Plex    6642 plex  rtd    DIR    0,1        0       1 /
Plex    6642 plex  txt    REG    9,0  9185748  796159 /usr/local/zy-pkgs/ffproot/ffp/lib/plexmediaserver/Plex Media Server
Plex    6642 plex  mem    REG    0,1   119328     844 /lib/ld-2.8.so
Plex    6642 plex  mem    REG    9,0    17929  796101 /usr/local/zy-pkgs/ffproot/ffp/lib/plexmediaserver/libboost_system.so.1.47.0
Plex    6642 plex  mem    REG    9,0   176915  796089 /usr/local/zy-pkgs/ffproot/ffp/lib/plexmediaserver/libboost_filesystem.so.1.47.0
Plex    6642 plex  mem    REG    9,0   136746  796103 /usr/local/zy-pkgs/ffproot/ffp/lib/plexmediaserver/libboost_thread.so.1.47.0
Plex    6642 plex  mem    REG    9,0   299083  796091 /usr/local/zy-pkgs/ffproot/ffp/lib/plexmediaserver/libboost_iostreams.so.1.47.0
Plex    6642 plex  mem    REG    9,0  1199510  796095 /usr/local/zy-pkgs/ffproot/ffp/lib/plexmediaserver/libboost_regex.so.1.47.0
Plex    6642 plex  mem    REG    9,0   115565  796098 /usr/local/zy-pkgs/ffproot/ffp/lib/plexmediaserver/libboost_signals.so.1.47.0
Plex    6642 plex  mem    REG    9,0   466283  796093 /usr/local/zy-pkgs/ffproot/ffp/lib/plexmediaserver/libboost_program_options.so.1.47.0
Plex    6642 plex  mem    REG    9,0  2240018  796147 /usr/local/zy-pkgs/ffproot/ffp/lib/plexmediaserver/libxml2.so.2.7.8
Plex    6642 plex  mem    REG    9,0   126224  796087 /usr/local/zy-pkgs/ffproot/ffp/lib/plexmediaserver/libavutil.so.50.40.1
Plex    6642 plex  mem    REG    9,0  6079508  796081 /usr/local/zy-pkgs/ffproot/ffp/lib/plexmediaserver/libavcodec.so.52.117.0
Plex    6642 plex  mem    REG    9,0  1038132  796084 /usr/local/zy-pkgs/ffproot/ffp/lib/plexmediaserver/libavformat.so.52.105.0
Plex    6642 plex  mem    REG    9,0   184536  796144 /usr/local/zy-pkgs/ffproot/ffp/lib/plexmediaserver/libswscale.so.0.13.0
Plex    6642 plex  mem    REG    9,0   165976  796156 /usr/local/zy-pkgs/ffproot/ffp/lib/plexmediaserver/libz.so.1.2.7
Plex    6642 plex  mem    REG    9,0  1740726  796105 /usr/local/zy-pkgs/ffproot/ffp/lib/plexmediaserver/libcrypto.so.1.0.0
Plex    6642 plex  mem    REG    9,0   352138  796141 /usr/local/zy-pkgs/ffproot/ffp/lib/plexmediaserver/libssl.so.1.0.0
Plex    6642 plex  mem    REG    9,0    11483  796130 /usr/local/zy-pkgs/ffproot/ffp/lib/plexmediaserver/libnatpmp.so.1
Plex    6642 plex  mem    REG    9,0    45524  796128 /usr/local/zy-pkgs/ffproot/ffp/lib/plexmediaserver/libminiupnpc.so.8
Plex    6642 plex  mem    REG    9,0  1051498  796120 /usr/local/zy-pkgs/ffproot/ffp/lib/plexmediaserver/libiconv.so.2.5.0
Plex    6642 plex  mem    REG    9,0   473817  796111 /usr/local/zy-pkgs/ffproot/ffp/lib/plexmediaserver/libdbus-1.so.3.5.5
Plex    6642 plex  mem    REG    9,0   968196  796139 /usr/local/zy-pkgs/ffproot/ffp/lib/plexmediaserver/libsqlite3.so.0.8.6
Plex    6642 plex  mem    REG    9,0   386179  796108 /usr/local/zy-pkgs/ffproot/ffp/lib/plexmediaserver/libcurl.so.4.2.0
Plex    6642 plex  mem    REG    9,0   368316  796133 /usr/local/zy-pkgs/ffproot/ffp/lib/plexmediaserver/libsoci_core-gcc-3_0-3.0.0.so
Plex    6642 plex  mem    REG    9,0   117238  796135 /usr/local/zy-pkgs/ffproot/ffp/lib/plexmediaserver/libsoci_sqlite3-gcc-3_0-3.0.0.so
Plex    6642 plex  mem    REG    9,0  4812154  796132 /usr/local/zy-pkgs/ffproot/ffp/lib/plexmediaserver/libpython2.7.so.1.0
Plex    6642 plex  mem    REG    9,0    98851  796075 /usr/local/zy-pkgs/ffproot/ffp/lib/plexmediaserver/libavahi-client.so.3.2.9
Plex    6642 plex  mem    REG    9,0   109974  796078 /usr/local/zy-pkgs/ffproot/ffp/lib/plexmediaserver/libavahi-common.so.3.5.3
Plex    6642 plex  mem    REG    9,0  5320983  796115 /usr/local/zy-pkgs/ffproot/ffp/lib/plexmediaserver/libfreeimage-3.15.3.so
Plex    6642 plex  mem    REG    0,1    50168     831 /lib/libgcc_s.so.1
Plex    6642 plex  mem    REG    0,1  1230312     836 /lib/libc.so.6
Plex    6642 plex  mem    REG    0,1   699012     830 /lib/libstdc++.so.6.0.10
Plex    6642 plex  mem    REG    0,1   670576     855 /lib/libm.so.6
Plex    6642 plex  mem    REG    7,0    94268   29149 /usr/lib/libpthread-2.8.so
Plex    6642 plex  mem    REG    0,1    10244     847 /lib/libdl-2.8.so
Plex    6642 plex  mem    REG    7,0    27992   14429 /usr/lib/librt-2.8.so
Plex    6642 plex  mem    REG    9,0   231626  796123 /usr/local/zy-pkgs/ffproot/ffp/lib/plexmediaserver/libidn.so.11.6.6
Plex    6642 plex  mem    REG    7,0    10116   14375 /usr/lib/libutil-2.8.so
Plex    6642 plex  DEL    REG   0,11            19203 /tmp/tmpfs/sem.1Gqi8X
Plex    6642 plex  mem    REG    0,1    39076     843 /lib/libnss_files-2.8.so
Plex    6642 plex  mem    REG    0,1    18208     842 /lib/libnss_dns-2.8.so
Plex    6642 plex  mem    REG    7,0    64088   14387 /usr/lib/libresolv-2.8.so
Plex    6642 plex    0r   CHR    1,3      0t0     526 /dev/null
<snip>
But of course there are dependencies and dependencies. The blogger is talking about dependencies to install before you can compile Plex. But libc and friends doesn't need to be installed, it's a part of the build tree. Yet the have to be available on the target system.
librt.so.1 => not found
Plex 6642 plex mem REG 7,0 27992 14429 /usr/lib/librt-2.8.so
/usr/lib had also to be added for ldd.

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

Re: Plex via FFP , managed to get running - Question for Mij

Post by barmalej2 » Fri Feb 01, 2013 9:32 am

Thanks for clarifying things. Last dumb question. Plex searches for needed libraries in /ffp/lib/plexmediaserver/*, when we specify export LD_LIBRARY_PATH=/ffp/lib/plexmediaserver. Do the searching for libs in firmware dirs /lib/* and /usr/lib/* is default behaviour of others FFP programs too?

Mijzelf
Posts: 6207
Joined: Mon Jun 16, 2008 10:45 am

Re: Plex via FFP , managed to get running - Question for Mij

Post by Mijzelf » Fri Feb 01, 2013 10:14 am

No, fortunately not. A binary linked with the FFP linker will search in /ffp/lib/, making the binary independent from the firmware.
others FFP programs
Plex is not an FFP program. The only reason for installing it in FFP is because it gives us a platform to launch it.

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

Re: Plex via FFP , managed to get running - Question for Mij

Post by barmalej2 » Fri Feb 01, 2013 3:53 pm

After running:

Code: Select all

export LD_LIBRARY_PATH=/ffp/lib/plexmediaserver:/lib:/usr/lib
ldd /ffp/lib/plexmediaserver/Plex\ Media\ Server | grep not
ldd /ffp/lib/plexmediaserver/Plex\ DLNA\ Server | grep not
ldd /ffp/lib/plexmediaserver/Plex\ Media\ Scanner | grep not
I can confirm, that plex has all libraries for running on NSA 310. At least I can be calm about that. :D
Thx, >M
Peace to the World :lol:

tentakel
Posts: 3
Joined: Thu Jan 31, 2013 3:16 pm

Re: Plex via FFP , managed to get running - Question for Mij

Post by tentakel » Fri Feb 01, 2013 8:29 pm

Mijzelf wrote:Uninstall the current package:
Quick question: will these delete my library too? I am afraid of that :? ;)

EDIT: Ok... I now I know better. Fortunately I made a backup.

EDIT2: I accidently had to reinstall the whole ffp-package and now discovery plex and browsing the contents is MUCH faster on my TV... I guess something was interferring. Hopefully this solves my connection problems as well :)

Mijzelf
Posts: 6207
Joined: Mon Jun 16, 2008 10:45 am

Re: Plex via FFP , managed to get running - Question for Mij

Post by Mijzelf » Sat Feb 02, 2013 11:48 am

Are you sure it's due to a fresh FFP install, and not due to the ReadyNAS package? On my NAS the ReadyNAS package webinterface feels faster, but I have no way to test it's actual performance.
And, despite of the way of installing, PMS is not really an FFP package. FFP is used as launch platform, but doesn't participate in the actual running. As far as I can see the only way FFP could slowdown PMS is by using too much resources (cpu cycles, memory, disk access) itself. (Well, itself... Some FFP daemon)

tentakel
Posts: 3
Joined: Thu Jan 31, 2013 3:16 pm

Re: Plex via FFP , managed to get running - Question for Mij

Post by tentakel » Sat Feb 02, 2013 6:37 pm

on ffp I was permanently running nzbget, although idle most of the time.
However I had a chrooted debian running, too. But as far as I understood only a ssh daemon was started on boot-up. So I thought it won't eat much performance.

On the other hand I did some heavy testing when I was new to ffp / Linux on that install, I guess there could have been some leftovers of that.

Mijzelf wrote:ReadyNAS package webinterface feels faster
Actually I am still on synology-package. Is there a way to change the programm files without touching /mnt/HD_a2/plextmpdir ?


By the way: I was wondering, if there is any difference between those to packages at all. Of course the package handlers differ, but the core files seems to be the same, isn't it?

Mijzelf
Posts: 6207
Joined: Mon Jun 16, 2008 10:45 am

Re: Plex via FFP , managed to get running - Question for Mij

Post by Mijzelf » Sun Feb 03, 2013 12:16 pm

tentakel wrote:Is there a way to change the programm files without touching /mnt/HD_a2/plextmpdir ?
Don't know. The actual executables are in /ffp/lib/plexmediaserver. You can easily delete these, and reinstall.
But the daemon has 2 different 'data directories': /mnt/HD_as/plextmpdir/lib and /mnt/HD_as/plextmpdir/. While they share the same root, (as configured in the startscript), they actually have a different function. The /mnt/HD_as/plextmpdir/lib contains also executables, so I don't know if those shouldn't be deleted either. On the other hand, the Plex webinterface offers an option to update the package, so I suppose a newer version can cope with an older/not compatible /mnt/HD_as/plextmpdir/lib/*.
By the way: I was wondering, if there is any difference between those to packages at all. Of course the package handlers differ, but the core files seems to be the same, isn't it?
I certainly think they are built from the same source. But the executable is dependent on some libs in /lib and /usr/lib, which are firmware files. So I think the packages are built using the SDK provided by Synology and ReadNAS, providing different headers and objects, and so are not binary equal.
The reason both run on the ZyXEL is because the libc folks try to keep the different versions of libc and friends binary compatible. Yet there can be obscure differences, making one package more compatible than the other.

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

Re: Plex via FFP , managed to get running - Question for Mij

Post by barmalej2 » Mon Feb 04, 2013 5:14 pm

Mijzelf wrote:I've uploaded a new version plexmediaserver-0.9.7-arm-3.txz. Changes:
  • Applied barmalej2's suggestions
  • Script removes stale pid file & error msg from cat suppressed
  • Added support for ReadNAS package
My observations and suggestions after using last plex package:
1. TMPDIR is owned by root instead of plex and PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR is inside it. I think, it would be better to do vice versa (I mean dirs hierarchy) or better of all to make some generic-general directory in the root of HDD, where all big programs can reside, which uses a large databases and lot of space. For example:

Code: Select all

# Homedir of plex settings and data. About 60MB of data will be placed here after first install and will grow,    # depending on your media library size
PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/mnt/HD_a2/programs/plex

Code: Select all

# Temporary directory for audio? transcoding
TMPDIR=/mnt/HD_a2/programs/plex/transcodejobs

Code: Select all

chown -R ${PMS_RUN_USER} ${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}

Code: Select all

# Set directory for PMS transcoding
export TMPDIR
It seems, that PLEX doesn't handles PLEX_MEDIA_SERVER_TMPDIR variable. We must use TMPDIR instead. Sources:
http://forums.plexapp.com/index.php/top ... sd-drives/
http://forums.plexapp.com/index.php/top ... y-problem/

BTW. I do not like programs scattered all over my hard drive, so I am planning Serviio DLNA package to be installed to /mnt/HD_a2/programs/serviio also.

Please add and correct some comments:

Code: Select all

sed 's|REQUIRE:|REQUIRE: login, internet conection, time and patience plus Avahi package, which is required to provide Bonjour-based discovery|g' plexmediaserver.sh

Code: Select all

sed 's|#Provides:Plex Media Server start|# Set the directory, where the plex package will be installed|g' plexmediaserver.sh
P.S. create_user_and_homedir is executed twice in script-at install and at start of plex. Do it really needs to be runned twice?

Post Reply