Installing PMS on NAS (Synology DS-207+)

For help and support with issues specific to Linux/Unix
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply.

Re: Installing PMS on NAS (Synology DS-207+)

Postby the_stalli0n » Mon Apr 13, 2009 7:24 pm

New version of GNU classpath is now available in my optware feed, so i updated it. Now, JamVM is working right, and PMS runs!

Here's the output:
Code: Select all
root@LINKSTATION:~/pms-linux-1.10.5# jamvm -jar pms.jar
GUI environment no available
Switching to console mode
[main] TRACE 17:47:48.277 Starting Java PS3 Media Server v1.10.5
[main] TRACE 17:47:48.314 by shagrath / 2008-2009
[main] TRACE 17:47:48.318 http://ps3mediaserver.blogspot.com
[main] TRACE 17:47:48.322 http://code.google.com/p/ps3mediaserver
[main] TRACE 17:47:48.326
[main] TRACE 17:47:48.330 Java 1.5.0-GNU Classpath
[main] TRACE 17:47:48.334 OS Linux arm 2.6.16.16-arm1
[main] TRACE 17:47:48.338 Encoding: 8859_1
[main] TRACE 17:47:48.355 Temp folder: /tmp/javaps3media
[main] TRACE 17:47:49.328 Registering transcoding engine FFmpeg Audio
[main] TRACE 17:47:49.351 Registering transcoding engine MEncoder
[main] TRACE 17:47:49.359 Registering transcoding engine MPlayer Audio
[main] TRACE 17:47:49.366 Registering transcoding engine MEncoder Web
[main] TRACE 17:47:49.375 Registering transcoding engine MPlayer Video Dump
[main] TRACE 17:47:49.384 Registering transcoding engine MPlayer Web
[main] TRACE 17:47:49.395 Registering transcoding engine TsMuxer
[main] TRACE 17:47:49.401 Registering transcoding engine Audio High Fidelity
[main] TRACE 17:47:49.411 Registering transcoding engine VideoLan Audio Streaming
[main] TRACE 17:47:49.417 Registering transcoding engine VideoLan Video Streaming
[main] TRACE 17:47:49.424 Registering transcoding engine Raws Thumbnailer
[main] TRACE 17:47:51.347 Scanning network interface eth0 / eth0
[main] TRACE 17:47:51.360 Using address /10.0.0.100 found on network interface: name: eth0 (eth0) addresses: /10.0.0.100;
[main] TRACE 17:47:51.367 Created socket: /10.0.0.100:5001
[Thread-1] TRACE 17:47:51.495 Starting DLNA Server on host 10.0.0.100 and port 5001...
[main] TRACE 17:47:55.387 Sending ALIVE...
[main] TRACE 17:47:55.423 Switching to random UUID cause there's an error in getting UUID from MAC address: getHardwareAddress
[main] TRACE 17:47:55.432 Using following UUID: 59e93485-cbbf-4a67-9aed-5b9e03f9b7f8
[Thread-1] TRACE 17:47:58.595 java.io.IOException: file descriptor already initialized
[Thread-1] TRACE 17:47:58.600    at gnu.java.net.VMPlainSocketImpl$State.setChannelFD(VMPlainSocketImpl.java:487)
[Thread-1] TRACE 17:47:58.604    at gnu.java.net.PlainSocketImpl.accept(PlainSocketImpl.java:342)
[Thread-1] TRACE 17:47:58.609    at java.net.ServerSocket.implAccept(ServerSocket.java:387)
[Thread-1] TRACE 17:47:58.613    at gnu.java.nio.NIOServerSocket.accept(NIOServerSocket.java:103)
[Thread-1] TRACE 17:47:58.617    at net.pms.network.HTTPServer.run(HTTPServer.java:169)
[Thread-1] TRACE 17:47:58.621    at java.lang.Thread.run(Thread.java:745)
[main] TRACE 17:48:00.794 It's ready! You should see the server appears on XMB


