Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.
Installing Ubiquiti UniFi Controller in a jail

Installing Ubiquiti UniFi Controller in a jail

Western Digital Drives - The Preferred Drives of FreeNAS and TrueNAS CORE

ThreeDee

Senior Member
Joined
Jun 13, 2013
Messages
506
I used the script from this site and got the controller software working again

https://github.com/gregf/unifi-freenas

it installs an older version and it will mess up your current configuration on your Unifi hardware.. not a big deal for me, but it might be for you.
 
Last edited:

Borja Marcos

Member
Joined
Nov 24, 2014
Messages
108
Just pay attention to snappy.

In old versions the bundled snappy version was 1.0.5.

On 5.6.19 they changed to snappy-java-1.1.2.6.jar

Since 5.7.7 it's snappy-java-1.1.4.jar

I am running it on FreeBSD (11.1 now), not FreeNAS. Anyway the key to have it running is to remove the bundled version of snappy (which includes native code and won't support FreeBSD, only Linux and Solaris if I remember well) and put a symbolic link from snappy installed from ports to the name of
the bundled library.

That should make the trick.
 

{HD}

Member
Joined
Oct 30, 2016
Messages
47
Seems there is a bug if you recently upgraded FreeNAS 11. Nothing I can help with on this.
Crap! I am experiencing the same issue:
Code:
/!\ ERROR: /!\


Ports Collection support for your FreeBSD version has ended, and no ports are

guaranteed to build on this system. Please upgrade to a supported release.


No support will be provided if you silence this message by defining

ALLOW_UNSUPPORTED_SYSTEM.


*** Error code 1


On 11.1-U1 I hope it gets resolved sooner than later. I was looking forward to getting this controller onto freenas.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,344
Crap! I am experiencing the same issue:
Code:
/!\ ERROR: /!\


Ports Collection support for your FreeBSD version has ended, and no ports are

guaranteed to build on this system. Please upgrade to a supported release.


No support will be provided if you silence this message by defining

ALLOW_UNSUPPORTED_SYSTEM.


*** Error code 1


On 11.1-U1 I hope it gets resolved sooner than later. I was looking forward to getting this controller onto freenas.
It's not going to get fixed it has been a problem for awhile now. Just use ALLOW_UNSUPPORTED_SYSTEM=yes in front of your make command.
 

danb35

Wizened Sage
Joined
Aug 16, 2011
Messages
11,876

AVSION

Member
Joined
Dec 28, 2016
Messages
120
It's not going to get fixed it has been a problem for awhile now. Just use ALLOW_UNSUPPORTED_SYSTEM=yes in front of your make command.
Hi I have the same problem after i upgrade to FreeNAS-11.1-U1 get this ERROR message, i hope i didn't lose all the controller as i had all few sites on it :(.
can you please show the full command with ALLOW_UNSUPPORTED_SYSTEM=yes in it?

Thank you
 

{HD}

Member
Joined
Oct 30, 2016
Messages
47
Hi I have the same problem after i upgrade to FreeNAS-11.1-U1 get this ERROR message, i hope i didn't lose all the controller as i had all few sites on it :(.
can you please show the full command with ALLOW_UNSUPPORTED_SYSTEM=yes in it?

Thank you
Just put it on the end...

make install clean BATCH=yes ALLOW_UNSUPPORTED_SYSTEM=yes
 

AVSION

Member
Joined
Dec 28, 2016
Messages
120
Just put it on the end...

make install clean BATCH=yes ALLOW_UNSUPPORTED_SYSTEM=yes
Thanks {HD} had a few hiccups but made it worked :) i will now work on migrating the controller to iocage
 

AVSION

Member
Joined
Dec 28, 2016
Messages
120
Hi Guys,

Last week i did an upgrade to all of the remote APs / Sites, few of the APs came back and showing connected but most of them
didn't and are disconnected until now. is that something to do with FreeNAS iocage jail upgrade we had issues with or the problem is from unifi end?

i did some research on unifi forum and found couple of threads, one mention STUN port issues, for some reason until today we didnt find a solution to open STUN port using FreeNAS JAIL, but we can see some sites after the upgrade are connected with the STUN port closed so it not the issue. the other thread suggest to change the set inform from https to http. our controller address when we installed it on the FreeNAS supply us with https address, can you confirm that is the issue? if so do i need to change all the APs inform from https to http? (this is a bummer as i cant ssh access to the APs unless i use teamviewer and hassle all my clients). and last what can i do to prevent it in the future to happen again?

i did contact unifi support and they are not very helpful,

Please let me know if you need more information

Controller version 5.6.30

Thank you
 
Joined
Feb 11, 2018
Messages
2
Hey, I wanted to bring this thread back to life... I'm getting the same "There was an error registering credentials. Cloud access is not compatible with this OS architecture.".

Was there a fix for this?
 

Borja Marcos

Member
Joined
Nov 24, 2014
Messages
108
As far as I know cloud access only works on supported architectures. I didn't bother to investigate because I don't really need that feature but I will have a look at it.

