OPNsense Forum

English Forums => General Discussion => Topic started by: mimugmail on October 26, 2023, 01:17:03 PM

Title: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: mimugmail on October 26, 2023, 01:17:03 PM
EDIT: This only affects you if you have enabled my comunity repo: https://www.routerperformance.net/opnsense-repo/

Hi,

for a couple of months there were no updates on the community repo, cause of the fact that FreeBSD updated the unifi7 port with v7.4 that it get's bundled with mongodb4.4 instead of mongodb3.6 (which is EoL). The problem is, that there is no upgrade path between 3.6 to 4.4 and Unifi solved this in Windows/Linux a different way than the FreeBSD guys :)

So, in my tests I failed 100% of all upgrade from 7.3 to 7.4 or 7.5, which means, after upgrade you can use your wifi but can't login into the controller. To fix this, you need download a backup of Unifi and head over to CLI:



service unifi stop

pkg remove os-unifi7-maxit unifi7

rm -rf /usr/local/share/java/unifi/*

pkg install os-unifi7-maxit



Browse to your controller and restore from backup.



If you know a better way, I'm happy for any help.

Right now I need to do this cause of the openssl111 trouble beginning with 23.7.7 (where FreeBSD is responsible, not OPNsense).
Title: Re: Upcoming Unifi Plugin Upgrade will break your config
Post by: meyergru on October 26, 2023, 02:01:18 PM
Is the transition already active? I am asking because I did not have the plugin installed as of yet and wanted to try as a fresh install. Neither of the two plugins os-unifi7-maxit and os-unifi-maxinit can be installed because of missing dependencies on openssl:

pkg: libevent has a missing dependency: openssl
pkg: mongodb36 has a missing dependency: openssl


Also, I was surprised to see a mongodb36 dependency on both packages, I should have expected mongodb44 in os-unifi7-maxit?
Title: Re: Upcoming Unifi Plugin Upgrade will break your config
Post by: mimugmail on October 26, 2023, 02:49:24 PM
As I said, "upcoming", it's a warning everyone using it should take a backup before I push the release.
Title: Re: Upcoming Unifi Plugin Upgrade will break your config
Post by: v4npro on October 26, 2023, 04:00:11 PM
Thanks mimugmail. Patiently waiting for release.

Quote from: mimugmail on October 26, 2023, 01:17:03 PM
Hi,

for a couple of months there were no updates on the community repo, cause of the fact that FreeBSD updated the unifi7 port with v7.4 that it get's bundled with mongodb4.4 instead of mongodb3.6 (which is EoL). The problem is, that there is no upgrade path between 3.6 to 4.4 and Unifi solved this in Windows/Linux a different way than the FreeBSD guys :)

So, in my tests I failed 100% of all upgrade from 7.3 to 7.4 or 7.5, which means, after upgrade you can use your wifi but can't login into the controller. To fix this, you need download a backup of Unifi and head over to CLI:



service unifi stop

pkg remote os-unifi7-maxit unifi7

rm -rf /usr/local/share/java/unifi/*

pkg install os-unifi7-maxit



Browse to your controller and restore from backup.



If you know a better way, I'm happy for any help.

Right now I need to do this cause of the openssl111 trouble beginning with 23.7.7 (where FreeBSD is responsible, not OPNsense).
Title: Re: Upcoming Unifi Plugin Upgrade will break your config
Post by: mimugmail on October 27, 2023, 01:04:53 PM
Just updated the repo ... be prepared:

https://www.reddit.com/r/opnsense/comments/17hl1ge/opnsense_community_repo_updated_fixes_openssl111/
Title: Re: Upcoming Unifi Plugin Upgrade will break your config
Post by: DEC670airp414user on October 27, 2023, 01:32:48 PM
which unifi plugin are you talking about exactly.

I am not seeing anything in the system > firmware > plugins about unifi

I have a separate cloud key controller.     is doing an open sense update going to break my Vlans? or what exactly is this

Title: Re: Upcoming Unifi Plugin Upgrade will break your config
Post by: cookiemonster on October 27, 2023, 01:47:47 PM
will only appear if you have enabled his repository.
Title: Re: Upcoming Unifi Plugin Upgrade will break your config
Post by: DEC670airp414user on October 27, 2023, 01:51:50 PM
Quote from: cookiemonster on October 27, 2023, 01:47:47 PM
will only appear if you have enabled his repository.

I figured this was the case.  but this is a very vague post under General.

either way the heads up is appreciated.  and glad I do not have to worry about this issue..

thank you for what you do @ mimugmail
Title: Re: Upcoming Unifi Plugin Upgrade will break your config
Post by: franco on October 27, 2023, 01:53:53 PM
Yeah I agree, we should clarify in the subject of the first post that this is about the mimugmail repo?


Cheers,
Franco
Title: Re: Upcoming Unifi Plugin Upgrade will break your config
Post by: mimugmail on October 27, 2023, 02:53:43 PM
I edited the main post :)

As there are around 1000 activations of the repo per month I thought it might be of broader use and posting in general is fine :)
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: CJ on October 27, 2023, 03:51:26 PM
Perhaps there needs to be either a separate Plugin (or even mimugmail :) ) forum section like there is for Zenarmor.

This could help with people better understanding what capabilities are part of the core OPNSense and what aren't.
Title: Re: Upcoming Unifi Plugin Upgrade will break your config
Post by: v4npro on October 27, 2023, 04:06:07 PM
Thank you mimugmail. I'm up and running.

Quote from: mimugmail on October 27, 2023, 01:04:53 PM
Just updated the repo ... be prepared:

https://www.reddit.com/r/opnsense/comments/17hl1ge/opnsense_community_repo_updated_fixes_openssl111/
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: meyergru on November 01, 2023, 05:52:41 PM
For me, it does not work. It is acting strange, like for example it installs both OpenJDK8 and OpenJDK17.

When I enable the daemon, expecting to have a Web GUI on port 8080 for initial configuration, the process starts (can see it with ps) but exits after a few seconds with no log messages.

I added this to fstab and mounted like it is said in the log messages:


fdesc   /dev/fd         fdescfs         rw      0       0
proc    /proc           procfs          rw      0       0


unifi user and group has been added as well.

When I start the process as shown in ps manually, it runs and does not stop:


# cd /usr/local/share/java/unifi/
# /usr/local/openjdk17/bin/java -Djava.awt.headless=true -Xmx1024M --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.time=ALL-UNNAMED --add-opens java.base/sun.security.util=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.rmi/sun.rmi.transport=ALL-UNNAMED -jar lib/ace.jar start


However, unifi controller did not listen to port 8080.

Later, I found that it collides with crowdsec already running on port 8080 (there should be a warning about that). But even after I disabled crowdsec, uninstalled unifi, deleted /usr/local/share/java/unifi, reinstalled unifi and started over, I now only get "HTTP Status 404 – Not Found" on either https://opnsense:8443 or http://opnsense:8080.

I can see no obvious errors in the unifi log files, mongodb seems to run as well.

P.S.: After just a while of waiting, it suddenly shows a Web GUI now, so what is left is:

1. Crowdsec port 8080 collides with unifi.
2. Both OpenDSK8 and OpenJDK17 are installed - as far as I can see, only OpenJDK17 is used.
3. There should be a hint to delete /usr/local/share/java/unifi and re-install unifi if something goes wrong.
4. The Help page should warn about the slow startup.
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: mimugmail on November 01, 2023, 06:17:32 PM
The colliding port message is already there when you enable the Service, isnt there a yellow warning Box?
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: meyergru on November 01, 2023, 06:25:02 PM
No, none that I was aware of. It is easy to have Crowdsec on another LAPI port, just that 8080 is the default.
I wanted to test only anyway, I usually have Unifi Controller running under Proxmox.
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: MagikMark on November 01, 2023, 08:36:21 PM
Hi MimuGmail!

Thank you for all the hardwork.  I just started using OPBsense as I'm a switcher from the other side.  I'm currently checking out unifi plugin as I am also using its APs.  Crowdsec is also a very good alternative to pfblocker as it is not available yet in OPNsense.

I noticed the default port of 8080 of Crowdsec conflicts with Unifi.  The Unifi daemon keeps on stopping.  Turning Croedec off solves this.

As a solution, which port would you advise in liu of 8080 in Crowdsec?  Tried port 9999 and I'm getting firewall "bouncer unknown"
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: mimugmail on November 02, 2023, 01:59:43 PM
Actually I never played around with crowdsec, sorry
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: Shibumi on November 02, 2023, 02:24:06 PM
This is what worked for me:

System: Diagnostics: Services: Unifi: Stop
System: Diagnostics: Services: Crowdsec: Stop
Services: Crowdsec: Settings: LAPI listen port: 8088

Router shell:

Quotepkg remote os-unifi7-maxit unifi7

rm -rf /usr/local/share/java/unifi/*

pkg install os-unifi7-maxit

Waited for like 3-4 minutes (if you dont wait you will get the 404 page until all services are up!)

Browser: <router IP>:8080 and configure your unifi (I restored it from a back up I had)

System: Diagnostics: Services: Crowdsec: Start

Crowdsec and Unifi work like a charm.


Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: MagikMark on November 02, 2023, 08:15:35 PM
Thanks will definetly try that
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: nihanthd on November 10, 2023, 02:26:45 AM
I use the unifi plugin on opnsense and I was not able to login.

I had the follow the steps mentioned for reinstalling unifi. But since I was not able to take a backup from the UI, these are the steps that I followed for backup



ssh <username>@<ip of opnsense>

cd /usr/local/share/java/unifi/data/db/backup/autobackup

# for finding the recent backup .unf file
ls -la


#on your local
scp <username>@<ip of opnsense>:/usr/local/share/java/unifi/data/db/backup/autobackup/<latest file> .

use that .unf file when restoring
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: mimugmail on November 10, 2023, 08:28:34 AM
Thx  8)
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: MagikMark on December 13, 2023, 06:42:38 AM
Hi!

Do u have a script or guide on upgrading unfi to the next version?
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: tokade on January 09, 2024, 05:50:24 PM
Hi,

do you plan to upgrade to version 8.x soon?

Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: mimugmail on January 09, 2024, 06:42:28 PM
I will build a new plugin when I find the time, yes
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: stetsonwebster on January 31, 2024, 02:50:12 PM
It looks like we can use this sooner rather than later.  Dependencies are now broken with OPNSense 24.1x :-(
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: MagikMark on February 01, 2024, 03:36:49 AM
Yeah.  I hope mimugmail finds the time to update it together with the latest version
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: mimugmail on February 01, 2024, 04:48:40 PM
It updated now .. :)
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: MagikMark on February 02, 2024, 12:36:03 AM
Thank you for letting us know.  However, There's still no updated plugin in the repository and still no access to the controller.
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: mimugmail on February 02, 2024, 07:30:42 AM
Can you remove the plugin and install again?
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: MagikMark on February 02, 2024, 10:26:19 AM
Thank you.  Removing then Installing fixed the problem.

However, there's a new app version 8.  Can we also expect an upgrade to this version anytime soon?
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: mimugmail on February 02, 2024, 10:50:37 AM
First I'll buil a new plugin to get others fixed, thx for the report.
Next will be unifi8 but I have some build errors .. takes a bit
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: MagikMark on February 02, 2024, 11:12:00 AM
Ok.  Thanks  a lot!  Looking forward to it
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: mimugmail on February 02, 2024, 08:00:42 PM
https://forum.opnsense.org/index.php?topic=38558.0
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: mimugmail on February 02, 2024, 08:29:41 PM
https://www.reddit.com/r/opnsense/comments/1ahba0z/announce_osunifimaxit_replaces_osunifi7maxit_with/
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: MagikMark on February 26, 2024, 08:42:23 PM
mimugmail

Can u help troubleshoot?  I did a clean install with opnsense and it seems I'm stucked at fetching unifi9 for a very long time

***GOT REQUEST TO INSTALL***
Currently running OPNsense 24.1.2_1 at Tue Feb 27 02:48:42 PST 2024
Updating OPNsense repository catalogue...
OPNsense repository is up to date.
Updating mimugmail repository catalogue...
mimugmail repository is up to date.
All repositories are up to date.
The following 44 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
   alsa-lib: 1.2.10 [mimugmail]
   brotli: 1.1.0,1 [OPNsense]
   dejavu: 2.37_3 [mimugmail]
   encodings: 1.0.5,1 [mimugmail]
   font-bh-ttf: 1.0.3_5 [mimugmail]
   font-misc-ethiopic: 1.0.4 [mimugmail]
   font-misc-meltho: 1.0.3_5 [mimugmail]
   fontconfig: 2.15.0_2,1 [OPNsense]
   freetype2: 2.13.2 [OPNsense]
   giflib: 5.2.1_1 [OPNsense]
   graphite2: 1.3.14 [mimugmail]
   harfbuzz: 8.3.0 [OPNsense]
   javavmwrapper: 2.7.9_1 [mimugmail]
   jbigkit: 2.1_2 [OPNsense]
   jpeg-turbo: 3.0.2 [OPNsense]
   lcms2: 2.16 [mimugmail]
   libICE: 1.1.0_2,1 [mimugmail]
   libSM: 1.2.3_1,1 [mimugmail]
   libX11: 1.8.7,1 [mimugmail]
   libXau: 1.0.9_1 [mimugmail]
   libXdmcp: 1.1.3 [mimugmail]
   libXext: 1.3.4,1 [mimugmail]
   libXfixes: 6.0.0 [mimugmail]
   libXi: 1.8,1 [mimugmail]
   libXrandr: 1.5.2 [mimugmail]
   libXrender: 0.9.10_2 [mimugmail]
   libXt: 1.2.1,1 [mimugmail]
   libXtst: 1.2.3_2 [mimugmail]
   libdeflate: 1.19 [OPNsense]
   libfontenc: 1.1.7 [OPNsense]
   libxcb: 1.15_2 [mimugmail]
   mkfontscale: 1.2.1_1 [mimugmail]
   mongodb44: 4.4.28 [mimugmail]
   openjdk17: 17.0.9+9.1 [mimugmail]
   os-unifi-maxit: 1.3 [mimugmail]
   pcre: 8.45_4 [OPNsense]
   png: 1.6.42 [OPNsense]
   snappy: 1.1.10 [mimugmail]
   snappyjava: 1.1.10.5 [mimugmail]
   tiff: 4.4.0_3 [OPNsense]
   unifi8: 8.0.26_1 [mimugmail]
   xorg-fonts-truetype: 7.7_1 [mimugmail]
   xorgproto: 2023.2 [mimugmail]
   zstd: 1.5.5_1 [OPNsense]

Number of packages to be installed: 44

The process will require 725 MiB more space.
127 MiB to be downloaded.
[1/1] Fetching unifi8-8.0.26_1.pkg: . done
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: MagikMark on February 26, 2024, 10:36:39 PM
Found the problem.  Needs to increase memmory and disk allocation.

Working fine now
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: dustymiller259 on April 04, 2024, 01:46:07 PM
Any plans to update your Repo to a newer version ?
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: MagikMark on April 08, 2024, 09:54:16 PM
Latest Update has this error:

***GOT REQUEST TO INSTALL***
Currently running OPNsense 24.1.5_3 at Tue Apr  9 03:50:36 PST 2024
Updating OPNsense repository catalogue...
OPNsense repository is up to date.
Updating mimugmail repository catalogue...
mimugmail repository is up to date.
All repositories are up to date.

pkg: unifi8 has a missing dependency: mongodb50

Checking integrity... done (0 conflicting)
Nothing to do.
***DONE***

Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: mimugmail on April 09, 2024, 07:39:27 AM
Slipped through, currently building the pkg.
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: mimugmail on April 09, 2024, 10:35:36 AM
Updated now ...
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: MagikMark on April 09, 2024, 10:48:50 AM
We got a new Error:

***GOT REQUEST TO INSTALL***
Currently running OPNsense 24.1.5_3 at Tue Apr  9 16:47:50 PST 2024
Updating OPNsense repository catalogue...
OPNsense repository is up to date.
Updating mimugmail repository catalogue...
mimugmail repository is up to date.
All repositories are up to date.

pkg: mongodb50 has a missing dependency: snowballstemmer

Checking integrity... done (0 conflicting)
Nothing to do.
***DONE***
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: MagikMark on April 11, 2024, 07:52:21 AM
mimugmail

Any update?
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: dustymiller259 on April 11, 2024, 02:38:42 PM
I'm also getting missing dependencies:

mongodb50 has a missing dependency: snowballstemmer
mongodb50 has a missing dependency: yaml-cpp
mongodb50 has a missing dependency: libunwind
mongodb50 is missing a required shared library: libyaml-cpp.so.0
mongodb50 is missing a required shared library: libunwind.so.8
mongodb50 is missing a required shared library: libstemmer.so.0

>>> Missing package dependencies were detected.
>>> Found 3 issue(s) in the package database.
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: mimugmail on April 12, 2024, 04:12:49 PM
sorry guys, please try again :)
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: MagikMark on April 13, 2024, 03:38:10 AM
Thank You.  That did it
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: ickingfudiot on April 14, 2024, 03:14:14 AM
Posting for visibility if others run into this with latest Unifi pkg, not expecting a fix.

Latest version requires MongoDB 5.0 which requires AVX instructions to be supported on your CPU. This actually rules out my custom router running OPNSense on an Intel N5105, a relatively popular fanless box CPU from 2021. For whatever reason Intel left AVX off this series of chips unless it's I3/I5/I7 badged.

This presents as MongoDB immediately crashing out on start, and Unifi can't function without a working mongodb.

Supposedly online folks have gotten docker images working with Mongo 5 and AVX disabled, but that's a bit beyond my technical ability.
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: dustymiller259 on April 14, 2024, 05:28:36 PM
No update waiting, so the service wont start, what is the fix ? I have tried to install the os-unifi-maxit from the command line, but it says it the most recent version so wont re-install ? What have I missed ?
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: mimugmail on April 14, 2024, 09:18:04 PM
Maybe clean up the folder via cli?
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: Patrick M. Hausen on April 14, 2024, 09:34:35 PM
If your CPU does not support AVX, the service won't start. The FreeBSD default compile options build MongoDB with AVX enabled. Only solution: build your own package from ports.
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: mimugmail on April 15, 2024, 07:31:18 AM
I started a build with:

databases_mongodb50_SET=        NOAVX

Will need a couple of hours, thx Patrick for the hint :)
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: dustymiller259 on April 15, 2024, 08:58:47 AM
where do I find the log for the Unifi plugin, as the page on 8443 constantly displays:

"UniFi Network Application is starting up...!"

I've just removed and re-installed the plugin, and the status has not altered.
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: Patrick M. Hausen on April 15, 2024, 09:06:57 AM
@dustymiller does your CPU support AVX or not?
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: dustymiller259 on April 15, 2024, 09:22:08 AM
Yes its an i3-n305:

https://www.intel.com/content/www/us/en/products/sku/231805/intel-core-i3n305-processor-6m-cache-up-to-3-80-ghz/specifications.html

Instruction Set Extensions Intel® SSE4.1, Intel® SSE4.2, Intel® AVX2
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: mimugmail on April 15, 2024, 09:36:00 AM
I replaced the mongodb50, just reinstall the pkg, maybe this will fix it
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: dustymiller259 on April 15, 2024, 09:36:52 AM
root@core-router:/ # grep Features /var/run/dmesg.boot  | grep --colour -e AVX
  Features2=0xfffa3203<SSE3,PCLMULQDQ,SSSE3,FMA,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND,HV>
  Structured Extended Features=0x219c27eb<FSGSBASE,TSCADJ,BMI1,AVX2,FDPEXC,SMEP,BMI2,ERMS,INVPCID,NFPUSG,RDSEED,ADX,SMAP,CLFLUSHOPT,CLWB,SHA>
  Features2=0xfffa3203<SSE3,PCLMULQDQ,SSSE3,FMA,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND,HV>
  Structured Extended Features=0x219c27eb<FSGSBASE,TSCADJ,BMI1,AVX2,FDPEXC,SMEP,BMI2,ERMS,INVPCID,NFPUSG,RDSEED,ADX,SMAP,CLFLUSHOPT,CLWB,SHA>
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: dustymiller259 on April 15, 2024, 09:41:53 AM
ran the update, no luck,
Restarted the Unifi Service - No Luck
Restarted the Router - No luck,

Still stuck showing - "UniFi Network Application is starting up..."
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: mimugmail on April 15, 2024, 06:50:58 PM
service unifi stop

pkg remove os-unifi8-maxit unifi8

rm -rf /usr/local/share/java/unifi/*

pkg install os-unifi8-maxit
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: dustymiller259 on April 15, 2024, 08:00:13 PM
pkg: No packages available to install matching 'os-unifi8-maxit' have been found in the repositories
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: dustymiller259 on April 15, 2024, 08:35:54 PM
pkg install os-unifi-maxit - Worked. Restoring from old backup now
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: dustymiller259 on April 15, 2024, 08:41:08 PM
Didnt lkike the old backup, creating networks again
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: dustymiller259 on April 15, 2024, 10:12:59 PM
Thank you for the help getting the plugin working.
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: MagikMark on May 17, 2024, 01:28:56 AM
Unifi plugin is now missing after opnsense upgrade
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: thendifool on May 17, 2024, 01:54:50 PM
Latest upgrade removed unifi, tried to re-install but getting the following missing dependency python39

service unifi stop
pkg remove os-unifi-maxit unifi8
y
rm -rf /usr/local/share/java/unifi/*
pkg install os-unifi-maxit

catalogue...
OPNsense repository is up to date.
Updating SunnyValley repository catalogue...
SunnyValley repository is up to date.
Updating mimugmail repository catalogue...
mimugmail repository is up to date.
All repositories are up to date.
pkg: glib has a missing dependency: python39
pkg: glib has a missing dependency: python39
pkg: glib has a missing dependency: python39
pkg: glib has a missing dependency: python39
pkg: glib has a missing dependency: python39
Checking integrity... done (0 conflicting)
The following 2 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        os-unifi-maxit: 1.3 [mimugmail]
        unifi8: 8.1.113 [mimugmail]

Number of packages to be installed: 2

The process will require 227 MiB more space.


Database not starting up:
/usr/local/share/java/unifi/logs # tail -100 server.log
[2024-05-17 13:59:20,935] <main> WARN  system - reload system.properties failed: file not found
[2024-05-17 13:59:20,939] <main> WARN  system - reload system.properties.bk failed: file not found
[2024-05-17 13:59:20,939] <launcher> INFO  launcher - Initializing on FreeBSD(13.2-RELEASE-p11), jre17(17.0.10)
[2024-05-17 13:59:20,939] <launcher> INFO  system - *** Running for the first time, creating identity ***

[2024-05-17 13:59:20,940] <launcher> WARN  system - reload system.properties failed: file not found
[2024-05-17 13:59:20,940] <launcher> WARN  system - reload system.properties.bk failed: file not found

[2024-05-17 13:59:27,331] <launcher> INFO  startup - Initiating startup
[2024-05-17 13:59:27,969] <launcher> WARN  system - Valid keystore is missing or invalid. Generating one ...
[2024-05-17 13:59:27,969] <launcher> INFO  system - Generating Certificate[UniFi]... please wait...
[2024-05-17 13:59:28,582] <launcher> INFO  system - Certificate[UniFi] generated!
[2024-05-17 13:59:28,697] <launcher> INFO  tomcat - Adding basic REST API support during the startup
[2024-05-17 13:59:30,650] <launcher> INFO  system - Tomcat startup took 3305ms
[2024-05-17 13:59:39,541] <launcher> INFO  system - ======================================================================
[2024-05-17 13:59:39,541] <launcher> INFO  system - UniFi 8.1.113 (build atag_8.1.113_25191 - release/release) is started
[2024-05-17 13:59:39,542] <launcher> INFO  system - Environment: UniFi-OS[false], UniFi-Cloud[false], UniFi-MongoService[false]
[2024-05-17 13:59:39,542] <launcher> INFO  system - ======================================================================
[2024-05-17 13:59:39,542] <launcher> INFO  system - BASE dir:/usr/local/share/java/unifi

[2024-05-17 13:59:39,544] <launcher> INFO  system - ubic.env: prod
[2024-05-17 13:59:39,757] <launcher> INFO  mongo  - Checking if database needs to be shut down
[2024-05-17 13:59:40,989] <launcher> INFO  mongo  - Database was not running
[2024-05-17 13:59:40,989] <launcher> INFO  mongo  - Starting database process...
[2024-05-17 13:59:41,001] <mongod-tail> WARN  mongo  - Mongo log not found during startup
[2024-05-17 13:59:41,047] <mongo-db> WARN  mongo  - Stop listening to Mongo logs after process has exited
[2024-05-17 13:59:41,048] <mongo-db> INFO  mongo  - Database process stopped, code=1
[2024-05-17 13:59:44,050] <mongod-tail> WARN  mongo  - Mongo log not found during startup
[2024-05-17 13:59:44,061] <mongo-db> WARN  mongo  - Stop listening to Mongo logs after process has exited
[2024-05-17 13:59:44,062] <mongo-db> INFO  mongo  - Database process stopped, code=1
[2024-05-17 13:59:47,063] <mongod-tail> WARN  mongo  - Mongo log not found during startup
[2024-05-17 13:59:47,073] <mongo-db> WARN  mongo  - Stop listening to Mongo logs after process has exited
[2024-05-17 13:59:47,073] <mongo-db> INFO  mongo  - Database process stopped, code=1
[2024-05-17 13:59:50,076] <mongod-tail> WARN  mongo  - Mongo log not found during startup
[2024-05-17 13:59:50,126] <mongo-db> WARN  mongo  - Stop listening to Mongo logs after process has exited
[2024-05-17 13:59:50,128] <mongo-db> INFO  mongo  - Database process stopped, code=1
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: mimugmail on May 17, 2024, 05:11:01 PM
Yep python was updated t0 3.11. Sadly Im on vacation for 2 weeks, no chance to update
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: newsense on June 01, 2024, 10:46:13 PM
HI Michael, I have a bit of a twist for you here, unsure why I'm getting inconsistent results following the same steps.


I did a fresh install on a barebones test vm running 24 1.8, went to the 8080 page, restore config -- all flawless with no additional steps required. (checked later on after having trouble with the actual FW I need to have it working - not even the proc and fdesc are present in fstab)


Went to the FW I need to have this running and thigs started going sideways, had 8080 running in a couple places, fixed the first as it was AGH on an interface then discovered meyergru's post here and after adding the two fstab mounts and moving Crowdsec things started working a bit.

The furthest I got here was the import page - where I used the same config file as above - and things died silently on me during the import.

For completeness, the test vm was running with 2GB ram and the FW4C has 8GB, so I ruled out any resource constraints that would make the import fail. 
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: newsense on June 02, 2024, 06:08:57 PM
OK so the two remaining issues were mongo not running - everything came up with
service mongod onestart
and the loop caused by the Unifi controller having the old IP configured in it - which would override the set-inform on the devices.

Haven't rebooted the FW yet so I'm unsure how mongo would behave post reboot. I don't see it listed Lobby - Services so it might need to be added to /etc/rc.conf ?
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: mimugmail on June 02, 2024, 09:34:26 PM
No, this is handled by unifi, no need to register the Service itself
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: newsense on June 05, 2024, 05:24:55 PM
Actually this is a confirmed no, maybe it is a bug in Unifi ?

I just rebooted the FW, verified mongo was not running, could go as far as to do the login but then nothing would show up in the page until I started mongod manually.
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: MagikMark on June 05, 2024, 06:48:01 PM
While fixing the plugin, we may want to upgrade the controller as new version is also available.  Thanks
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: mimugmail on June 07, 2024, 07:21:14 AM
Everything should be up2date now :)
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: newsense on June 07, 2024, 08:31:21 AM
Well...for 8.1 yes, for 8.2 not yet :)

Just installing 8.1.127 now, thanks for providing it.
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: hoondi on June 10, 2024, 10:58:31 AM
Hi all,

Thank mimugmail, am most happy to consolidate all my networking services onto a single box this weekend. ← feels so right this way.

When I ran the installer, I saw two commands that were to be run/setup at the end... but I stupidly clicked off the page onto another menu before I could act on them.
I vaguely recall a command associated with /proc and another with /etc/fstab.

I've got Unify running but I haven't restarted.  :) ;) :D ;D :o ::)

Am curious if anyone is able to let me know where to look to see what dependency/install advised to run these, and whether they actually required given Unifi is running great (sans restarting)

Once again, thank you.

Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: mimugmail on June 10, 2024, 09:40:27 PM
The msg is not important for running on OPN
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: hoondi on June 11, 2024, 03:31:29 PM
Thank you,
Champion!
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: MagikMark on July 25, 2024, 09:36:48 PM
Hi mimugmail!

Just need to ask if your plug-ins would work under version 24.7?

I'm kinda relectant to upgrade at the moment as it may break some things

Thanks
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: InTeL3D on July 26, 2024, 02:15:11 PM
I updated this morning from 24.1.10 and the unifi7 service no longer works...
I tried restarting but nothing happened.
When I click play on the service button nothing happens and it remains stopped.
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: mimugmail on July 28, 2024, 04:24:28 PM
You need to upgrade to unifi8
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: MagikMark on July 29, 2024, 01:03:32 AM
Thanks.  How about other plugins and widget.  Are they now all compatible with 24.7?
Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: hoondi on July 29, 2024, 01:57:38 AM
[solved - just had to look at fw more]
Anyone using unif8 plugin with 24.7 and have bridges setup?

I thought it initially might be a v24.7 issue, but I'm starting to think otherwise.
https://forum.opnsense.org/index.php?topic=41803.0

It looks like Unifi is running, but I can't get to it to set it up.

Is it possible to edit a conf file for Unifi to tell it what IP/interface to listen on?

Title: Re: mimugmail repo: Upcoming Unifi Plugin Upgrade will break your config
Post by: chrismarcy on November 14, 2024, 01:51:37 AM
Thanks again for this plugin. It is working great. Just set up a switch and two APs. I have the latest of both which is Unifi NA 8.4.62 from your plugin on OpnSense 24.7.8. This is a simple home network with one internal private subnet and a public IP on the wan port of the OpnSense. Both internal and external addressing is IPv4+6.

The only thing that I can't seem to make work is the site manager remote administration (i.e. unifi.ui.com). I can locally administer but the remote access can never log in and eventually times out. I have the default/out of the box firewall settings from OpnSense, I don't see any logged denys related to this, and I wouldn't expect to as this is a long lived outgoing connection to Ubiquiti unless something is going wrong with the next hole punched connection in I suppose. I haven't changed any settings so not sure what the issue is.

Anyone with OpnSense + Unifi plugin have remote administration working? (There are two more releases after the current but nothing in the release notes suggests it would pertain to this. There is one security advisory fixed but it requires a local account so not worried.)

Thanks again for maintaining the plugin!