General NAS-Central Forums

Welcome to the NAS community
It is currently Wed May 24, 2017 5:57 am

All times are UTC




Post new topic Reply to topic  [ 75 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
PostPosted: Fri Jan 25, 2013 6:04 pm 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2230
Mijzelf wrote:
Yes, OK. I think I'll have time this weekend.

Awesome ;)

Regarding paths. In ubuntu official PMS package the folowing paths used:

Install directory-PLEX_MEDIA_SERVER_HOME=/usr/lib/plexmediaserver

PMS_RUN_USER home directory - /var/lib/plexmediaserver
Code:
USER="plex"

    if ! getent passwd "$USER" >/dev/null; then
       adduser --quiet --system --shell /bin/bash --home /var/lib/plexmediaserver --group "$USER"
    fi


PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="${HOME}/Library/Application\ Support"

The last two dirs Library/Application\ Support, I think is not neccesary and PMS_RUN_USER home dir can be the equal to PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR

PMS structure is now clear to me, but it is up to you to decide how it should be on FFP>Mijzelf.


Top
 Profile  
 
PostPosted: Fri Jan 25, 2013 9:07 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5994
Done.
http://downloads.zyxel.nas-central.org/ ... -arm-1.txz

It's basically 1 script, /ffp/start/plexmediaserver.sh

Before starting it, you need to run (as root)
Code:
/ffp/start/plexmediaserver.sh install
which will download and extract the Synology Arm plex package. Then you can start it
Code:
/ffp/start/plexmediaserver.sh start
First start takes several minutes on my '325.

It seems to work, webinterface, and lots of threads, but I don't have a plex client to test it. If you can test it, and it works, I'll add it to slacker.


Top
 Profile  
 
PostPosted: Sat Jan 26, 2013 12:07 pm 
Offline

Joined: Sat Sep 22, 2012 7:05 pm
Posts: 12
Fired up last night as per instructions, eventually came up so added libraries ok, Scanning seemed to take a long time so left running overnight.

Plex Client on samsung TV see's the server ok, and lists media ,but no metadata /covers etc whatsoever is displayed (same when look at media through browser on the management web address).

Unfortunately nothing plays either, select a video and just get a connection error message - Same if I try the DLNA server also presented.

Just firing off a deep scan to see if affects the metadata, will advise where get to.

cheers

Update...

Notice a lot of critical errors in the scanner agent logs :

com.plexapp.agents.imdb.log


2013-01-26 12:08:01,148 (458a8490) : CRITICAL (agentkit:973) - Exception in the update function of agent named 'Freebase', called with guid 'com.plexapp.agents.imdb://tt1018690?lang=en' (most recent call last):
File "/e-data/9ea33ac4-7701-4a15-aa36-7387b6bd3912/ffproot/ffp/var/lib/plex/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 971, in _update
agent.update(obj, media, lang)
File "/ffp/var/lib/plex/Plex Media Server/Plug-ins/IMDB.bundle/Contents/Code/__init__.py", line 519, in update
print "Error obtaining Plex movie data for", guid
File "/e-data/9ea33ac4-7701-4a15-aa36-7387b6bd3912/ffproot/ffp/var/lib/plex/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py", line 32, in write
sys.stdout.write(text)
IOError: [Errno 5] Input/output error

com.plexapp.agents.cine21.log

2013-01-26 12:06:45,077 (458a8490) : CRITICAL (agentkit:930) - Exception in the search function of agent named 'Cine21', called with keyword arguments {'openSubtitlesHash': '97d2467e627bddee', 'name': 'Batman the Dark Knight Returns', 'filename': '%2Fi-data%2Fe2587d67%2Fvideo%2FFilms%2FBatman-%20The%20Dark%20Knight%20Returns%2FBatman-%20The%20Dark%20Knight%20Returns,%20Part%201%2Eavi', 'plexHash': '0cd893580a30817311345ededef3f98e7adf0b9d', 'duration': '-1', 'id': '127'} (most recent call last):
File "/e-data/9ea33ac4-7701-4a15-aa36-7387b6bd3912/ffproot/ffp/var/lib/plex/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 923, in _search
agent.search(results, media, lang)
File "/ffp/var/lib/plex/Plex Media Server/Plug-ins/Cine21.bundle/Contents/Code/__init__.py", line 108, in search
Log('find eng!')
File "/ffp/var/lib/plex/Plex Media Server/Plug-ins/Cine21.bundle/Contents/Code/__init__.py", line 19, in GetFixedXML
return XML.ElementFromString(xml, isHtml)
File "/e-data/9ea33ac4-7701-4a15-aa36-7387b6bd3912/ffproot/ffp/var/lib/plex/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/parsekit.py", line 285, in ElementFromString
return self._core.data.xml.from_string(string, encoding = encoding)
File "/e-data/9ea33ac4-7701-4a15-aa36-7387b6bd3912/ffproot/ffp/var/lib/plex/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/data.py", line 150, in from_string
markup = str(string).encode(encoding)
TypeError: encode() argument 1 must be string, not bool