Other than that it works, I am even tracking the latest "bleeding edge" betas.
 

m0nkey_

Dedicated Sage
Joined
Oct 27, 2015
Messages
2,732
Hey, I wanted to bring this thread back to life... I'm getting the same "There was an error registering credentials. Cloud access is not compatible with this OS architecture.".

Was there a fix for this?
As far as I know cloud access only works on supported architectures. I didn't bother to investigate because I don't really need that feature but I will have a look at it.

Other than that it works, I am even tracking the latest "bleeding edge" betas.
Since UNBT doesn't officially support FreeBSD, it's very unlikely this feature will ever work. You could try filing a bug ticket with UBNT, but I doubt it'll go very far.
 
Joined
Feb 11, 2018
Messages
2
Since UNBT doesn't officially support FreeBSD, it's very unlikely this feature will ever work. You could try filing a bug ticket with UBNT, but I doubt it'll go very far.
I found a workaround : )

This install thread works but the cloud connection does not: https://forums.freenas.org/index.php?resources/installing-ubiquiti-unifi-controller-in-a-jail.55/

I forget which github repot I used but one of these had a deploy script that worked around the problem. I haven't dug into the script yet to see HOW they worked around the problem but I'll be working on that next:

 

AVSION

Member
Joined
Dec 28, 2016
Messages
120
Hi, i moved my unifi controller to iocage jail (took one hour to complete the ports unifi installation, my longest ever installation so far!!)
when done i restored the controller from backup file which was hanging for another 15min, "please wait to complete", for file with 10 sites
so i end up restarting the iocage jail. then i got a prompt to change the ssh password which i did, loging in the software look ok with the latest version to date.
updating the jail, access points when smooth except setting up ssh, when trying to login, the ssh ip is ok but it wont accept the password i set on the controller.
here is what i tried so far:
  1. nano /etc/ssh/sshd.config change:
  2. PermitRootLogin yes
  3. PubkeyAuthentication yes
  4. PasswordAuthentication yes
  5. started services:
    Code:
    service sshd start
    and in /etc/rc.d/ sshd start
  6. remove old keys nano /Users/my user/.ssh/known_hosts (OSX Terminal)
i couldn't find where i can changed the ssh password in the jail as its different from previous versions.

I do have ssh root access to freenas but not to the jail.

Does anyone can help how to set up ssh in iocage and other steps i need to do?

i have attache my sshd.config and rc.conf files for your review and i use freenas 11.1-U5, please let me know if you need anymore information.

Thank you in advance
 

Attachments

cdiddy

Member
Joined
Oct 3, 2017
Messages
27
so far so good... is the make supposed to take like an hour? never used make command or built a port before... starting to worry i somehow built the entire port library...
 

AVSION

Member
Joined
Dec 28, 2016
Messages
120
so far so good... is the make supposed to take like an hour? never used make command or built a port before... starting to worry i somehow built the entire port library...
Yes i installed unifi in iocage last week and it took an hour to complete.

Did you use iocage jail?


Sent from my iPhone using Tapatalk
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Yeah, see, the thing is, the port has a bunch of dependencies which, if you also build those (which is automatic unless you already have them), it takes an hour.

If you know a few things, you can "pkg install" some of the most heinous dependencies in about 2 minutes, and then the unifi install will itself take just 5 minutes.

But yeah, for most people who just go straight to ports, yeah, an hour (or two) is possible.
 

cdiddy

Member
Joined
Oct 3, 2017
Messages
27
Yes i installed unifi in iocage last week and it took an hour to complete.
Did you use iocage jail?
i did NOT use iocage, i just saw that recommendation... i may try, because i seem to be getting hung up on snappy-java, did you have this problem and how did you work around it?

this suggestion looks like it resolves this, but i have no idea how to do it:

Just pay attention to snappy.
In old versions the bundled snappy version was 1.0.5.
On 5.6.19 they changed to snappy-java-1.1.2.6.jar
Since 5.7.7 it's snappy-java-1.1.4.jar
I am running it on FreeBSD (11.1 now), not FreeNAS. Anyway the key to have it running is to remove the bundled version of snappy (which includes native code and won't support FreeBSD, only Linux and Solaris if I remember well) and put a symbolic link from snappy installed from ports to the name of
the bundled library.
That should make the trick.
 

cdiddy

Member
Joined
Oct 3, 2017
Messages
27
Yeah, see, the thing is, the port has a bunch of dependencies which, if you also build those (which is automatic unless you already have them), it takes an hour.
If you know a few things, you can "pkg install" some of the most heinous dependencies in about 2 minutes, and then the unifi install will itself take just 5 minutes.
But yeah, for most people who just go straight to ports, yeah, an hour (or two) is possible.
HAHA, yep, after it completed with a bunch of failed packages, i used pkg install on each of the failed packages, then did the make again, and it came out beautifully.

Had to add enable_unifi="YES" to rc.conf, then the service started right up. Am now running unifi controller from the jail, and all is working as it should! beautiful!!!

thanks to all involved, i am a happy nerd =-)
 
Top