... I don't actually see the PMS server in the XMB, though... can anyone help with the error above?

Thanks!
the_stalli0n
 
Posts: 31
Joined: Thu Feb 05, 2009 8:35 am

Re: Installing PMS on NAS (Synology DS-207+)

Postby atrem » Mon Apr 13, 2009 11:33 pm

the_stalli0n wrote:... I don't actually see the PMS server in the XMB, though... can anyone help with the error above?

Hey stalli0n, saw the classpath update too ;)
I have PMS running on my Synology DS-207+ now too :), but I guess I have the same problem as you...
Code: Select all
GUI environment no available
Switching to console mode
[main] TRACE 00:16:12.781 Starting Java PS3 Media Server v1.10.5
[main] TRACE 00:16:12.794 by shagrath / 2008-2009
[main] TRACE 00:16:12.796 http://ps3mediaserver.blogspot.com
[main] TRACE 00:16:12.799 http://code.google.com/p/ps3mediaserver
[main] TRACE 00:16:12.802
[main] TRACE 00:16:12.804 Java 1.5.0-GNU Classpath
[main] TRACE 00:16:12.807 OS Linux arm 2.6.15
[main] TRACE 00:16:12.810 Encoding: 8859_1
[main] TRACE 00:16:12.823 Temp folder: /tmp/javaps3media
[main] TRACE 00:16:13.468 Registering transcoding engine FFmpeg Audio
[main] TRACE 00:16:13.485 Registering transcoding engine MEncoder
[main] TRACE 00:16:13.492 Registering transcoding engine MPlayer Audio
[main] TRACE 00:16:13.497 Registering transcoding engine MEncoder Web
[main] TRACE 00:16:13.502 Registering transcoding engine MPlayer Video Dump
[main] TRACE 00:16:13.507 Registering transcoding engine MPlayer Web
[main] TRACE 00:16:13.516 Registering transcoding engine TsMuxer
[main] TRACE 00:16:13.521 Registering transcoding engine Audio High Fidelity
[main] TRACE 00:16:13.528 Registering transcoding engine VideoLan Audio Streaming
[main] TRACE 00:16:13.531 Registering transcoding engine VideoLan Video Streaming
[main] TRACE 00:16:13.537 Registering transcoding engine Raws Thumbnailer
[main] TRACE 00:16:14.471 Scanning network interface eth0 / eth0
[main] TRACE 00:16:14.480 Using address /192.168.1.102 found on network interface: name: eth0 (eth0) addresses: /192.168.1.102;
[main] TRACE 00:16:14.484 Created socket: /192.168.1.102:5001
[Thread-1] TRACE 00:16:14.515 Starting DLNA Server on host 192.168.1.102 and port 5001...
[main] TRACE 00:16:17.217 Sending ALIVE...
[main] TRACE 00:16:17.241 Switching to random UUID cause there's an error in getting UUID from MAC address: getHardwareAddress
[main] TRACE 00:16:17.247 Using following UUID: 7a4323f4-6025-431f-bdf7-eae9f28d53a9
[Thread-1] TRACE 00:16:20.325 java.io.IOException: file descriptor already initialized
[Thread-1] TRACE 00:16:20.328    at gnu.java.net.VMPlainSocketImpl$State.setChannelFD(VMPlainSocketImpl.java:487)
[Thread-1] TRACE 00:16:20.331    at gnu.java.net.PlainSocketImpl.accept(PlainSocketImpl.java:342)
[Thread-1] TRACE 00:16:20.334    at java.net.ServerSocket.implAccept(ServerSocket.java:387)
[Thread-1] TRACE 00:16:20.336    at gnu.java.nio.NIOServerSocket.accept(NIOServerSocket.java:103)
[Thread-1] TRACE 00:16:20.340    at net.pms.network.HTTPServer.run(HTTPServer.java:169)
[Thread-1] TRACE 00:16:20.343    at java.lang.Thread.run(Thread.java:745)
[main] TRACE 00:16:21.978 It's ready! You should see the server appears on XMB
atrem
 
