Page 11 of 25

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 13 May 2015 15:53
by Stuarty
Are there plans to update The Brig to work with Freebsd 10? There seem to be quite a lot of changes to how jails are managed. I can install The Brig and everything works perfectly until I try to start any jail I create. Then I get an error in the log:

Code: Select all

/etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables  is obsolete.  Please consider to migrate to /etc/jail.conf.

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 13 May 2015 16:01
by Coincoin0017
The Brig already works with Freebsd 10, you need alcatraz version of TheBrig ;)

viewtopic.php?p=53512#p53512
viewtopic.php?p=53570#p53570

viewtopic.php?f=71&t=8871

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 16 May 2015 18:02
by calperin
I have Nas4Free installed in a Flash Card with version 9.1.0.1 (version 431).

I'm trying to install Plex, so I started installing Jails. The problem I have is that the link required for /jail disappears every time I reboot the machine.

Any solution?

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 16 May 2015 20:32
by raulfg3
calperin wrote:I have Nas4Free installed in a Flash Card with version 9.1.0.1 (version 431).

I'm trying to install Plex, so I started installing Jails. The problem I have is that the link required for /jail disappears every time I reboot the machine.

Any solution?
yes, define /jail in your data disk as is explain in first post.

eg: in /mnt/yourmountpoint/jail

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 25 May 2015 19:10
by vengenerator
I had the brig installed and a plex sever setup in a Jail. Yesterday the USB stick that my nas4free OS was running on crashed and I couldn't recover it. My data disk is fine, I had the jails setup on this disk and I can browse the folders OK. I've reinstalled nas4free and can see all my data OK. I just reinstalled the brig. Is there anyway to restore my previous setup or do I have to delete the current plex jail folder and start again?

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 25 May 2015 21:44
by raulfg3
if you restore your previosly saved config.xml, your jails are show, because only need to launch jail in scrip:
http://wiki.nas4free.org/doku.php?id=do ... nd_scripts

PD: You need to see what command is used, I do not remember

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 25 May 2015 22:18
by alexey123
1. As Raul says - if you have backup of config and put your TheBrig into same place, you just need only restore config - must work.
2. If you install TheBrig into different place? just create new one with OLD JAIL NAME and define path to your OLD jail
Image

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 26 May 2015 09:33
by vengenerator
Thanks guys, unfortunately I didn't backup my config beforehand. Where is this file saved - would it still be on my hard drive somewhere? I cant obviously see it

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 27 May 2015 12:00
by vengenerator
I've decided my best bet is to delete the brig and jails and start again. I've stopped jails, then uninstalled the brig using the gui options. This has left files and folders on my data disk. However I can't delete these files and folders - I've tried though windows explorer and using the gui advanced file manager. I can delete files in directories one level up but when I try to delete the folder 'BRIG' (which contains a folder 'PLEX') I get the error :art: Unable to read directory when using the advanced file manager. In windows I get 'you need permission to perform this action'. What's strange is in windows I can delete some individual files from within the folder PLEX but not others. I haven't set up any permissions other than default. How the blazes to I delete the BRIG and PLEX folders?

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 27 May 2015 12:02
by raulfg3
use wiki: how to delete jails: http://wiki.nas4free.org/doku.php?id=do ... owto:jails

eg: nas4free# chflags -R noschg /mnt/data/jail/proto
nas4free# rm -rf /mnt/data/jail/proto

Happy path to Alcatraz + 10.x

Posted: 27 May 2015 14:47
by erico.bettoni
i'm current on 9.3 using the good old "The Brig" v0.8.
I'm in the process of migrating my NAS to 10.2. What is the recommend path for my Jails, which are all also on 9.3 P13?

1. Will I have to upgrade The Brig first, assuming there will be a Alacatraz release compatible with 9.3?
2. Will the 9.3 P13 Jails work on a BSD 10 host?

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 30 May 2015 21:01
by StanEsmith
What's the best way to upgrade to the Alcatraz branch? I've upgraded my nas to the 10.1 beta release. Seems I might have jumped the gun on that one becuase now I am running into problems with ports not wanting to manually make due to the configs pulling from 9.3 ports trees and not 10.1 in the jails.

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 30 May 2015 21:18
by raulfg3
please be patient, Alcatraz and N4F 10.x are still beta, do not migrate production servers, try first on a VM or in other NAS before to upgrade.

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 31 May 2015 10:24
by Parkcomm
Jails with two NICs

