Installing Ubiquiti UniFi Controller in a jail

Installing Ubiquiti UniFi Controller in a jail

ThreeDee

Guru
Joined
Jun 13, 2013
Messages
698
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

Contributor
Joined
Nov 24, 2014
Messages
125
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}

Dabbler
Joined
Oct 30, 2016
Messages
48
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,421
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.
 

AVSION

Contributor
Joined
Dec 28, 2016
Messages
128
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}

Dabbler
Joined
Oct 30, 2016
Messages
48
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

Contributor
Joined
Dec 28, 2016
Messages
128
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

Contributor
Joined
Dec 28, 2016
Messages
128
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
 

GoingOffRoading

Dabbler
Joined
Feb 11, 2018
Messages
23
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

Contributor
Joined
Nov 24, 2014
Messages
125
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_

MVP
Joined
Oct 27, 2015
Messages
2,739
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.
 

GoingOffRoading

Dabbler
Joined
Feb 11, 2018
Messages
23
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

Contributor
Joined
Dec 28, 2016
Messages
128
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

  • rc_conf.txt
    309 bytes · Views: 364
  • sshd_config.txt
    3.7 KB · Views: 447

cdiddy

Dabbler
Joined
Oct 3, 2017
Messages
39
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

Contributor
Joined
Dec 28, 2016
Messages
128
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

Dabbler
Joined
Oct 3, 2017
Messages
39
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

Dabbler
Joined
Oct 3, 2017
Messages
39
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