OPNsense Forum

English Forums => 18.7 Legacy Series => Topic started by: xaxero on October 30, 2018, 08:26:18 pm

Title: Problems running Unifi controller on 18.7
Post by: xaxero on October 30, 2018, 08:26:18 pm
We have been running Unifi controller very nicely on the older versions of opnSense. using the link https://github.com/gozoinks/unifi-pfsense

Now we have an issue - starting MongoDB we have a library missing

root@gabtest:~ # mongod
Shared object "libdl.so.1" not found, required by "mongod"

Incorporating the controller has been a key part of our deployments and would be nice to keep everything in the one box if possible.

I realize this may void the warranty but if the pieces could play nice together it would be great and any ideas I can try in my sandbox would be much appreciated.
 

Title: Re: Problems running Unifi controller on 18.7
Post by: kanstin on October 31, 2018, 04:37:55 am
The Unifi controller is working for me on 18.7. try running the script again which will update the controller version and all required packages. Version 2 of mongodb was deprecated recently to force people onto version 3.. maybe issues with version 2 is what you are seeing
Title: Re: Problems running Unifi controller on 18.7
Post by: kanstin on October 31, 2018, 05:00:54 am
Or maybe I haven't updated?  Looks like a similar issue in this thread

https://forum.opnsense.org/index.php?topic=10095.0
Title: Re: Problems running Unifi controller on 18.7
Post by: xaxero on October 31, 2018, 07:08:23 am
I have 2 boxes with the issue. LIBDL is not in this 18.7 version and that breaks mongodb
Title: Re: Problems running Unifi controller on 18.7
Post by: mimugmail on October 31, 2018, 07:49:38 am
Solution described in other thread
Title: Re: Problems running Unifi controller on 18.7
Post by: franco on October 31, 2018, 10:07:18 am
I just want to point out the way the Unifi software is installed you're deliberately breaking it now that their software packages are based on FreeBSD 11.2 while we are still on FreeBSD 11.1.

https://github.com/gozoinks/unifi-pfsense/blob/master/install-unifi/install-unifi.sh#L30

This is not an OPNsense issue and will fix itself when 19.1 is out. We have fixed release schedules so was can't speed this up. ;)


Cheers,
Franco
Title: Re: Problems running Unifi controller on 18.7
Post by: xaxero on October 31, 2018, 10:50:24 am
Solution described in other thread

Can you please provide a link to other thread. Thanks
Title: Re: Problems running Unifi controller on 18.7
Post by: franco on October 31, 2018, 10:51:07 am
The link is already in this topic. The "problem" can't be "fixed", however.
Title: Re: Problems running Unifi controller on 18.7
Post by: jds on October 31, 2018, 04:16:36 pm
Yeah, I was the OP on that other thread, and my 'solution' was to uninstall the unifi controller and migrate it to a raspberry pi. The unifipi works great, but the best solution would probably be to have an official way to install the controller in the same box as opnsense. Hell, while I am fantisizing, why not make it a widget, too? Seriously, though, is this fix in 19.1 just because opnsense will move to freebsd 11.2, which might break the unifi installation again in the future? Or is there any plan to have an official way to have them play nicely together?
Title: Re: Problems running Unifi controller on 18.7
Post by: kanstin on October 31, 2018, 07:19:48 pm
There is a way to compile all of the packages from the opnsense source tree... I found the instructions (somewhere) and tried it about a year ago... It took several hours (8-10ish). I think it would have worked but there was a big in the Java runtime at the time so I gave up until I found the above scripta couple weeks later which worked and was orders of magnitude faster.
Title: Re: Problems running Unifi controller on 18.7
Post by: mimugmail on October 31, 2018, 08:09:15 pm
You could try:

opnsense-code ports
cd /usr/port/net-mgmt/unifi5
make install

No idea if it compiles well :)
Title: Re: Problems running Unifi controller on 18.7
Post by: ejprice on November 03, 2018, 01:48:47 am
Yeah, I was the OP on that other thread, and my 'solution' was to uninstall the unifi controller and migrate it to a raspberry pi. The unifipi works great, but the best solution would probably be to have an official way to install the controller in the same box as opnsense. Hell, while I am fantisizing, why not make it a widget, too? Seriously, though, is this fix in 19.1 just because opnsense will move to freebsd 11.2, which might break the unifi installation again in the future? Or is there any plan to have an official way to have them play nicely together?

