SOLVED unable to install unfi 6 controller in a jail

Keven

Contributor
Joined
Aug 10, 2016
Messages
114
hi,

A couple years ago i installed the unifi controller in a jail following the internet monkey tutorial Installing Ubiquiti UniFi Controller in a jail and it worked fine. over the years i have transition over the pluggin, but now i see that it's not beeing updated and i need newer version because i just bought the new unifi 6 lite which required newer version of the controller. So i decided to just create a new jail for unifi 6.0.41 controller.

i am now running FreeNAS 11.3-U3.2 with a clone jail 11.4-RELEASE-p4 with DHCP, VNET and Berkeley Packet filter checked.

i tried to follow the same tutorial, however some command did nothing (i guess those are outdated for iocage now...)


  • Update pkgs: pkg update && pkg upgrade -y
  • Update ports: portsnap fetch extract
  • Change into /usr/ports/net-mgmt/unifi6
  • Build UniFi: make install clean BATCH=yes
  • Enable UniFi at boot time: sysrc unifi_enable=YES
  • Start UniFi: service unifi start iocage start unifi6


i go to https://10.0.1.65:8443

and get this error
ERR_CONNECTION_REFUSED

Did i miss something?

don't know if it's useful but the installation took a couple of hours instead of couple of minutes for unifi 5 back then

screenshot during make install clean BATCH=yes
unifi6.png
 

Dice

Wizard
Joined
Dec 11, 2015
Messages
1,410
Hello,

is NAT enabled for the jail?
Maybe provide a screenshot of network settings for the particular jail.
 

Keven

Contributor
Joined
Aug 10, 2016
Messages
114
Hello,

is NAT enabled for the jail?
Maybe provide a screenshot of network settings for the particular jail.
it can't be checked because of DHCP

Capture d'écran 2020-12-28 11.24.59.png


Capture d'écran 2020-12-28 11.27.33.png
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,457
Update pkgs: pkg update && pkg upgrade -y
pkg isn't apt, so this is redundant--a simple pkg upgrade is all you need (add the -y if you like).
don't know if it's useful but the installation took a couple of hours instead of couple of minutes for unifi 5 back then
There are lots of dependencies that need to be compiled. Some of that time could be cut by installing them as packages instead--llvm10 is a big one. When I installed that one before the make install clean, it took the total time down to a little over an hour.
Start UniFi: service unifi start iocage start unifi6
Your first command was correct--the iocage start command starts the jail, which you've clearly already done, since you're working inside the jail.
 

Keven

Contributor
Joined
Aug 10, 2016
Messages
114
There are lots of dependencies that need to be compiled. Some of that time could be cut by installing them as packages instead--llvm10 is a big one. When I installed that one before the make install clean, it took the total time down to a little over an hour.

actually tried pkg install bash llvm40 openjdk8 but it didn't work so i though that it was outdated because of the new iocage system... didn't know about llvm10


Your first command was correct--the iocage start command starts the jail, which you've clearly already done, since you're working inside the jail.


that's what i got for those command, but i just realize now that in the tutorial it was sysrc unifi_enable=YES and i did sysrc unifi[B]6[/B]_enable=YES because i though it was the jail name and not unifi in general. so i fixed that and now it's working

root@unifi6:~ # service unifi6 stop
unifi6 does not exist in /etc/rc.d or the local startup directories (/usr/local/etc/rc.d), or is not executable
root@unifi6:~ # service unifi6 start
unifi6 does not exist in /etc/rc.d or the local startup directories (/usr/local/etc/rc.d), or is not executable

root@unifi6:~ # service unifi start
Cannot 'start' unifi. Set unifi_enable to YES in /etc/rc.conf or use 'onestart'instead of 'start'.
root@unifi6:~ # service unifi stop
Cannot 'stop' unifi. Set unifi_enable to YES in /etc/rc.conf or use 'onestop' instead of 'stop'.



Thanks for the help!

Keven
 

johnnyt

Cadet
Joined
Jan 23, 2021
Messages
6
For unifi6 install when I typed in "make install clean BATCH=yes" as listed in OP, I got an error that saying I could not use batch because license had to be approved manually. Since I didn't use batch, I repeatedly had to approve everything that needed approval, and, as someone else pointed out it was a long install process already. this made it quite painful.

Is there a way to avoid a manual license approval? maybe a separate switch for it? I searched but didn't find one.
 
Top