[HOWTO] Install Serviio in Freenas 8.0.x

Status
Not open for further replies.

midnight

Cadet
Joined
Jan 17, 2012
Messages
7
was anybody able to get the pre-installed freenas to work with serviio I tried and it doesnt still work the console keep saying that the server isnt run and i edit the console .bat file and I am still getting the same error
 

midnight

Cadet
Joined
Jan 17, 2012
Messages
7
hey protosd I know you dont use serviio but I have two question for because I looked at what you wrote on you forum and did everything you said to do but I am trying to see if I did anything wrong I wrote serviio for help but I havent herald anything from them and it seem like everybody is having the same problem when I down load the console and edit the serviio_console.bat with my IP address to my freenas it keep giving me that it cant connect to serviio it does seem to be running is there any way to see if the server is running or if I did something wrong
 

LAYGO

Explorer
Joined
Dec 21, 2011
Messages
85
Crap muffins. I'm getting this error:
forums.freenas.org/archive/index.php/t-2798.html

Then I got this after a reboot:
panic: initiate_write_inodeblock_ufs1: already started
Uptime: 1m45s

My OS thumb drive is hosed I believe. I was able to get a back up of the config thru the Settings tab as instructed in the link right before it took panic'd. I still will need to reinstall the Jail though. :(
 

sonisame72

Dabbler
Joined
Aug 14, 2011
Messages
25
All went well with the new upgrade, serviio, minidlna and transmission working. The only issue is that using windows 7, I cannot get the console to connect to serviio server on my freenas box, I tried setting the remote server option listed below
set JAVA_OPTS=-Dserviio.home="%SERVIIO_CONSOLE_HOME%" -Djava.net.preferIPv4Stack=true -Dserviio.remoteHost=192.168.***.***
but still no luck

Is there a easy way to configure video/audio/picture folders for serviio. I will be happy if someone can point to a easy way

Sonisame
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Hi Sonisame,

I'm not sure what's happening with the console, maybe someone else has an idea.

If you look back up this thread, someone posted how to "link" your different media folders into one common folder, but if you can get the console to work it lets you browse or type in the path to your different folders. You'll need to use the Unix path name when enter the path from the console, so it would be something like "/mnt/tank/movies" or "/mnt/tank/music".

If you take a look over in the Serviio forums, they have a FAQ and it has some things to check for the console not connecting.

Are you using the 8.03-p1 Multimedia build with Serviio I posted, or a Jail?
 

sonisame72

Dabbler
Joined
Aug 14, 2011
Messages
25
I am using the 8.03-p1 multimedia version you posted few posts ago. I can see it running on my android device using app serviiodroid, but without the folders, it is of no use.

I will look into serviio forum (I did see some threads where people were having issues with window 7 launching console) and also try linking all folders into one common folder as you suggested.
Thanks

Sonisame


Hi Sonisame,

I'm not sure what's happening with the console, maybe someone else has an idea.

If you look back up this thread, someone posted how to "link" your different media folders into one common folder, but if you can get the console to work it lets you browse or type in the path to your different folders. You'll need to use the Unix path name when enter the path from the console, so it would be something like "/mnt/tank/movies" or "/mnt/tank/music".

If you take a look over in the Serviio forums, they have a FAQ and it has some things to check for the console not connecting.

Are you using the 8.03-p1 Multimedia build with Serviio I posted, or a Jail?
 

sonisame72

Dabbler
Joined
Aug 14, 2011
Messages
25
serviiDroid solved all my issues with serviio access and config, I don't need windows for console
Long live Android!

Now I am going to test it on bunch of devices(xbmc-htpc, ps3, sharp smart tv, wdtv live and maybe android) to see if it all works. If it works and transcoding is good, I may put more hardware resources on my freenas box.

I am not sure about long term prospects of java/serviio and freenas 8, In one of the other minidlna setup thread, I read java may be completely removed in coming releases.


Sonisame
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Glad to hear you found a work around, thanks for the update.

Java is already not installed by default on FreeNAS 8. It's a pretty large package with a lot of dependencies. When plugins are ready for 8.2 there should be a Serviio plugin or I'll try to help make it available somehow, although I don't use it myself!
 