Posts: 11
Joined: Sat Feb 07, 2009 11:38 pm

Re: Installing PMS on NAS (Synology DS-207+)

Postby oadmutis » Wed Apr 22, 2009 11:13 pm

Hi atrem and the_stalli0n,
Have you guys had any luck with your setup on the DS-207+ or DS-209+?

Could you guys be so awesome and create a list with the steps you followed to set it up? Including the command lines you used to install all the packages needed? ;)

atrem did you start a topic about this in Synology's forum? any luck in there? I am guessing that with the final patch you guys got 'libgconfpeer.so' on the NAS, have you found out what else is broken?
If you provide some info i might be able to help in the research.

thanks,
oadmutis
 
Posts: 2
Joined: Wed Apr 22, 2009 11:04 pm

Re: Installing PMS on NAS (Synology DS-207+)

Postby Kaisser74 » Thu Apr 23, 2009 11:53 am

Hello everyone.

Somebody has installed into a W.D. MyBook White Light??

Thanks!
Kaisser74
 
Posts: 2
Joined: Thu Apr 23, 2009 11:46 am

Re: Installing PMS on NAS (Synology DS-207+)

Postby atrem » Sat Apr 25, 2009 10:06 pm

oadmutis wrote:Have you guys had any luck with your setup on the DS-207+ or DS-209+?

Hi oadmutis,
PMS is running on my Synology DS-207+, but I still have the 'file descriptor already initialized' problem and my PS3 doesn't see PMS.
oadmutis wrote:Could you guys be so awesome and create a list with the steps you followed to set it up? Including the command lines you used to install all the packages needed? ;)

OK here we go, I'll try to be as complete as I can remember ;)
Warning: Do this at your own risk, this is for the Synology DS-207+ with ARM processor only!

General.

01. Download and install 'Putty SSH' from http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe, or use telnet to communicate with the DS.
02. Enable SSH (or telnet) in the DS management window under Network Services > Terminal.
03. Login as root into the DS with Putty SSH's window (or telnet).
04. Download and install the 'ARM Marvell bootstrap' from http://www.maartendamen.com/node/6.
This enables you to install ipkg packages compiled for arm processors.
See a list of available packages here at http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/.

Download and install ipkg packages.

05. At the command line put: ipkg install jamvm.
06. At the command line put: ipkg install classpath.
07. At the command line put: ipkg install ffmpeg.

Download and install Mplayer/Mencoder
I'm not sure how I did this step, but I know I used subversion.

08. At the command line put: ipkg install svn.
09. 'cd' to a folder where you want to put the mplayer software (e.g. 'cd /volume1/tmp').
10. At the command line put: svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
11. Wait, wait, wait.....;)

Download and unpack PMS-linux (in this case the latest version 1.10.5).

12. 'cd' to a folder where you want to put the download (e.g. 'cd /volume1/tmp').
13. At the command line put: wget http://ps3mediaserver.googlecode.com/fi ... 1.10.5.tgz
14. At the command line put: tar -xvzf pms-linux-1.10.5.tgz
15. 'cd' to the folder where pms-linux was unpacked (in this case 'cd ./pms-linux-1.10.5')

Make the shell script executable.

16. At the command line put: chmod ug+x PMS.sh

Edit PMS.sh using the (built-in) vi editor or Midnight Commander (ipkg install mc). See the Synology wiki for help on using vi http://forum.synology.com/wiki/index.php/Linux_VI_Editor.

17. Change into the following code in PMS.sh:
Code: Select all
# Setup the JVM

if [ "x$JAVA" = "x" ]; then
            if [ "x$JAVA_HOME" != "x" ]; then
                        JAVA="$JAVA_HOME/bin/java"
            else
                        JAVA="jamvm"
            fi
fi


and also:

Code: Select all
# Execute the JVM

exec "$JAVA" $JAVA_OPTS -Xmx512M -Djava.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -jar "$PMS_JAR" "$@"


