Cannot get Unifi Controller to load login page


I followed the instruction here
I tried to installed the Ubiquiti Unifi controller on a ezjail jand on my installation each time I go to the login page I get prompt to start the setup wizard over and over asking to set country and username and password. Once I set it all and go back to the page, I get the following error message when I login:
I use gui

Thank you in advance for your assistance
Hi tobik
Thank you for your reply..
I have 2 messages
<launcher> WARN system - cannot load native lib - ubnt_webrtc_jni
Message in chrome browser
I ran the following 2 commands but I still get the error message
rm /usr/local/share/java/unifi/lib/native/Linux/amd64/
rm /usr/local/share/java/unifi/lib/native/Linux/armhf/

Running find / -name '' doesn't return anything.

Do you think it is a jail specific problem?
I did and installation on FreeNAS jail with not problem at all...
But On my FreeBSD jail its not working :(
Message in chrome browser
That looks like some kind of templating not being filled in correctly. Is mongod running? What do you see in sockstat -P tcp after starting the controller? Is /usr/local/share/java/unifi writable?
Hi tobik

Sorry for the late reply..
sockstat -P tcp
root     mongod     16919 6  tcp4      *:*
root     mongod     16919 14 tcp4
root     mongod     16919 15 tcp4
root     mongod     16919 16 tcp4
root     java       16883 61 tcp4
root     java       16883 68 tcp4       *:*
root     java       16883 69 tcp4       *:*
root     java       16883 70 tcp4       *:*
root     java       16883 71 tcp4       *:*
root     java       16883 77 tcp4
root     java       16883 79 tcp4
ll /usr/local/share/java/unifi
drwxr-xr-x  2 root   wheel     3 Aug 15 21:01 bin/
drwxr-xr-x  2 root   wheel     2 Aug 15 21:01 conf/
drwxr-xr-x  6 unifi  wheel     8 Aug 15 21:05 data/
drwxr-xr-x  3 root   wheel     3 Aug 15 21:01 dl/
drwxr-xr-x  3 root   wheel    47 Aug 15 21:01 lib/
drwxr-xr-x  2 unifi  wheel     4 Aug 15 21:56 logs/
-r--r--r--  1 root   wheel  1281 Jun  3 05:08 readme.txt
drwxr-xr-x  2 unifi  wheel     3 Aug 15 22:52 run/
drwxr-xr-x  3 root   wheel     3 Aug 15 21:01 webapps/
drwxr-xr-x  3 unifi  wheel     3 Aug 15 21:05 work/
All look ok to me.. can you spot any issue from that?
Could it be a problem with my pf rules?
Here's how sockstat -P tcp | grep unifi looks on my system:
unifi    mongod     80401 6  tcp4       *:*
unifi    mongod     80401 10 tcp4
unifi    mongod     80401 15 tcp4
unifi    mongod     80401 16 tcp4
unifi    mongod     80401 17 tcp4
unifi    java       80358 57 tcp4
unifi    java       80358 73 tcp4 6 *:8080                *:*
unifi    java       80358 74 tcp4 6 *:8443                *:*
unifi    java       80358 75 tcp4 6 *:8843                *:*
unifi    java       80358 76 tcp4 6 *:8880                *:*
unifi    java       80358 81 tcp4
unifi    java       80358 82 tcp4
unifi    java       80358 83 tcp4
What I notice is that mongod binds to on my system and in your jail it binds to the jail's IP. The Unifi controller does a new MongoClient("", ...) when starting up, which can't work when mongod is not bound to This seems to be hardcoded in the code. Do you still have access to your FreeNAS jail? Can you post a sockstat output from there too? I'm wondering why it works there.

Does the controller even attempt to connect with your mongod' instance? Do you see anything interesting in /usr/local/share/java/unifi/logs/mongod.log?
Here is what I have on my FreeNAS box
sockstat -P tcp | grep unifi
unifi    mongod     59747 6  tcp4       *:*                  
unifi    mongod     59747 14 tcp4      
unifi    mongod     59747 15 tcp4      
unifi    mongod     59747 16 tcp4      
unifi    mongod     59747 17 tcp4      
unifi    mongod     59747 18 tcp4      
unifi    java       59432 57 tcp4 6 *:8443                *:*                  
unifi    java       59432 59 tcp4 6 *:8843                *:*                  
unifi    java       59432 60 tcp4      
unifi    java       59432 70 tcp4 6 *:8080                *:*                  
unifi    java       59432 71 tcp4 6 *:8880                *:*                  
unifi    java       59432 75 tcp4      
unifi    java       59432 76 tcp4      
unifi    java       59432 77 tcp4      
unifi    java       59432 85 tcp4
This look very much like yours.
I stopped unifi service and cleared all the log.. Here is the /usr/local/share/java/unifi/logs/mongod.log
2016-08-23T15:00:23.268+0000 [initandlisten] MongoDB starting : pid=84281 port=27117 dbpath=/usr/local/share/java/unifi/data/db 64-bit
2016-08-23T15:00:23.268+0000 [initandlisten] db version v2.6.12
2016-08-23T15:00:23.268+0000 [initandlisten] git version: nogitversion
2016-08-23T15:00:23.268+0000 [initandlisten] OpenSSL version: OpenSSL 1.0.1p-freebsd 9 Jul 2015
2016-08-23T15:00:23.268+0000 [initandlisten] build info: FreeBSD 101amd64-quarterly-job-15 10.1-RELEASE-p37 FreeBSD 10.1-RELEASE-p37 amd64 BOOST_LIB_VERSION=1_49
2016-08-23T15:00:23.268+0000 [initandlisten] allocator: system
2016-08-23T15:00:23.268+0000 [initandlisten] options: { net: { bindIp: "", http: { enabled: false }, port: 27117 }, processManagement: { pidFilePath: "/var/run/" }, storage: { dbPath: "/usr/local/share/java/unifi/data/db" }, systemLog: { destination: "file", logAppend: true, path: "logs/mongod.log" } }
2016-08-23T15:00:23.269+0000 [initandlisten] journal dir=/usr/local/share/java/unifi/data/db/journal
2016-08-23T15:00:23.269+0000 [initandlisten] recover : no journal files present, no recovery needed
2016-08-23T15:00:23.295+0000 [initandlisten] waiting for connections on port 27117
2016-08-23T15:00:23.499+0000 [initandlisten] connection accepted from #1 (1 connection now open)
Any idea how I get mongod to binds to
Do you still have access to your FreeNAS jail? Can you post a sockstat output from there too? I'm wondering why it works there.
I'm guessing it's because FreeNAS uses VIMAGE/VNET jails. Those actually have a localhost interface. Regular jails however don't.

Any idea how I get mongod to binds to
Jails don't have a lo0 interface and therefor no access to You will need to bind it to the jail's IP address.