Unifi on the Raspberry Pi works incredibly well. I have two of them deployed and they work flawlessly. I would also say, just because you could run the Unifi controller on Opnsense, it might not be a great idea from a security standpoint. The software is a large java application that is essentially a "black box"; you don't know what kind of potential vulnerabilities it has. It is closed source and proprietary. The code most likely doesn't get the scrutiny that the standard, packaged, Opnsense daemons do. I'm not saying in any way it's bad software, I use it and I like it. I'm just saying we don't know what is in it and I wouldn't recommend running on a firewall. Especially when it runs like a champ on a $35 device  :)
Title: Re: Problems running Unifi controller on 18.7
Post by: franco on November 03, 2018, 12:00:51 pm
19.1-BETA images will be released later today which will work with the FreeBSD repo because the BETA is essentially 18.7.6 with HardenedBSD 11.2 underneath and can be updated as usual. However, no warranty is made for compatibility of our 11.1 and the used 11.2 remote packages as usual: It works until it doesn't.


Cheers,
Franco
Title: Re: Problems running Unifi controller on 18.7
Post by: kanstin on November 06, 2018, 07:56:42 pm
I found a solution to "fix" a broken installation but it requires a working installation. On the router/controller which is working run the following commands:

pkg create mongodb
pkg create mongodb34
pkg create cyrus-sasl

The first command generates a pretty big file so it took a while to run. But those commands will create three files. On mine they were mongodb-2.6.12_5.txz, mongodb34-3.4.16.txz, and cyrus-sasl-2.1.26_13.txz. Copy those files to the router/controller with the broken installation. Run the following commands on that router:

pkg add -f mongodb-2.6.12_5.txz
pkg add -f mongodb34-3.4.16.txz
pkg add -f cyrus-sasl-2.1.26_13.txz


That worked for me. Your mileage may vary.
Title: Re: Problems running Unifi controller on 18.7
Post by: franco on November 06, 2018, 10:53:28 pm
Or now you can use https://forum.opnsense.org/index.php?topic=10135.0


Cheers,
Franco
Title: Re: Problems running Unifi controller on 18.7
Post by: jds on November 13, 2018, 09:48:58 pm
Yeah, I was the OP on that other thread, and my 'solution' was to uninstall the unifi controller and migrate it to a raspberry pi. The unifipi works great, but the best solution would probably be to have an official way to install the controller in the same box as opnsense. Hell, while I am fantisizing, why not make it a widget, too? Seriously, though, is this fix in 19.1 just because opnsense will move to freebsd 11.2, which might break the unifi installation again in the future? Or is there any plan to have an official way to have them play nicely together?

Unifi on the Raspberry Pi works incredibly well. I have two of them deployed and they work flawlessly. I would also say, just because you could run the Unifi controller on Opnsense, it might not be a great idea from a security standpoint. The software is a large java application that is essentially a "black box"; you don't know what kind of potential vulnerabilities it has. It is closed source and proprietary. The code most likely doesn't get the scrutiny that the standard, packaged, Opnsense daemons do. I'm not saying in any way it's bad software, I use it and I like it. I'm just saying we don't know what is in it and I wouldn't recommend running on a firewall. Especially when it runs like a champ on a $35 device  :)

OK, you convinced me. I am keeping it on the pi.  However, I am cheaper than you are, since I run it on a Raspberry Pi Zero W, which costs only $5. Well, and a $20 microSD card.  I even get to add pihole for free!
Title: (SOLVED) Re: Problems running Unifi controller on 18.7
Post by: xaxero on November 30, 2018, 09:47:10 pm
Thank you all for your suggestions.

Downloading the development release with BSD 11.2 solved the issue. Note - WebGui upgrade still has BSD 11.1 you have to download the BZIP and fresh install.

I will wait for the production release - test and deploy at that time.