[HOWTO] Install Serviio in Freenas 8.0.x

Status
Not open for further replies.

supremicus

Dabbler
Joined
Dec 27, 2011
Messages
18
turns out it actually was a problem in /etc/hosts, everything finally appears to be running. just need to test transcoding and i should be pretty much set.
 

LAYGO

Explorer
Joined
Dec 21, 2011
Messages
85
LAYGO,

Sorry I don't have time to go into the details, and I don't want to take this thread off the topic of Serviio, but you should be able to run Transmission in the same Jail as Serviio.

You'd need to add another entry in the fstab.serviio file outside the jail, create the folders inside and outside the jail to match the entry you just added to the fstab.serviio, and then pop into the jail and install Transmission. There might be a few other steps, but it shouldn't be all that difficult and it would save you from going thru the whole process again.

I will look at those files & see if I can make heads/tails of them to see if it's something I could figure out. Reminder, this is my FIRST ever *NIX box I've ever owned. I've had access to some before, but all the installation was already done.

Thanks again, I'll try later . . .
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Reminder, this is my FIRST ever *NIX box I've ever owned. I've had access to some before, but all the installation was already done.

Thanks again, I'll try later . . .

Considering that, you've done a heck of a lot better that some others with more experience. Someone that shows initiative and demonstrates you can figure stuff out without being spoon fed the link to every detail is really appreciated here!

If I had more time right now, I'd offer to help you more or do remote session.
 

Fig1047

Dabbler
Joined
Dec 29, 2011
Messages
17
protosd:
I have been following this thread and the related How-to for a while now, and decided to try this for myself. As a relative n00b, I think I'm getting tripped up on something simple. As part of the How-to, the following command is giving me an error:

echo libz.so.4 libz.so.5 &> /mnt/tank/Serviio_Jail/Serviio_root/etc/libmap.conf

I've replaced "tank" with my share name, But I get "Invalid null command". Is something wrong with the syntax?
 

supremicus

Dabbler
Joined
Dec 27, 2011
Messages
18
swap &> with >&
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
I just checked / fixed the tutorial, the & isn't really necessary, not sure how/why it was there but thanks for pointing it out.
 

supremicus

Dabbler
Joined
Dec 27, 2011
Messages
18
Prob a silly question but is it possible to link a directory off another mount into the _MEDIA directory ? like say i have a drive for movies called /mnt/storage/Movies and i want to have that show up as MEDIA/Movies ? i tried with a symbolic linke using ln -s but dosn't work apparently
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
I just tried it also to see what happens. Outside the jail I linked a directory into the directory /mnt/tank/Serviio_Jail/Serviio_root/usr/local/serviio-0.6.0.1/MEDIA
The linked folder appears there when you're INSIDE the jail, but like you discovered it doesn't work. I think what you need to do is just add another entry into fstab.serviio which has your other folder mounted under the _MEDIA folder, so something like this:

/mnt/tank/_MEDIA /mnt/tank/Serviio_Jail/Serviio_root/usr/local/serviio-0.6.0.1/MEDIA nullfs rw 0 0
/mnt/tank/other-folder /mnt/tank/Serviio_Jail/Serviio_root/usr/local/serviio-0.6.0.1/MEDIA/other-folder nullfs rw 0 0

Or make it read-only if you want .... nullfs ro 0 0
 

supremicus

Dabbler
Joined
Dec 27, 2011
Messages
18
ahh sweet aslong as i do the following aswell it works like a charm

mkdir -p /mnt/tank/Serviio_Jail/Serviio_root/usr/local/serviio-0.6.0.1/MEDIA
mount_nullfs -o rw /mnt/tank/_MEDIA /mnt/tank/Serviio_Jail/Serviio_root/usr/local/serviio-0.6.0.1/MEDIA

thanks proto
 

Fig1047

Dabbler
Joined
Dec 29, 2011
Messages
17
Making progress, but now snagged with the creation of the admin account for the jail. I work through the steps of adding a user, but get an error
"pw: group 'admin' does not exist
adduser: ERROR: There was and error adding user (admin)."

I created the group "admin" in Freenas, but that still didn't work. Should I use pw to create a group?

Thanks in advance

Fig
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
As you probably read above, you're the second person to mention this problem lately. I'm not sure why, but something changed, I'll need to update the tutorial. For now you can use the group 'wheel' or do 'pw groupadd admin' INSIDE the jail.

Adding the group admin OUTSIDE the jail will not help because the jail environment is isolated from the host systems files etc.
 

Fig1047

Dabbler
Joined
Dec 29, 2011
Messages
17
I tried the pw group add on my own and it worked. I was able to create the user. So I've gotten to the point where I start the jails, and I get:

[root@freenas] /mnt/Data/Serviio_Jail# /etc/rc.d/jail start
Configuring jails:.
Starting jails: serviio.
[root@freenas] /mnt/Data/Serviio_Jail# jls
JID IP Address Hostname Path
1 192.168.1.251 serviio /mnt/Data/Serviio_Jail/Serviio_root

