Page 3 of 3
Re: [HOWTO] Install serviio on NAS4Free
Posted: 28 Jun 2013 15:41
by DanAddz
Awesome! Could you please give me an example on how to change this I'm not the best at coding and don't want to stuff it up. Yes I am running the manual jail. I will have to look into thebring next time.
Thanks in advance.
Re: [HOWTO] Install serviio on NAS4Free
Posted: 28 Jun 2013 16:23
by raulfg3
open /jail/conf/fstab.proto using embeded file editor in N4F and edit file to change desired line
Re: [HOWTO] Install serviio on NAS4Free
Posted: 30 Jun 2013 14:21
by Zulman
Hi!
I installed serviio as described here, and for music files it works fine. But the server can't find my video files. /mnt/Video exists and works, but when I refresh the database, nothing changes.
Edit: Okay, it looks like the installation of ffmpeg1 fails... :/
Re: [HOWTO] Install serviio on NAS4Free
Posted: 10 Jul 2013 21:52
by squibler
Hello,
I can get all the way to
with the error:
Any help is appreciated.
As per the guide it is installed. I have had to restart though.
Whilst on restarts; the changes I make for "/usr/local/sbin/serviiod" and "/usr/local/etc/rc.d/serviio" are not persistent on reboot, does that change? For the last file, you do create the directory 'rc.d' right?
Thanks
Re: [HOWTO] Install serviio on NAS4Free
Posted: 10 Jul 2013 22:46
by raulfg3
How You create jails?
Do You use TheBrig?
Re: [HOWTO] Install serviio on NAS4Free
Posted: 11 Jul 2013 00:05
by squibler
I can create jails and have created both proto and serviio.
I didn't install TheBrig as I got jails working then tried TheBrig only to find it would error and stop any network going in or out of the Nas, it was uninstalled.
Re: [HOWTO] Install serviio on NAS4Free
Posted: 11 Jul 2013 07:54
by raulfg3
squibler wrote:the changes I make for "/usr/local/sbin/serviiod" and "/usr/local/etc/rc.d/serviio" are not persistent on reboot, does that change?
, changes can be done inside the jail, because jail reside on your data disk, changes can be persistent. perhaps do you make changes in the OS ( outside the jail) ???.
PD: Only a suggest, forget your actual jail install and do a new fresh install of "TheBring", is the default jail manager for N4F
Re: [HOWTO] Install serviio on NAS4Free
Posted: 11 Jul 2013 15:57
by squibler
Hmmm,
You may be right. So the changes I make should be:
Code: Select all
cd /jail/serviio/usr/local/sbin/
nano ./serviiod
cd /jail/serviio/usr/local/etc/rc.d/
nano ./serviio
I can see what I did there, DOH!
TheBrig. I may have to format and start again for that. I'll try the first option this evening and report back.
Thanks for your help.
Re: [HOWTO] Install serviio on NAS4Free
Posted: 12 Jul 2013 00:36
by squibler
Tried it my new error is:
Code: Select all
/jail/serviio/etc/rc.d/serviio: WARNING: run_rc_command: cannot run /usr/local/sbin/serviiod
But after I installed TheBrig all my exisiting jails were gone. So I've got TheBrig managed to get it working. I learned you have to apply a tarball/flavour.
I'll try installing Serviio and Java again tomorrow and post again.
Cheers
Re: [HOWTO] Install serviio on NAS4Free
Posted: 12 Jul 2013 03:58
by DanAddz
Hi Guys,
Can someone please write a how to on Updating Serviio 1.1 to 1.2.x for future reference?
I would like to upgrade my serviio from time to time to get the added features but don't want to stuff it up and have to re-install everything.
That would be really helpful,
Regards,
Re: [HOWTO] Install serviio on NAS4Free
Posted: 12 Jul 2013 09:51
by raulfg3
see this note in my first post:
EDIT 08-01-2013: If you have old serviio-1.0.1 and want to upgrade to serviio-1.1 read this: http://www.serviio.org/component/content/article/21#q8
basically say that you only need to download new version and replace old one, so no need to touch ffmpeg or java install.
something like this:
Code: Select all
cd /tmp
fetch http://download.serviio.org/releases/serviio-1.2-linux.tar.gz
tar xvf serviio-1.2-linux.tar.gz -C /usr/local/etc/serviio-1.1/
chown -R dlna:wheel /usr/local/etc/serviio-1.1
be sure to untar in the same serviio-1.1 directory that you previosly used, or do a previous work of rename /usr/local/etc/serviio-1.1/ as /usr/local/etc/serviio and test that old 1.1 version works prior to update, so folder can be used for new versions neverless the revison name it have.
Re: [HOWTO] Install serviio on NAS4Free
Posted: 12 Jul 2013 21:08
by squibler
Hey,
So I have managed to get all the way down to modifying your /etc/hosts file (I assume on your PC). Now I am stuck with the step of "Create a /usr/local/sbin/serviiod file, and fill it with:". I need an elaboration on what to type and how to create this file and possibly how to fill it with the required information.
Cheers
Edit:
Text editor: ee ?
Then paste the code, save and repeat for /usr/local/etc/rc.d/serviio file?
Edit:
Well I did all that, and:
- Modified the rc.conf file with serviio_enable=YES
- Entered "/usr/local/etc/rc.d/serviio start"
- tried url "
http://192.168.1.202:8123/serviio/console" and variations
- No luck

