SOLVED UniFi Controller in Jail - UniFi stopped and will not start

Joined
Jul 2, 2019
Messages
648
Hi Folks - I have my UniFi controller running in a FreeBSD jail on my FreeNAS machine (11.2-U7). The install followed the CEOS3C instructions found at Install UniFi Controller on FreeNAS 11.2-U5 - Quick & Easy.

I have had UniFi running without issues for about two months. For some reason last night the UniFi services stopped running and will not restart. The jail is up and running but the web server refuses to start. I can access the jail using jexec <#> /bin/csh (# being the appropriate jail number). I can also ping out of the jail to the router, switches, etc. The jail is also ping-able from a workstation.

I tried to manually start UniFi in the jail with:
sysrc unifi_enable=YES service unifi start

(I don't think I needed the sysrc unifi_enable=YES but I used it anyway)

There was no update to the jail that I can see.

(I do have recent backups (downloaded) but I was doing a number of changes over the past few days and, hitting-head-with-a-hammer, did not back the most recent configs. Is there any way to download the configs from the APs and switches before re-installing the UniFi controller?)

Does anyone have any suggestions?

Thanks!
Mike
 
D

dlavigne

Guest
Anything in /var/log/messages when you try to start the jail?
Does iocage list show the jail as up or down?
 
Joined
Jul 2, 2019
Messages
648
Hi @dlavigne:

I found the issue. For some reason, the rights on the the jail were changed to:

drwxrwx---+ 3 root wheel 5 Dec 23 17:34 UniFi Controller

These rights were set down to include the root directory.

I set them to match the other jails:
drwxrwxr-x+ 3 root wheel 5 Dec 23 17:34 UniFi Controller

And it the UniFi jail starts. :) The issue was mongo could not start.

The problem is I don't know how (if?) the permissions changed. The other jails don't have the perm bit (+) set on the root of the jail or root in the jail. :(

Should I change the perm bit? If so, how (I'm getting really rusty with Unix - my staff tell me that is because I am now mangement :eek:)

Thanks!
 
D

dlavigne

Guest
I'm not sure why the perms changed either. Typically mucking with perms in jails ends in unhappiness :-(
 
Joined
Jul 2, 2019
Messages
648
Wish it was mucking around with the jail perms before it upgefucted. Arrggg... Sometimes I find it hard to believe computer systems work at all.

At least I have a good backups, now...
 
Last edited:
Top