Start PS3Mediaserver

18. At the command line put: ./PMS.sh
Now you should see PMS starting up.
oadmutis wrote:atrem did you start a topic about this in Synology's forum? any luck in there?

Yes, here http://forum.synology.com/enu/viewtopic.php?f=37&t=13014. Not much activity tho.
oadmutis wrote:I am guessing that with the final patch you guys got 'libgconfpeer.so' on the NAS, have you found out what else is broken?

The 'libgconfpeer' problem disappeared with PMS version 1.10.1.
oadmutis wrote:If you provide some info i might be able to help in the research.

Thanks, that would be great :)
atrem
 
Posts: 11
Joined: Sat Feb 07, 2009 11:38 pm

Re: Installing PMS on NAS (Synology DS-207+)

Postby the_stalli0n » Thu Apr 30, 2009 3:05 am

Hey Atrem -- glad to see that you're still keeping an eye on things!! :)

That was very nice of you to post the instructions for everyone, too...

I kind of gave up after my last post... was kind of hoping that the the problem ('file descriptor') would resolve itself in a future (hopefully near-future) release of PMS; or that one of the Devs/Mods would have some advice for us (Topguy, Shagrath, any ideas?). I haven't tried to checkout the SVN code, though. Maybe a build of that would work...?
the_stalli0n
 
Posts: 31
Joined: Thu Feb 05, 2009 8:35 am

Re: Installing PMS on NAS (Synology DS-207+)

Postby oadmutis » Sun May 10, 2009 11:49 am

Hey Atrem, thank you so much for putting this installation guide together. DS-207/209 with PS3 combo is getting more and more popular, soo, eventually we will nail it down.
oadmutis
 
Posts: 2
Joined: Wed Apr 22, 2009 11:04 pm

Re: Installing PMS on NAS (Synology DS-207+)

Postby Omega » Wed Jul 01, 2009 3:32 pm

I managed to get PS3 Media Server (latest version checked-out from SVN) running on my DNS-323; the PS3 sees the NAS, and video streaming works :D (the DNS-323 is not powerful enough for transcoding however).

I too got the 'file descriptor already initialized' error; it was solved by removing all reference to the ServerSocketChannel class in HTTPServer.java, and simply creating a new socket using the Socket(port) constructor instead of using the "serverSocketChannel.socket()" function. (Note: I also added "http_engine_v2 = false" to the PMS.conf configuration file). Perhaps this would fix your problems with the Synology NAS as well?

I also had errors with the function "getifaddrs()" being not supported (perhaps because the DNS-323 is uclibc-based?); this was solved by removing all references to the NetworkInterface class throughout the entire project, and simply using InetAddress instead.

Thanks to shagrath for writing such a well-implemented piece of software :)
Omega
 
Posts: 2
Joined: Wed Jul 01, 2009 3:13 pm

Re: Installing PMS on NAS (Synology DS-207+)

Postby japanfred » Thu Jul 02, 2009 12:03 pm

Omega,

Good work. I have made the first change you mentioned, however i am not a Java Developer, so don't want to screw around with the sources so much for the second change.

Could you please provide a patch?

Cheers,
D
japanfred
 
Posts: 4
Joined: Mon Apr 20, 2009 4:20 pm

Re: Installing PMS on NAS (Synology DS-207+)

Postby Omega » Fri Jul 03, 2009 7:07 am

Sure. I've attached a zip file containing only the changes I made to support the DNS-323 (using SVN revision 347 as the base). Hope this helps. Note that I also disabled the debug.log in PMS.java, so that the DNS-323 hard disk can power down when unused.
Attachments
dns-323-changes.zip
Changes to support the DNS-323
(21.27 KiB) Downloaded 988 times
Omega
 
Posts: 2
Joined: Wed Jul 01, 2009 3:13 pm

PreviousNext

Return to Linux/Unix Support

Who is online

Users browsing this forum: No registered users and 2 guests