- Entered "/usr/local/etc/rc.d/serviio status" - Serviio is not running
I'm going to add the serviio.log to the config.
Edit:
Serviio_log:
Code: Select all
2013-07-12 20:21:06,097 ERROR [ApplicationInstanceManager] serviio.local: serviio.local
java.net.UnknownHostException: serviio.local: serviio.local
at java.net.InetAddress.getLocalHost(InetAddress.java:1454)
at org.serviio.restui.ApplicationInstanceManager.registerInstance(Unknown Source)
at org.serviio.restui.RestletProxy.checkForRunningInstances(Unknown Source)
at org.serviio.restui.RestletProxy.main(Unknown Source)
at org.serviio.restui.ServiioWrapper.main(Unknown Source)
2013-07-12 20:21:06,101 INFO [RestletProxy] Starting WebUI
2013-07-12 20:21:06,104 INFO [RestletProxy] Starting Serviio WebUI on port 8123
2013-07-12 20:21:06,406 ERROR [ApplicationInstanceManager] serviio.local: serviio.local
java.net.UnknownHostException: serviio.local: serviio.local
at java.net.InetAddress.getLocalHost(InetAddress.java:1454)
at org.serviio.ApplicationInstanceManager.registerInstance(ApplicationInstanceManager.java:68)
at org.serviio.MediaServer.checkForRunningInstances(MediaServer.java:273)
at org.serviio.MediaServer.main(MediaServer.java:100)
at org.serviio.restui.ServiioWrapper.main(Unknown Source)
2013-07-12 20:21:06,407 INFO [MediaServer] ------------------------------------------------------------------------
2013-07-12 20:21:06,407 INFO [MediaServer] Serviio DLNA media streaming server v 1.1 (rev. 6ba0dd933a8e+)
2013-07-12 20:21:06,407 INFO [MediaServer] Petr Nejedly 2009-2012
2013-07-12 20:21:06,407 INFO [MediaServer] http://www.serviio.org
2013-07-12 20:21:06,407 INFO [MediaServer]
2013-07-12 20:21:06,407 INFO [MediaServer] Java 1.6.0_32-Sun Microsystems Inc.
2013-07-12 20:21:06,408 INFO [MediaServer] OS FreeBSD amd64 9.1-RELEASE-p3
2013-07-12 20:21:06,408 INFO [MediaServer] File encoding: UTF-8
2013-07-12 20:21:06,408 INFO [MediaServer] Headless mode enabled: true
2013-07-12 20:21:06,408 INFO [MediaServer] User: dlna
2013-07-12 20:21:06,408 INFO [MediaServer] User home dir: /usr/local/etc/serviio-1.1/prefs/pw
2013-07-12 20:21:06,408 INFO [MediaServer] Temp dir: /tmp/
2013-07-12 20:21:06,408 INFO [MediaServer] ------------------------------------------------------------------------
2013-07-12 20:21:06,415 INFO [WebServer] Socket buffer set to 65535 bytes
2013-07-12 20:21:06,416 INFO [RestletServer] Starting Restlet server (/rest) exposed on port 23423
2013-07-12 20:21:06,442 INFO [RestletServer] Starting Restlet server (/cds) exposed on port 23424
2013-07-12 20:21:06,442 INFO [RestletServer] Starting Restlet server (/mediabrowser) exposed on port 23424
2013-07-12 20:21:06,456 INFO [DBSchemaUpdateExecutor] Checking if DB schema needs to be updated
2013-07-12 20:21:08,450 INFO [DBSchemaUpdateExecutor] Updating DB schema
2013-07-12 20:21:13,304 INFO [DBSchemaUpdateExecutor] Cleaning persistent cache
2013-07-12 20:21:13,539 INFO [Device] Created UPnP Device with UUID: 63b971d2-bbfd-3eb2-b239-8675f67750aa, bound address: 192.168.1.201
2013-07-12 20:21:13,552 WARN [IndexedDiskCache] Region [online_technical_metadata] Reseting cache
2013-07-12 20:21:13,658 INFO [prefs] Created user preferences directory.
2013-07-12 20:21:13,711 INFO [MediaServer] ------------------------------------------------------------------------
2013-07-12 20:21:13,711 INFO [MediaServer] License: PRO (EVALUATION, id: 11111111-1111-1111-1111-111111111113)
2013-07-12 20:21:13,711 INFO [MediaServer] ------------------------------------------------------------------------
2013-07-12 20:21:13,789 WARN [ProfilesDefinitionParser] Cannot get name of the local computer: serviio.local: serviio.local
2013-07-12 20:21:14,372 INFO [ProfilesDefinitionParser] Parsing Profiles definition
2013-07-12 20:21:14,968 ERROR [MediaServer] An unexpected error occured. Ending the application. Message: replacement
java.lang.NullPointerException: replacement
at java.util.regex.Matcher.replaceFirst(Matcher.java:867)
at java.lang.String.replaceFirst(String.java:2158)
at org.serviio.profile.ProfilesDefinitionParser.getDeviceDescription(ProfilesDefinitionParser.java:356)
at org.serviio.profile.ProfilesDefinitionParser.processProfileNode(ProfilesDefinitionParser.java:212)
at org.serviio.profile.ProfilesDefinitionParser.parseDefinition(ProfilesDefinitionParser.java:153)
at org.serviio.profile.ProfileManager.parseProfilesFromFile(ProfileManager.java:181)
at org.serviio.profile.ProfileManager.loadProfiles(ProfileManager.java:156)
at org.serviio.MediaServer.main(MediaServer.java:114)
at org.serviio.restui.ServiioWrapper.main(Unknown Source)
2013-07-12 20:21:14,988 WARN [IndexedDiskCache] Region [online_technical_metadata] Disk cache not shutdown properly, shutting down now.
2013-07-12 20:21:14,989 WARN [IndexedDiskCache] Region [thumbnails] Disk cache not shutdown properly, shutting down now.
2013-07-12 20:22:37,533 ERROR [ApplicationInstanceManager] serviio.local: serviio.local
java.net.UnknownHostException: serviio.local: serviio.local
at java.net.InetAddress.getLocalHost(InetAddress.java:1454)
at org.serviio.restui.ApplicationInstanceManager.registerInstance(Unknown Source)
at org.serviio.restui.RestletProxy.checkForRunningInstances(Unknown Source)
at org.serviio.restui.RestletProxy.main(Unknown Source)
at org.serviio.restui.ServiioWrapper.main(Unknown Source)
2013-07-12 20:22:37,538 INFO [RestletProxy] Starting WebUI
2013-07-12 20:22:37,541 INFO [RestletProxy] Starting Serviio WebUI on port 8123
2013-07-12 20:22:37,899 ERROR [ApplicationInstanceManager] serviio.local: serviio.local
java.net.UnknownHostException: serviio.local: serviio.local
at java.net.InetAddress.getLocalHost(InetAddress.java:1454)
at org.serviio.ApplicationInstanceManager.registerInstance(ApplicationInstanceManager.java:68)
at org.serviio.MediaServer.checkForRunningInstances(MediaServer.java:273)
at org.serviio.MediaServer.main(MediaServer.java:100)
at org.serviio.restui.ServiioWrapper.main(Unknown Source)
2013-07-12 20:22:37,901 INFO [MediaServer] ------------------------------------------------------------------------
2013-07-12 20:22:37,901 INFO [MediaServer] Serviio DLNA media streaming server v 1.1 (rev. 6ba0dd933a8e+)
2013-07-12 20:22:37,901 INFO [MediaServer] Petr Nejedly 2009-2012
2013-07-12 20:22:37,901 INFO [MediaServer] http://www.serviio.org
2013-07-12 20:22:37,901 INFO [MediaServer]
2013-07-12 20:22:37,902 INFO [MediaServer] Java 1.6.0_32-Sun Microsystems Inc.
2013-07-12 20:22:37,902 INFO [MediaServer] OS FreeBSD amd64 9.1-RELEASE-p3
2013-07-12 20:22:37,902 INFO [MediaServer] File encoding: UTF-8
2013-07-12 20:22:37,902 INFO [MediaServer] Headless mode enabled: true
2013-07-12 20:22:37,902 INFO [MediaServer] User: dlna
2013-07-12 20:22:37,903 INFO [MediaServer] User home dir: /usr/local/etc/serviio-1.1/prefs/pw
2013-07-12 20:22:37,903 INFO [MediaServer] Temp dir: /tmp/
2013-07-12 20:22:37,903 INFO [MediaServer] ------------------------------------------------------------------------
2013-07-12 20:22:37,911 INFO [WebServer] Socket buffer set to 65535 bytes
2013-07-12 20:22:37,912 INFO [RestletServer] Starting Restlet server (/rest) exposed on port 23423
2013-07-12 20:22:37,944 INFO [RestletServer] Starting Restlet server (/cds) exposed on port 23424
2013-07-12 20:22:37,944 INFO [RestletServer] Starting Restlet server (/mediabrowser) exposed on port 23424
2013-07-12 20:22:37,960 INFO [DBSchemaUpdateExecutor] Checking if DB schema needs to be updated
2013-07-12 20:22:40,453 INFO [MediaServer] ------------------------------------------------------------------------
2013-07-12 20:22:40,453 INFO [MediaServer] License: PRO (EVALUATION, id: 11111111-1111-1111-1111-111111111113)
2013-07-12 20:22:40,453 INFO [MediaServer] ------------------------------------------------------------------------
2013-07-12 20:22:40,511 WARN [ProfilesDefinitionParser] Cannot get name of the local computer: serviio.local: serviio.local
2013-07-12 20:22:40,992 INFO [ProfilesDefinitionParser] Parsing Profiles definition
2013-07-12 20:22:41,578 ERROR [MediaServer] An unexpected error occured. Ending the application. Message: replacement
java.lang.NullPointerException: replacement
at java.util.regex.Matcher.replaceFirst(Matcher.java:867)
at java.lang.String.replaceFirst(String.java:2158)
at org.serviio.profile.ProfilesDefinitionParser.getDeviceDescription(ProfilesDefinitionParser.java:356)
at org.serviio.profile.ProfilesDefinitionParser.processProfileNode(ProfilesDefinitionParser.java:212)
at org.serviio.profile.ProfilesDefinitionParser.parseDefinition(ProfilesDefinitionParser.java:153)
at org.serviio.profile.ProfileManager.parseProfilesFromFile(ProfileManager.java:181)
at org.serviio.profile.ProfileManager.loadProfiles(ProfileManager.java:156)
at org.serviio.MediaServer.main(MediaServer.java:114)
at org.serviio.restui.ServiioWrapper.main(Unknown Source)
Re: [HOWTO] Install serviio on NAS4Free
Posted: 12 Jul 2013 21:36
by raulfg3
squibler wrote: Entered "/usr/local/etc/rc.d/serviio status" - Serviio is not running
perhaps is running, serviio is a java program so you can't see in this way, you can test ps ax and see if is started.
please post logs to see what fail.
squibler wrote:Hey,
So I have managed to get all the way down to modifying your /etc/hosts file (I assume on your PC).
bad asumption, you need to modify inside your jail, and name depends of you ( if you use "theBrig" to create jail is the host name that appears on webGUI if you create jails using wiki is the name you define when create jail
Re: [HOWTO] Install serviio on NAS4Free
Posted: 12 Jul 2013 21:43
by squibler
Log posted above.
Making poor judgment correction to hosts file.
Edit:
ITS ALIVE!!!!!!! [diabolical laughter]
I might be pre-empting this success but I'm going to do more tomorrow.
Thanks for your help raulfg3

You have made me a happy man!
Re: [HOWTO] Install serviio on NAS4Free
Posted: 13 Jul 2013 15:32
by squibler
Hey,
I upgraded to serviio 1.2.1 as directed above and now I get this error even after a restart.
Code: Select all
Exception in thread "main" java.lang.NoClassDefFoundError: org/serviio/restui/ServiioWrapper
Caused by: java.lang.ClassNotFoundException: org.serviio.restui.ServiioWrapper
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: org.serviio.restui.ServiioWrapper. Program will exit.
[Fatal Error] 31b3a542-5733-41e8-93da-54d6fefcb7ef:134:2: The markup in the document following the root element must be well-formed.
[Fatal Error] 076e0b95-f88a-4843-94d0-95a676a1147b:143:2: The markup in the document following the root element must be well-formed.
[Fatal Error] ee927ca9-90bf-4d1d-8e8e-a7a4e1384a62:107:2: The markup in the document following the root element must be well-formed.
[Fatal Error] c3aadda8-a6da-491f-aac8-90aa61496adc:118:2: The markup in the document following the root element must be well-formed.
[Fatal Error] dad07b13-0912-4892-bd6f-12b2408bc940:113:2: The markup in the document following the root element must be well-formed.
[Fatal Error] bd9bf479-19d5-4314-ae45-ca7cc55ac258:138:2: The markup in the document following the root element must be well-formed.
[Fatal Error] 1ed82e58-b103-4790-8950-db98b427757b:102:2: The markup in the document following the root element must be well-formed.
I did have profiles working prior to upgrading but that has stopped now as well!
I found I should probably modify the file /usr/local/sbin/serviiod due to the upgrade to 1.2.1:
Code: Select all
#!/bin/sh
### ====================================================================== ###
## ##
## Serviio start Script ##
## ##
### ====================================================================== ###
SERVIIO_HOME=/usr/local/etc/serviio-1.2.1
SERVIIO_CLASS_PATH="$SERVIIO_HOME/lib/*:$SERVIIO_HOME/plugins/*:$SERVIIO_HOME/config"
# Find the best max heap size for JAVA ( From kairoh's serviio-webui
# scripts - https://kairo.bitbucket.org/serviio-webui, who references
# Platter's (http://pcloadletter.co.uk/2012/01.15/serviio-syno-paackages
JAVA_MAX_HEAP=512M
RAM=$(dmesg | grep 'real memory'| uniq | awk '{print $4/1048576}')
if [ $RAM -le 128 ]; then
JAVA_MAX_HEAP=80M
elif [ $RAM -le 256 ]; then
JAVA_MAX_HEAP=192M
fi
# Setup Serviio specific properties - might not need to specify ffmpeg
JAVA_OPTS="-Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Dderby.system.home=$SERVIIO_HOME/library -Dserviio.home=$SERVIIO_HOME -Dffmpeg.location=/usr/local/bin/ffmpeg1"
JVM_OPTS="-Xmx${JAVA_MAX_HEAP} -Xms20M -XX:+UseParNewGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20"
# A kludge to get the -D... flags to Java, rather than to Serviio itself:
for o in "$@"
do
case $o in
-D*)
JAVA_OPTS="$JAVA_OPTS $o"
;;
esac
done
# Execute the JVM in the foreground
exec java $JVM_OPTS $JAVA_OPTS -classpath "$SERVIIO_CLASS_PATH" org.serviio.restui.ServiioWrapper "$@"
Error above still occurs.
Re: [HOWTO] Install serviio on NAS4Free
Posted: 13 Jul 2013 17:37
by squibler
Another problem I'm finding is that the broadcast version of serviio is 1.1 attached.
This means ServiiGO won't stream from it. Not the end of the world but why do this?
Re: [HOWTO] Install serviio on NAS4Free
Posted: 13 Jul 2013 18:07
by raulfg3
not sure, I'm in the process of install a new fresh 1.2.1 serviio on my NAS in this post,
viewtopic.php?f=79&t=4502&p=23617#p23617
But actually I do not finish, my plan is to have it working tomorrow.
Please if work version 1.1 do not upgrade, or do a new fresh install of ver 1.2.1.
in all cases use Extensions|TheBrig|Tools Backup/Restore and select in Jail Archiver your serviio jail path to make a tarball:
so if your upgrade fail, you only need to delete failling serviio jail, and create a new one in TheBrig, but this time use as template your old / saved working jail, so you can revert to a working jail in a few clicks.