I have two subnets and two NICS on my server. I have configured the host to use NIC1 and subnet1. In the TheBrig I have configured the jails to use NIC2 and ip addresses from subnet2.

If the traffic destination from the jails is subnet2, all good. The traffic is sent on NIC2. However if the destination is anywhere else, then the the traffic is sent on NIC1.

The obvious way to solve this problem is to set up a second forwarding information base (FIB) - for instance using setfib. However, since I have an embedded installation this does not seem possible.

Has anyone else managed to solve this issue using the brig? (I can probably solve it using finch I guess, but then I'd have to redo all my jails)

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 02 Jun 2015 20:54
by erico.bettoni
Ok, how can I help testing alcatraz? If anything I can test the upgrade process using my secondary NAS.
I have jails running on v0.8 on N4F 9.

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 02 Jun 2015 21:20
by alexey123
Just try alcatraz on virtualbox or tested machine before use it on real server.

NOTE:
Alcatraz have bug with local lang... Work on english version only ( curently, I work on this bug)

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 02 Jun 2015 21:46
by erico.bettoni
alexey123 wrote:Just try alcatraz on virtualbox or tested machine before use it on real server.

NOTE:
Alcatraz have bug with local lang... Work on english version only ( curently, I work on this bug)
Ok, my test NAS is on N4F 9, TheBrig 0.8. The purpose of this box is testing, so how can I update it to alcatraz? Which I update first, N4F or Alacatraz?

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 02 Jun 2015 22:14
by alexey123
Alcatraz work on 9.3 and 10 based.
Upgrade it very symple from command line
Download alcatraz install script

Code: Select all

fetch https://raw.githubusercontent.com/fsbruva/thebrig/alcatraz/thebrig_install.sh
and run it with

Code: Select all

sh thebrig_install.sh /mnt/PATH/TO/FOLDER/where/placed/thebrig 3
NOT FORGET 3

Script will inspect system and replace old thebrig files on newest.

In future - alcatraz may be updated over webgui

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 02 Jun 2015 22:19
by erico.bettoni
alexey123 wrote:Alcatraz work on 9.3 and 10 based.
Upgrade it very symple from command line
Download alcatraz install script

Code: Select all

fetch https://raw.githubusercontent.com/fsbruva/thebrig/alcatraz/thebrig_install.sh
and run it with

Code: Select all

sh thebrig_install.sh /mnt/PATH/TO/FOLDER/where/placed/thebrig 3
NOT FORGET 3

Script will inspect system and replace old thebrig files on newest.

In future - alcatraz may be updated over webgui
Thanks! Will upgrade and help with the tests.

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 16 Jun 2015 14:40
by jasch
Centralports i not working,
i made a fresh 10 install with fresh the brig install.
Jails are fine, but when i go to centralports an press fetch i does nothing.
Nothing in log no network usage.
MFG Alex

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 16 Jun 2015 19:32
by alexey123
jasch wrote:Centralports i not working,

MFG Alex
I not agree. Just now I enable central ports for one jail named git - it work
Image
HOWTO:
When open Central port press fetch &install button - and wait few minutes. Brig fetch ports and put its into conf/ports folder
Your browser wait for answer now. When it say about success, define central ports for your jail - check table checbox near jail, where central ports will use. ImageTheBrig mount nullfs ports READONLY to selected jail. For give to user compille program we use nNON STANDART make.conf - all results of work will store into /var/ports JAILS folder

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 18 Jun 2015 11:29
by jasch
Hm Strange, its not working for me.
I complete uninstalled and deleted the Brig.
Then i made a clean new install, this time i used the offline installer.
Then i create a test Jail(Full) and start it.
I update the jail(fetch, install).
Then i go to Central ports i press fetch and install and after 1 second it says "The changes have been applied successfully."
Thats all. nothing more.
Btw i using a full N4f install.

Are there a way to get some kind of debug log?

MFG Alex

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 23 Jun 2015 09:56
by zirum
Hi guys!

Not sure if I should rather start a new topic on this, appologise if so. Feel free to correct me, and I will do so :-)
For the last two/three months, I have been having problems with my jail running plex. Started to explain the problem in Plex member section, but it seems as if it has something to do with the jail, not plex.