com.plexapp.system.log


2013-01-26 11:51:20,514 (498a8490) : CRITICAL (runtime:1055) - Exception in thread named 'refresh_servers' (most recent call last):
File "/e-data/9ea33ac4-7701-4a15-aa36-7387b6bd3912/ffproot/ffp/var/lib/plex/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/runtime.py", line 1053, in _start_thread
f(*args, **kwargs)
File "/ffp/var/lib/plex/Plex Media Server/Plug-ins/System.bundle/Contents/Code/peerservice.py", line 156, in refresh_servers
servers_el = self.get_servers_el()
File "/ffp/var/lib/plex/Plex Media Server/Plug-ins/System.bundle/Contents/Code/peerservice.py", line 152, in get_servers_el
return XML.ElementFromURL('http://127.0.0.1:32400/servers', cacheTime = 0)
File "/e-data/9ea33ac4-7701-4a15-aa36-7387b6bd3912/ffproot/ffp/var/lib/plex/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/parsekit.py", line 328, in ElementFromURL
method=method,
File "/e-data/9ea33ac4-7701-4a15-aa36-7387b6bd3912/ffproot/ffp/var/lib/plex/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/networkkit.py", line 67, in _http_request
req = self._core.networking.http_request(url, *args, **kwargs)
File "/e-data/9ea33ac4-7701-4a15-aa36-7387b6bd3912/ffproot/ffp/var/lib/plex/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/networking.py", line 416, in http_request
return HTTPRequest(self._core, url, data, h, url_cache, encoding, errors, timeout, immediate, sleep, opener, follow_redirects, method)
File "/e-data/9ea33ac4-7701-4a15-aa36-7387b6bd3912/ffproot/ffp/var/lib/plex/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/networking.py", line 141, in __init__
self.load()
File "/e-data/9ea33ac4-7701-4a15-aa36-7387b6bd3912/ffproot/ffp/var/lib/plex/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/networking.py", line 177, in load
f = self._opener.open(req, timeout=self._timeout)
File "/ffp/var/lib/plex/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Platforms/Shared/Libraries/urllib2_new.py", line 438, in open
response = self._open(req, data)
File "/ffp/var/lib/plex/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Platforms/Shared/Libraries/urllib2_new.py", line 456, in _open
'_open', req)
File "/ffp/var/lib/plex/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Platforms/Shared/Libraries/urllib2_new.py", line 416, in _call_chain
result = func(*args)
File "/ffp/var/lib/plex/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Platforms/Shared/Libraries/urllib2_new.py", line 1217, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/ffp/var/lib/plex/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Platforms/Shared/Libraries/urllib2_new.py", line 1192, in do_open
raise URLError(err)
URLError: <urlopen error timed out>


thanks


Top
 Profile  
 
PostPosted: Sat Jan 26, 2013 12:22 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5994
Too bad.

In barmalej2 last post I see that the Debian(?) package assigns a real shell to plex:
Code:
   adduser --quiet --system --shell /bin/bash --home /var/lib/plexmediaserver --group "$USER"
My script doesn't give it a shell, but /ffp/bin/false. I don't think this matters, but it's worth trying.

Edit /etc/passwd and change the shell of plex from /ffp/bin/false to /ffp/bin/sh, and restart plex, or edit the startscript, in function add_user_and_homedir(), and reboot.


Top
 Profile  
 
PostPosted: Sat Jan 26, 2013 5:18 pm 
Offline

Joined: Sat Sep 22, 2012 7:05 pm
Posts: 12
I may have been incorrect on the previous post, it did have metadata against some items so it may just be a speed issue.

Regarding actually playing some content, it does now "sort of" work if can get to an item, but is so incredibly slow (can not even step through list of films) i think the clients just timeout when talking to the nsa221 device. I try and just step through a list (and takes about a min to move from one icon of a video to the next) and it seems to lose connection to the box whenever its trying to display a large list of video's etc.

I modified the passwd file as per your post, and initially i though actually seemed a bit more responsive on menu's, but as soon as it tried to display a list of titles (ie, talk to the server) it ground to a halt.

May just be a bridge too far for the poor old 221 to handle.

cheers.


Top
 Profile  
 
PostPosted: Sat Jan 26, 2013 5:47 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5994
netprw wrote:
May just be a bridge too far for the poor old 221 to handle.
Could be. The 300 series, and also the Synology for which this software was meant, are Kirkwood based, and are significantly faster than the Ox810 based 221.
When the NAS itself is the limitation, I'd expect the CPU being 100% loaded, or constantly swapping. Maybe you can disable as much options as possible to get a working solution.


Top
 Profile  
 
PostPosted: Sat Jan 26, 2013 6:42 pm 
Offline

Joined: Sat Sep 22, 2012 7:05 pm
Posts: 12
Strangely CPU doesn't actually look to be getting thrashed on the box, The Plex processes are not actually using much resource.

Ill keep playing.

--- update

