This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

Finch - OpenVPN, Sabnzbd, CouchPotato, SickBeard, etc, etc

Jails with XigmaNAS
Forum rules
Set-Up GuideFAQsForum Rules
eldude_123
Starter
Starter
Posts: 34
Joined: 08 Aug 2013 02:07
Status: Offline

Re: Finch - OpenVPN, Sabnzbd, CouchPotato, SickBeard, etc, e

Post by eldude_123 »

Hi mate,

Thanks for all the info, looks good. Not sure whether to try 2nd or 3rd option - installing directly inside of finch kind've seems to be more favourable for simplicity sake but does it have the potential to trash Finch? Decided to delete the previous jail as it was becoming a bit of a mess from messing around with stuff so just remaking it now then going to try one. Also switched VPN provider to PIA who seems a bit better and more helpful. VPN access on my DD-WRT router is 2-3 times faster than Torguard but still very low performance compared to my connection speed - definitely wanna get it all running on my NAS cause with that sort of performance it's not worth running.

Thanks

eldude_123
Starter
Starter
Posts: 34
Joined: 08 Aug 2013 02:07
Status: Offline

Re: Finch - OpenVPN, Sabnzbd, CouchPotato, SickBeard, etc, e

Post by eldude_123 »

hey man, run into an error creating a new jail. First tried to create another jail called openvpn but got an error so figured it might have been something stupid i did either configuring it or removing it. So then tried to create a jail called Openvpn but got the same error:

nas4free // root^> jail_ip="192.168.1.201"
nas4free // root^> jail_loopback="lo0|127.0.0.201"
nas4free // root^> jailname="Openvpn"
nas4free // root^> qjail create -f finch-ssh -4 "192.168.1.201,lo0|127.0.0.201" openvpn <-----oops made a typo
Successfully created openvpn
nas4free // root^> qjail stop openvpn
Jail already stopped. openvpn
nas4free // root^> qjail delete openvpn
Successfully deleted openvpn
nas4free // root^> qjail create -f finch-ssh -4 "192.168.1.201,lo0|127.0.0.201" Openvpn
Successfully created Openvpn
nas4free // root^> qjail config -k "Openvpn"
Successful enabled allow.raw_sockets for Openvpn
nas4free // root^> qjail start "Openvpn"
jail: Openvpn: /bin/sh /etc/rc: failed
Error: /usr/sbin/jail failed to start jail Openvpn.
because of errors in jail.conf file.

Figured it might have been something to do with manually starting / stopping the jail:

sudo finch chroot
qjail stop openvpn
qjail config -m openvpn # sets jail to manual mode (jail won't start at boot time)

I never got to the point where I had edited the rc.conf so probably to do with that, althought i guessed the qjail config -k "Openvpn" command above would have fixed this?

Can I fix this? No big deal if I need to reinstall Finch - just thought it would be better if I could avoid it!

Thanks

eldude_123
Starter
Starter
Posts: 34
Joined: 08 Aug 2013 02:07
Status: Offline

Re: Finch - OpenVPN, Sabnzbd, CouchPotato, SickBeard, etc, e

Post by eldude_123 »

Was messing about seeing if the problem was due to the jail or if i messed up finch - decided to try and install Sabnzbd (stopped my Brig version first and used different IP address and jailname - SABNZBD) because it turns out sickbeard and couch potato are just python scripts you execute and not really installs so I don't know how to get them to work in the brig (would have to switch out of bash i think which don't want to do because wanna keep working on finch for openvpn).

Soooo - just need to unistall finch and start again clean - is there a command for that? will i have to unmount a load of stuff?

Sorry for making a mess of it!

Thanks

dreamcat4
experienced User
experienced User
Posts: 111
Joined: 21 Mar 2014 21:59
Status: Offline

Re: Finch - OpenVPN, Sabnzbd, CouchPotato, SickBeard, etc, e

Post by dreamcat4 »