Problem:
All thumbnails on plex are empty using specific clients (windows software, samsung tv, not mobiles nor web client).

Plausible cause:
In the log files, it seems like plex has problems resolving local host (127.0.0.1).

Attempts to fix
1) https://forums.freebsd.org/threads/loop ... ail.49843/
Tried to add the follwoing OPTION to jail manager
a) export jail_plex_ip="192.168.0.7,127.0.0.1"
b) export jail_plex_ip="re0|192.168.0.7,lo0|127.0.0.1"

2) Upgraded plex to latest port (9.12.3)

3) Upgraded Nas4Free to latest stable (9.3.0.2)

4) According to PANZ's post a little down: https://forums.freenas.org/index.php?th ... ail.19412/
Created a new Jail, installed plex from ports, copied library from [.../plexdata/Plex Media Server] from old to new jail

5) Enable the option "Route only TCP/IP within jail"

Additional note, possible cause of problem
I think the problem might have occured while I was testing to create a separate jail with an openvpn connection (which I failed at too...). During that process, I manually created a tun0 device. I have tried to backtrack the changes, and removed the tun0, but I might have missed something more...

May it be related to the following bug (not shipped for the nas4free version i am running as far as I can tell..., but not sure.)
https://bugs.pcbsd.org/issues/7045

Here is my ifconfig for the jail:

Code: Select all