The Plex Media server is actually now running better after a re start, but for some reason it frequently dies, leaving the framework bundle and dlna server up, but not the PMS itself.


root@nas:~# ps aux | grep plex
plex 24124 26.2 11.2 186028 28880 ? SNl 19:38 4:25 Plex Plug-in [com.plexapp.system] /ffp/var/lib/plex/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 0.9.7.11.386-d353989 /ffp/var/lib/plex/Plex Media Server/Plug-ins/System.bundle
plex 24375 0.7 7.5 180908 19412 ? Sl 19:40 0:06 /e-data/9ea33ac4-7701-4a15-aa36-7387b6bd3912/ffproot/ffp/lib/plexmediaserver/Plex DLNA Server
root 26063 0.0 0.1 1756 368 pts/0 S+ 19:54 0:00 grep plex
root@nas:~#

Also, trying to disable he DLNA server doesn't seem to have any effect.


Top
 Profile  
 
PostPosted: Sat Jan 26, 2013 8:06 pm 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2230
I suggesting to make a test of PMS with comps media player-like VLC player for example. Will do tests later. I accidently scratched one of my eyes, so i can't do that today, even I want it.


Top
 Profile  
 
PostPosted: Sun Jan 27, 2013 10:45 am 
Offline

Joined: Mon Jan 21, 2013 1:45 pm
Posts: 4
Great job!

I have tested it on NSA310 + plex client on LG TV/laptop and it works great :)
The server downloads and displays metadata for films and even subtitles. DLNA works too.
Yes, it takes time for the plex server to collect all the meta-data just after adding some new films to library, but when the scanning is over it works good.

Thanks again!


Last edited by zBig on Mon Jan 28, 2013 9:54 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sun Jan 27, 2013 1:12 pm 
Offline

Joined: Sat Sep 22, 2012 7:05 pm
Posts: 12
Just out of interest is your plex install located on your hard disk or running from a ffp on usb stick?

Im wondering if moving the app/db to the HD would make any difference to performance on my nas.

thanks


Top
 Profile  
 
PostPosted: Mon Jan 28, 2013 8:43 am 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2230
netprw wrote:
Just out of interest is your plex install located on your hard disk or running from a ffp on usb stick?

Im wondering if moving the app/db to the HD would make any difference to performance on my nas.

thanks
I think it's a good idea and worth a try. PMS is not lightweight application and our NASes are not racing machines. PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR is located on harddisk in Synology package also.
My eye is getting better and I am planning to test new Mijzelf PLEX package at this evening.


Top
 Profile  
 
PostPosted: Mon Jan 28, 2013 9:52 am 
Offline

Joined: Mon Jan 21, 2013 1:45 pm
Posts: 4
I think, CPU is the bottleneck here not the storage system.
When the Plex is scanning movies folders the CPU is utilized almost in 100%.


Top
 Profile  
 
PostPosted: Mon Jan 28, 2013 1:00 pm 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2230
zBig wrote:
I think, CPU is the bottleneck here not the storage system.
When the Plex is scanning movies folders the CPU is utilized almost in 100%.

Scaning is always CPU intensive job. Reading and writing data to hdd is much more faster than usb stick. As much as your database grow, it will more depend on read and write speed. Speed is limited by network and networking protocols of course, but it should be faster anyway, I think.


Last edited by barmalej2 on Tue Jan 29, 2013 6:16 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Tue Jan 29, 2013 6:08 am 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2230
Great job Mijzelf !!!
Script still needs some corrections, but mostly it is working and PMS is starting. :D
I was getting some errors, regarding sqlite3, but after upgraded it to the newer version from uli: repo, I get rid of them (Correction-barmalej2. Blue text proposition is wrong. There is no relation with sqlite upgrade, because PLEX is using its own libraries). With database directory located on NAS HDD (PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR), web configuration page is acting faster, DLNA client-TV is also browsing quicker.
About PMS itself. Without video transcoding, it is worst DLNA server, I have ever seen :cry: :cry: Added 4 files to movies section and only one of them is playing with internal PMS media player :?: The same story with DLNA client-Samsung TV 2009. VLC player recognises plex server, but can't even browse it. I am very disappointed with that. :evil: Maybe PMS better supports newer TV's, but the fact that it's internal player can't play most of video files remains :o


Last edited by barmalej2 on Wed Jan 30, 2013 6:23 pm, edited 3 times in total.

Top
 Profile  
 
PostPosted: Wed Jan 30, 2013 11:56 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5994
barmalej2 wrote:
Great job Mijzelf !!!
Thanks. But a large part of the credits are for you.
Quote:
Script still needs some corrections
Do you have actual suggestions?
So far I have found that the 'status' function should delete the pid file, if it appears to be stale, and suppress some 'cat' output there.
According to your observations I should point PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR to /mnt/HD_a2/something, for the case that FFP is installed on stick.

But other problems are not script related, I suppose?

Quote:
I was getting some errors, regarding sqlite3, but after upgraded it to the newer version from uli: repo, I get rid of them.
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?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 75 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group