LAYGO

Explorer
Joined
Dec 21, 2011
Messages
85
Did I just fubar my prev install? I ran this command:

mount_nullfs -o rw /mnt/pool/media /mnt/pool/jails/Serviio_Jail/Serviio_root/usr/local/serviio-0.6.0.1

& forgot the trailing "/media". So, if I'm in serviio-0.6.0.1/ I'm seeing the folders of /mnt/pool/media, NOT /bin/.

Now, I'm not sure how to unmount it & hope the /bin files are there.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Nah, you should be fine, just do "umount /mnt/pool/media" and correct your mistake.
 

LAYGO

Explorer
Joined
Dec 21, 2011
Messages
85
Nah, you should be fine, just do "umount /mnt/pool/media" and correct your mistake.

Perfect, I wasn't sure how to run the unmount command. I google all the commands to hopefully understand it, but it was late & I was tired.

Thanks YET AGAIN Proto! ;)
 

LAYGO

Explorer
Joined
Dec 21, 2011
Messages
85
WOOHOO! I've also now figured out how to ssh into my box from work (proxy/cygwin configuration). Gonna mess with it to see if I can't get Serviio/Transmission working . . . from work!
 

sonisame72

Dabbler
Joined
Aug 14, 2011
Messages
25
I get /var/db full error (I guess SERVIIO filled it up), I can try mounting /var to a secondary location to avoid this issue.

I think it will be help common user if like minidlna there was a option for user defined location to store serviio/db.
 

LAYGO

Explorer
Joined
Dec 21, 2011
Messages
85
Bah, was all ready to get this working, but when I'm starting my jail, I get this error:
Code:
[root@freenas] ~# mount -t devfs devfs /mnt/pool/jails/Serviio_Jail/Serviio_root/dev
[root@freenas] ~# /etc/rc.d/jail start
Configuring jails:.
Starting jails:ifconfig: interface em0 does not exist
df: /mnt/tank/Serviio_Jail/Serviio_root/dev: No such file or directory
mount: /mnt/tank: No such file or directory
/etc/rc.d/jail: WARNING: devfs_domount(): Unable to mount devfs on /mnt/tank/Serviio_Jail/Serviio_root/dev
/etc/rc.d/jail: WARNING: devfs_mount_jail: devfs was not mounted on /mnt/tank/Serviio_Jail/Serviio_root/dev
cd: can't cd to /mnt/tank/Serviio_Jail/Serviio_root/dev
ifconfig: interface em0 does not exist
 cannot start jail "serviio":


I've gone thru my configs a couple of times & it all seems to check out. :(

NEVERMIND! I see its saying /mnt/tank, when my pool is call /mnt/pool/. I need to figure where that is & fix it! ;)

HMM! I thought I copied all the files over. I had a backup of my rc.conf that I *THOUGHT* I copied to /etc & /conf/base/etc, but turns out I didn't. DUH! Fixed & it's running again!

Code:
99 /usr/sbin/syslogd -s -C
99 /usr/local/bin/transmission-daemon -c /usr/local/transmission/watch -g /usr/local/transmission -w /usr/local/transmission/finished
99 /usr/sbin/sshd
99 /usr/sbin/cron -s
99 /usr/local/bin/bash /usr/local/serviio-0.6.0.1/bin/serviio.sh
99 [java]
 
Joined
Feb 8, 2012
Messages
5
I installed everything and used the modified serviio.sh file.

When I run ./servio.sh, it spits out the java man page as though it's been run without correct parameters.

I altered the script to echo out the command it is issuing and this is it. I've pulled it apart and don't see anything wrong. The paths are correct and everything else looks right. Anybody else know what's going on or how I can alter this to get serviio going?