This line Is the actual error msg:
eldude_123 wrote: jail: Openvpn: /bin/sh /etc/rc: failed
These 2 lines:
eldude_123 wrote: Error: /usr/sbin/jail failed to start jail Openvpn.
because of errors in jail.conf file.
Are just a default error warning / txt created by qjail (they don't mean anything).

The error message format is:

<program>: <string>

So above,

<program> = "jail"

<string> = "Openvpn: /bin/sh /etc/rc: failed"

That means:

"program jail is executing "/bin/sh /etc/rc" inside the jail named Openvpn" - failed.

We cannot be sure what is wrong without further information (which is only available on your local system). Perhaps the file "/usr/jails/Openvpn/etc/rc" is missing or absent. OR perhaps the file missing is "/usr/jails/template/etc/rc".

OR perhaps the file "/usr/jails/Openvpn/etc/rc" does exist and it was executed... but it didn't complete and returned a non-zero exit code (some undisclosed error).

=================================================================
If there is a problem with your install it would be nice to know why. To eliminate the same thing from happening again in future (or for other users). If you just accidentally deleted some system files then great! No need to look further.

I'm just saying that because I don't want to miss any potential bugs that were not the user's fault. Unfortunately from my position - I don't have access to your system so can't investigate further unless you are smart enough to figure it out and /or provide some more information.

Unfortunately there isn't much logging being done at the moment.
=================================================================

Anyway! I tried those exact same commands on my own system and there was no such error

eldude_123 wrote: Can I fix this?
Not sure. If I had to make a wild guess, there is either something wrong with the folder "/usr/jails/template" OR the folder "/usr/jails/flavors/finch-ssh".

For the 1st one you can try:

Code: Select all

  # Populate default jails directories
  qjail install -f "/var/distfiles/finch"

  # Link the ports tree into jails
  portsnap_override on
  qjail update -p
  portsnap_override off
For the 2nd one you would need to reinstall finch.

dreamcat4
experienced User
experienced User
Posts: 111
Joined: 21 Mar 2014 21:59
Status: Offline

Re: Finch - OpenVPN, Sabnzbd, CouchPotato, SickBeard, etc, e

Post by dreamcat4 »

BTW:

It is a bad practice to use capital letters in the jail name.

Reason:

Some filesystems are not entirely case-sensitive. SO using capitalization on some host systems (or perhaps with certain zfs settings) may result in the directories "openvpn" and "Openvpn" being confused for one another.

However I'm not saying that is specifically the cause of today's error.

dreamcat4
experienced User
experienced User
Posts: 111
Joined: 21 Mar 2014 21:59
Status: Offline

Re: Finch - OpenVPN, Sabnzbd, CouchPotato, SickBeard, etc, e

Post by dreamcat4 »

eldude_123 wrote:just need to unistall finch and start again clean - is there a command for that? will i have to unmount a load of stuff?

Code: Select all

finch bootstrap uninstall  --dir "/path/to/finch"
Will delete finch.

Then, after it's all finished deleting:

Code: Select all

/bin/sh
alias finch-bootstrap="SSL_NO_VERIFY_PEER=YES fetch -q -o - http://git.io/HxXrsw | sh -s --"
finch bootstrap install  --dir "/path/to/finch"
Will install a brand-new one.

eldude_123
Starter
Starter
Posts: 34
Joined: 08 Aug 2013 02:07
Status: Offline

Re: Finch - OpenVPN, Sabnzbd, CouchPotato, SickBeard, etc, e

Post by eldude_123 »

Hi mate, don't think it's to do with Finch, 99% sure that i've just deleted something I shouldn't - errors only started after I removed openvpn jail (got an error during removal). I'm going to delete and start again!

Thanks so much for all the info, will be extremely helpful for 2nd attempt. Will let you know if I run into any trouble :) If I get any errors 2nd attempt then will let you know and can investigate.

dreamcat4
experienced User
experienced User
Posts: 111
Joined: 21 Mar 2014 21:59
Status: Offline

Re: Finch - OpenVPN, Sabnzbd, CouchPotato, SickBeard, etc, e

Post by dreamcat4 »

dreamcat4 wrote:If you search "freebsd openvpn in a jail", it turns up some useful information about the tun0 device.

http://forums.freebsd.org/showthread.php?t=22143

...
Finch is updated today with new qjail option. You can now specify a "devfs_rulset" in the jail's config setting.

https://github.com/dreamcat4/finch/comm ... a3e17394f0

For example:

Code: Select all

jailname=openvpn
devfs_rulset="12"
qjail config -b $devfs_rulset $jailname
This config option lets you to specify a custom ruleset, so the "tun0" device can be "un-hidden" in the jail's /dev folder. :P

eldude_123
Starter
Starter
Posts: 34
Joined: 08 Aug 2013 02:07
Status: Offline

Re: Finch - OpenVPN, Sabnzbd, CouchPotato, SickBeard, etc, e

Post by eldude_123 »

Hi mate,

Sorry I've not posted in a while. My flat got flooded and ended up getting moved to temporary accommodation for 4-8 weeks. Don't have an internet connection here so am running my internet through my phone. No NAS, not even get wifi setup - feels like i'm back in the tech dark ages!

Will defo check it out again once i'm back in a house with proper internet.

Cheers

dreamcat4
experienced User
experienced User
Posts: 111
Joined: 21 Mar 2014 21:59
Status: Offline

Re: Finch - OpenVPN, Sabnzbd, CouchPotato, SickBeard, etc, e

Post by dreamcat4 »

Well, no need to apologize. We hope that your other problems can be resolved before you become too miserable. :D

Specifically in regards to the recently added devfs_rulset functionality, it's just an FYI. This new feature it still has yet to be tested more thoroughly on FreeNAS and NAS4Free platforms. Incidentally the feature is also needed for many other software, not only the OpenVPN package.


Post Reply

Return to “Jails”