That looks good, but I don't see serviio on my home network. Just to be sure, I changed the jail ID to 1, and the interface is the freenas "interface" and not the freenas "name", correct (as it appears in the freenas GUI)? I also change the inetd flag in the rc.conf file from 10.0.10.150 to what I am using for serviio (192.168.1.251). any troubleshooting tips you can suggest? It looks like serviio is not starting since no log file is being generated and it is not showing up in freenas as a running process.
 

LAYGO

Explorer
Joined
Dec 21, 2011
Messages
85
I'm not sure why, but something changed, I'll need to update the tutorial.

There might've been an update to FreeBSD. There were more than the 44 (39 base.??) files downloaded as in the tutorial (ie; higher than base.bm now).
 

Fig1047

Dabbler
Joined
Dec 29, 2011
Messages
17
Proto et al:
If I go into the jail and manually start serviio, it runs fine. So the problem must be in the script that starts serviio. So I have two questions:

1) Just be be sure, the changes I make to rc.local should look like this:

#! /usr/local/bin/bash
#
(/usr/local/serviio-0.6.0.1/bin/serviio.sh) &

So the path is in parentheses, correct?

2) The rc.local file should be in which directory? Either:

/mnt/tank/Serviio_Jail/Serviio_root/etc/rc.local
OR
/mnt/tank/Serviio_Jail/Serviio_root/usr/local/etc/rc.local?


Thanks

Fig
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Proto et al:
If I go into the jail and manually start serviio, it runs fine. So the problem must be in the script that starts serviio. So I have two questions:

1) Just be be sure, the changes I make to rc.local should look like this:

#! /usr/local/bin/bash
#
(/usr/local/serviio-0.6.0.1/bin/serviio.sh) &

So the path is in parentheses, correct?

2) The rc.local file should be in which directory? Either:

/mnt/tank/Serviio_Jail/Serviio_root/etc/rc.local
OR
/mnt/tank/Serviio_Jail/Serviio_root/usr/local/etc/rc.local?


Thanks

Fig

Hi Fig,

The path in parenthese is correct, you should also keep the parentheses.

The rc.local should be in: /mnt/tank/Serviio_Jail/Serviio_root/etc/rc.local

or if you're inside the jail using chroot or jexec it would just be /etc/rc.local
 

LAYGO

Explorer
Joined
Dec 21, 2011
Messages
85
LAYGO,

Sorry I don't have time to go into the details, and I don't want to take this thread off the topic of Serviio, but you should be able to run Transmission in the same Jail as Serviio.

You'd need to add another entry in the fstab.serviio file outside the jail, create the folders inside and outside the jail to match the entry you just added to the fstab.serviio, and then pop into the jail and install Transmission. There might be a few other steps, but it shouldn't be all that difficult and it would save you from going thru the whole process again.

Ok, I looked & I'm not sure what makes the Jail or not. I've re-read the Serviio tutorial several times to figure out what's what & what would need to be modified to make it work, but alas, I do not have enough knowledge. I'll read the Transmission Jail tut & see if it sheds anymore light.
 

Fig1047

Dabbler
Joined
Dec 29, 2011
Messages
17
I think I am almost there, but need just a little more help. When I start the jail using /etc/rc.d/jail start, the jail appears to start fine and I don't get any errors.
Configuring jails:.
Starting jails: serviio.
[root@freenas] /mnt/Data/Serviio_Jail# jls
JID IP Address Hostname Path
1 192.168.1.251 serviio /mnt/Data/Serviio_Jail/Serviio_root

But serviio doesn't start. Then I use the jexec command and manually start serviio. Then I can see it on my network, I can ping it, and I can connect to it from the serviio console on my PC. So since I only know the little I've read about jails, are there any logs or debug options I can turn on when I start the jail to see where it is failing? I have checked my fstab.servvio, rc.conf. rc.local. sysctl.conf, and verified that they are in the right folders as well.

Thanks

Fig
 

ProtoSD

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

If you jexec into your jail, you can look at the Serviio logs in /usr/local/serviio-0.6.0.1/log/

It's most likely a typo in your /usr/local/serviio-0.6.0.1/bin/serviio.sh file. The "Code" box that shows the text for that file wraps a lot of those lines. If you copy and paste them into an editor and maximize the window size it's easier to see where the lines are supposed to start and end. Also check the permissions on that file and make sure they're 750 (rwxr-x---).
 

Spocksbeer

Cadet
Joined
Jun 6, 2011
Messages
6
Following up on my earlier question about Serviio and my Yamaha amp, I checked in with the Serviio forums and it's looking like it's an issue with multicast handling in BSD jails - namely, the lack there of. Seems that jail networking can send but not receive multicasts, and the amp is responding only with multicasts. Other devices, like XBMC and the PS3, seem to talk unicast in response to the multicast notifications - which is just plain weird in my book.

Looks like for me, at least, Serviio in a jail will not work for me. Damn.
 
Status
Not open for further replies.
Top