java -Xmx384M -Djava.net.preferIPv4Stack=true -Dderby.system.home=/usr/serviio-0.6.2/library -Dserviio.home=/usr/serviio-0.6.2 -Dserviio.remoteHost=192.168.1.4 -classpath /usr/serviio-0.6.2/lib/serviio.jar:/usr/serviio-0.6.2/lib/derby.jar:/usr/serviio-0.6.2/lib/jcs.jar:/usr/serviio-0.6.2/lib/concurrent.jar:/usr/serviio-0.6.2/lib/freemarker.jar:/usr/serviio-0.6.2/lib/httpcore.jar:/usr/serviio-0.6.2/lib/jaudiotagger.jar:/usr/serviio-0.6.2/lib/jul-to-slf4j.jar:/usr/serviio-0.6.2/lib/jcl-over-slf4j.jar:/usr/serviio-0.6.2/lib/log4j.jar:/usr/serviio-0.6.2/lib/sanselan.jar:/usr/serviio-0.6.2/lib/slf4j-api.jar:/usr/serviio-0.6.2/lib/slf4j-log4j12.jar:/usr/serviio-0.6.2/lib/org.restlet.jar:/usr/serviio-0.6.2/lib/org.restlet.ext.xstream.jar:/usr/serviio-0.6.2/lib/xstream.jar:/usr/serviio-0.6.2/config
 

LAYGO

Explorer
Joined
Dec 21, 2011
Messages
85
MightySchwartz, I see yours is as big as mine.

As for the script, I used exactly what was in the tutorial, paying attention to the path to Java/Serviio Home!

Code:
SERVIIO_HOME="/usr/local/serviio-0.6.0.1"
export SERVIIO_HOME

JAVA="/usr/local/bin/java"


If you modified these paths at all, be sure to match it. The path is relative to the root of your jail, not your FN install. For example, my absolute path in FN vs jail root:
/mnt/pool/jails/Serviio_Jail/Serviio_Root/usr/local/bin/java
vs
/usr/local/bin/java
 
Joined
Feb 8, 2012
Messages
5
MightySchwartz, I see yours is as big as mine.

As for the script, I used exactly what was in the tutorial, paying attention to the path to Java/Serviio Home!

Code:
SERVIIO_HOME="/usr/local/serviio-0.6.0.1"
export SERVIIO_HOME

JAVA="/usr/local/bin/java"


If you modified these paths at all, be sure to match it. The path is relative to the root of your jail, not your FN install. For example, my absolute path in FN vs jail root:
/mnt/pool/jails/Serviio_Jail/Serviio_Root/usr/local/bin/java
vs
/usr/local/bin/java

I did not create a jail. serviio is located at /usr/serviio-0.6.2

The paths issued in the classpath are correct.

Java is located and the command succeeds, but for some reason the parameters generated by the script are wrong or incomplete.

Code:
[root@freenas] /usr/serviio-0.6.2/bin# ./serviio.sh
Usage: java [-options] class [args...]
           (to execute a class)
   or  java [-options] -jar jarfile [args...]
           (to execute a jar file)

where options include:
    -d32          use a 32-bit data model if available

    -d64          use a 64-bit data model if available
    -server       to select the "server" VM
                  The default VM is server.

    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
                  A : separated list of directories, JAR archives,
                  and ZIP archives to search for class files.
    -D<name>=<value>
                  set a system property
    -verbose[:class|gc|jni]
                  enable verbose output
    -version      print product version and exit
    -version:<value>
                  require the specified version to run
    -showversion  print product version and continue
    -jre-restrict-search | -jre-no-restrict-search
                  include/exclude user private JREs in the version search
    -? -help      print this help message
    -X            print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
                  enable assertions
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
                  disable assertions
    -esa | -enablesystemassertions
                  enable system assertions
    -dsa | -disablesystemassertions
                  disable system assertions
    -agentlib:<libname>[=<options>]
                  load native agent library <libname>, e.g. -agentlib:hprof
                    see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:<pathname>[=<options>]
                  load native agent library by full pathname
    -javaagent:<jarpath>[=<options>]
                  load Java programming language agent, see java.lang.instrument
    -splash:<imagepath>
                  show splash screen with specified image
org.serviio.MediaServer: not found
 

LAYGO

Explorer
Joined
Dec 21, 2011
Messages
85
I'm not sure. I'm guessing it's something to do with your Java path is the only thing I could think of.

