I can say with absolute certainty that the UniFi controller is much more responsive now that Oracle 8 is the default java version. Web UI responsiveness is remarkably improved!
@ransur0t Fantastic post as this is very good to have UNIFI hosted on RPI’s running on OSMC…
Do you have any luck getting the latest Unifi Controllers running on RPI’s? I mean 5.6.20 or 5.6.22 as since 5.6.19 I can’t get my RPI UNIFI Controller to work…
I did request help at the Unifi forum but no love so far…
You’re welcome @sniferx1, glad you find it helpful. As others have said, perhaps out of scope for general user support on OSMC forums, but nonetheless from a community perspective I believe it is helpful to “cross pollinate” between ubnt and osmc forums …
Regarding the next major version release of the unifi controller, I have not transitioned to that yet (it is currently still in stable release candidate staging).
My current controller version (as follows) still runs great:
No problem @ransur0t. I am using 5.6.x branch as it got VPN support for me via L2TP as I am using my phone to login and perform tasks in local WAN / LAN / Wifi…
Any way I have raised a ticket with UniFi now and will wait to see what they say…
Just FYI…
You can also get 5.6.x branch releases by updatating source list to include testing (rather than stable)
No need to switch sources.list.d entry to testing repo – ubnt just pushed 5.6.22 to stable! I think I’ll hold the unifi package until I verify it will run on the pi3/osmc, or at least determine what needs to be done to get it to run.
Curious, did you take a look at the release announcement, particularly the parts on the Cloud Access feature and privileged ports?
@sniferx1 – So, I gave 5.6.22 a try, without success.
The unifi server.log indicated an error with the mongodb database at the time of upgrade, so after stopping the unifi service I attempted a repair with: mongod --dbpath /usr/lib/unifi/data/db --repair
The db repair was successful, but the controller failed to load regardless, and there was no running instance of mongodb after restarting the unifi service.
I have downgraded to 5.5.24 and the controller is running again.
Please let me know what ubnt provides as a potential solution.
Someone posted below fix and I will try this this weekend…
In my case the problem was, that there was not enough memory.
To get around that, I reduced Video-memory:
sudo nano /boot/config.txt
Added at the end: gpu_mem=16
As this was not enough, I changed size of Swap-File to 1000. Unifi needed around 150 so you could try also with 200:
sudo nano /etc/dphys-swapfile
changed from 100 to 1000: CONF_SWAPSIZE=1000
and enabled Swap-File:
sudo systemctl enable dphys-swapfile
After reboot Controller started without problem. (It took a while):
sudo reboot
In case swap is not installed, use:
sudo apt-get install dphys-swapfile
Steps I posted above worked and below is the formal Unifi forum. Also Ubnt now pushed 5.6.x Branch as stable and you can do the same to get 5.6.22 working as now it’s working for me.
Thanks for the follow up. I read through the ubiquiti forum post and noted that the support rep advised to install java 8u162 from the early access builds. Seeing that you tried java 8u151 and 8u152, I’m curious if the beta version solves the memory issue …?
I’ve just built the 8u162 deb package and will likely give the upgrade another try before implementing the dphys-swapfile method as I am concerned about it’s potential impact to sdcard lifespan.
Alternatively, I am planning on getting a unifi docker container running on my OMV NAS to try out the controller on that system as well.
@ransur0t Unifi finally came out and informed what they have done… More info in below link and below new settings fix the issue now and without having the need to install SWAP file service…
unifi.xms=512 (in /var/lib/unifi/system.properties)
Thanks @sniferx1. I had been following/monitoring ubiquiti forums for anything official and hadn’t checked since this morning.
Yup, it works!
I can verify that setting unifi.xms=512 in /var/lib/unifi/system.properties, paired with JDK 8u162 built from tar.gz downloaded from JDK 8 Updates Early-Access Builds results in a successful upgrade to UniFi Controller 5.6.22 and snappy performance.
System memory usage under idle and normal loads is up ~10%, with ~ 30% available MEM remaining (and this is with ~340MB allocated to GPU …)
Wish you a happy new year… Return from holidays and I have upgraded my OSMC which running the Unifi Controller to latest (Dec Update) and Unifi stop working and when try to install latest Unifi stable (5.6.29) it’s giving some MongoDB package errors
Unpacking unifi (5.6.30-10266) ...
dpkg: dependency problems prevent configuration of unifi:
unifi depends on mongodb-server (>= 2.4.10) | mongodb-10gen (>= 2.4.14) | mongodb-org-server (>= 2.6.0); however:
Package mongodb-server is not installed.
Package mongodb-10gen is not installed.
Package mongodb-org-server is not installed.
dpkg: error processing package unifi (--install):
dependency problems - leaving unconfigured
Processing triggers for systemd (232-25+deb9u1) ...
Errors were encountered while processing:
unifi
root@UnifiController:~#
I think you might be out of luck. The Debian repo doesn’t have an armhf version of mongodb-server (and there’s nothing at all for the other two). Debian -- Package Search Results -- mongodb
The best I can find is someone has compiled a version of mongodb 3.0.14 for Raspbian stretch here.
Thanks @dillthedog I also suspected this is the case and thanks for confirming. Saved lot of hours getting this to work. I will wait until MongoDB support V9.
For now I have setup a temp Unifi Server on my MAC and restore from a backup so all good…