re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
        ether 40:16:7e:e8:a6:3f
        inet 192.168.0.7 netmask 0xffffffff broadcast 192.168.0.7
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
ipfw0: flags=8801<UP,SIMPLEX,MULTICAST> metric 0 mtu 65536
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
Help would be very much appretiated! :-)

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 23 Jun 2015 11:24
by alexey123
zirum wrote: Problem:
All thumbnails on plex are empty using specific clients (windows software, samsung tv, not mobiles nor web client).
Do you have thumbnails files onto your mediafolders? If not - check permissions

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 23 Jun 2015 11:36
by zirum
The thumbnails are in the plex library, not in the storage of medial files, if I understood you correct. Permissions seems correct to me (if I am looking at the right place... See example below:

Code: Select all

root@plex:/usr/local/plexdata/Plex Media Server/Metadata/TV Shows/0 # pwd
/usr/local/plexdata/Plex Media Server/Metadata/TV Shows/0
root@plex:/usr/local/plexdata/Plex Media Server/Metadata/TV Shows/0 # ls -la
total 12
drwxr-xr-x   6 plex  plex   6 Nov  6  2014 .
drwxr-xr-x  18 plex  plex  18 Sep 10  2014 ..
drwxr-xr-x   3 plex  plex   3 Nov  6  2014 27e752d4fc9ed0c08ad4977ac5b8e727b1045c3.bundle
drwxr-xr-x   3 plex  plex   3 May 20  2014 88aaf765459c7b03eab40bdddfaae3c53568d7d.bundle
drwxr-xr-x   3 plex  plex   3 Jan 11  2014 8aa165cf11c3d3784c739657a60d3d3b6bbf52f.bundle
drwxr-xr-x   3 plex  plex   3 Sep 10  2014 e14e7d51ebcaa139df92e53d615d6505f71b870.bundle
Just to clarify; I can see the thumbnails fine on my android. But not while using Plex Home Theater for instance. I cannot remember if that also applies when using Plex Home Theater outside home network, but I can test that tomorrow.

Also, I do not see any picture thumbnails, neither from library or camera upload. But I can see the pictures when opening them. (for the clients unable to see thumbnails).

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 24 Jun 2015 20:50
by RalMun
Hi folks,
I've a problem using the jail manager thebrig, with more than one jails.
I have a N4F as a storage and NFS/SMB system.
Mostly I stored private files and movies, recorded by my satellite receiver Humax iCord. Then I've experienced with playing these movies on some raspberry pi with XBMC. Due to that I've decided to use a mySQL database, which is installed on the N4F. Later other tools like Crashplan (in one single jail) and Owncloud came to it.
Then N4F 9.3.0.2 came up and I was forced to reinstall N4F from scratch and all the tools, except Crashplan, which has been going on, after I simply restored the configuratioon files.

Now I would like to install all tools in jails. Each in one single jail. I managed to install thebrig, but during creating the jails I run into a problem:
Can someone explain me the sense and the usage of the ports behind the IP address of the jail?
As you can see within alexey123's post from 16 Jun 2015 19:32, 5 posts above you can add many jails using different IPs but the same port (24 in this case). I can install many jails (with port 32 in my case), but after restarting the system the lighttpd fails to start and I'm unable to enter the web UI of N4F. The error message of lighttpd says:

Code: Select all

Starting lighttpd.
Duplicate config variable in conditional 2 global/HTTPremoteip==192.168.1.0: url.access-deny
2015-06-24 18:51:57: (configfile.c.957) source: /var/etc/lighttpd.conf line: 88 pos: 1 parser failed somehow near here: (EOL)
/etc/rc.d/lighttpd: WARNING: failed to start lighttpd
In lines near 88 in the file /var/etc/lighttpd.conf I found this:

Code: Select all

$HTTP["remoteip"] == "192.168.1.0/32" {
        url.access-deny = ( "~", ".inc", ".htpasswd" )
}
$HTTP["remoteip"] == "32" {
        url.access-deny = ( "~", ".inc", ".htpasswd" )
}
$HTTP["remoteip"] == "32" {
        url.access-deny = ( "~", ".inc", ".htpasswd" )
}
Of cause I know the work arround to use different ports (that works fine), but I would like to understand, what's going wrong here.

Cheers and thanks in advanced
Ralph

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 25 Jun 2015 11:42
by zirum
Hi RalMun

Are you sure about how you should assign the port in the config file? As far as I can see, it is not the port that is specified in remoteip, it is the netmask/subnet or what it is called again. You need the netmask to be set correctly to allow access from client from specific ip ranges. I am not to steady on it, but normally /8 is sufficient (allow from ip's in range x.x.x.1 to x.x.x.256). /16 would equal to x.x.1.1 to x.x.256.256 and for /24 its x.1.1.1 to x.256.256.256. In that context, 32 makes no sense (would logically mean all i suppose, maybe thats why it fails).

From the spec, I would add/change the socket attribute to specify port. See more here: http://redmine.lighttpd.net/projects/1/ ... figuration

Try something like (do not copy pase, my syntax is flawed).
$HTTP["remoteip"] == "192.168.1.0/16"
and
$SERVER["socket"] == "127.0.0.1:32"

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 25 Jun 2015 11:47
by zirum
zirum wrote:Just to clarify; I can see the thumbnails fine on my android. But not while using Plex Home Theater for instance. I cannot remember if that also applies when using Plex Home Theater outside home network, but I can test that tomorrow.
Tested Plex Home Theater from work, same problem there.

No additional suggestion on my local hos problem described in page 13 of the thread? My post on plex forum has hinted to loopback issue, not sure what it actually means, but guess it has something with binding of 127.0.0.1...

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 25 Jun 2015 15:40
by RalMun
@zirum
Thanks for your explanation. I'm not realy familiar (yet) with network stuff.
But finally your help doesn't work for me.
- I didn't touched this list box when I set up my jails, 32 is the default value.
- There are many more entries then just 8, 16, 24 and 32.
- In case of one single jail every thing works fine, even with the "netmask/subnet" value of 32.
- The error message told me s.th. like "Duplicate config variable in..." and as you can see in the extract of the config file, the last both "$HTTP["remoteip"]" entries are equal. Unfortunately I'm unable to modify this config file, because after restarting the web server, it has been overwritten. I assuem the config will be set during start time depending on the web GUI configuration.
- Nervertheless, using different values (e.g. 24 for all jails) results in the same error.
regards
Ralph

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 26 Jun 2015 20:35
by cookiemonster
@RalMun, like zirium says the /xx in the the brig config is not a port but a netmask for the network ip range the jail will span. Therefore you're going to need to split the problem in two parts: first ensure the jails are setup correctly as you wanted. Second then to deal with the actual problem with the application you're setting up once your networks are known to be in a good state.
Post the ip address of your nas host, then the ip addresses and /xx netmasks of your jails. You should get some advice here if those are looking fine.