I like the concept of the jail, it worked well for me. When it came down to it, I only had to reinstall rc.conf/sysctl.conf/fstab.serviio & the jail worked again. I had a backup of those in my pool, so it I had to get that up & running before I could get my jail running again.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Did you install JRE or JDK? I think the dependencies for Serviio are wrong and have been meaning to contact the port maintainter. You need to have Java JRE installed. I went thru the same problem when I integrated .0.6.1 into 8.0.3-p1, the port page says Serviio requires JDK, but it's wrong, it needs JRE. Double check that and see if it helps. I'll post another version of 8.0.4 when it's ready with 0.6.2 integrated.
 
Joined
Feb 8, 2012
Messages
5
Did you install JRE or JDK? I think the dependencies for Serviio are wrong and have been meaning to contact the port maintainter. You need to have Java JRE installed. I went thru the same problem when I integrated .0.6.1 into 8.0.3-p1, the port page says Serviio require JDK, but it's wrong, it need JRE. Double check that and see if it helps. I'll post another version of 8.0.4 when it's ready with 0.6.2 integrated.

I figured this out... copying/pasting messed up the .sh script...

I got it to "start" but it exceptions out.

Code:
[root@freenas] /usr/serviio-0.6.2/bin# Exception in thread "main" java.lang.NoClassDefFoundError: org/restlet/ext/gson/GsonRepresentation
        at org.serviio.ui.restlet.RestletServer.runServer(RestletServer.java:68)
        at org.serviio.MediaServer.main(MediaServer.java:100)
Caused by: java.lang.ClassNotFoundException: org.restlet.ext.gson.GsonRepresentation
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        ... 2 more


Will start poking here.

FIX: There are new JAR files in the newer version.

Change the classpath in serviio.sh to:

Code:
$SERVIIO_HOME/lib/serviio.jar:$SERVIIO_HOME/lib/derby.jar:$SERVIIO_HOME/lib/jcs.jar:$SERVIIO_HOME/lib/concurrent.jar:/usr/serviio-.6.2/lib/freemarker.jar:$SERVIIO_HOME/lib/httpcore.jar:$SERVIIO_HOME/lib/jaudiotagger.jar:$SERVIIO_HOME/lib/jul-to-slf4j.jar:$SERVIIO_HOME/lib/jcl-over-slf4j.jar:$SERVIIO_HOME/lib/log4j.jar:$SERVIIO_HOME/lib/sanselan.jar:$SERVIIO_HOME/lib/slf4j-api.jar:$SERVIIO_HOME/lib/slf4j-log4j12.jar:$SERVIIO_HOME/lib/org.restlet.jar:$SERVIIO_HOME/lib/org.restlet.ext.xstream.jar:$SERVIIO_HOME/lib/xstream.jar:$SERVIIO_HOME/lib/groovy-all.jar:$SERVIIO_HOME/lib/gson.jar:$SERVIIO_HOME/lib/org.restlet.ext.net.jar:$SERVIIO_HOME/lib/org.restlet.ext.gson.jar:$SERVIIO_HOME/lib/rome-modules.jar:$SERVIIO_HOME/lib/rome.jar$SERVIIO_HOME/lib/serviio-client.jar:$SERVIIO_HOME/lib/winp.jar:$SERVIIO_HOME/config


and it will work.

I got it to start, but shortly after it starts the ROME RSS thing seems to have a problem.

Code:
[root@freenas] /usr/serviio-0.6.2/bin# Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/syndication/io/FeedException
        at org.serviio.library.online.OnlineLibraryManager.<init>(OnlineLibraryManager.java:91)
        at org.serviio.library.online.OnlineLibraryManager.getInstance(OnlineLibraryManager.java:78)
        at org.serviio.MediaServer.main(MediaServer.java:108)
Caused by: java.lang.ClassNotFoundException: com.sun.syndication.io.FeedException
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        ... 3 more


I can't login to it via the console from Windows.

This is the console log:

Code:
2012-02-08 16:23:33,142 INFO  [ServiioConsole] Starting Serviio Console
2012-02-08 16:23:33,217 INFO  [ServiioConsole] Connecting to Serviio REST on 192.168.1.4:23423
 
Status
Not open for further replies.
Top