Open tong2x opened 1 year ago
Update from Unifi 7.5.187 to Unifi 8.0.2, Successful (with the required changes in rc.d) OPNsense 23.7.7_3-amd64 FreeBSD 13.2-RELEASE-p3 OpenSSL 1.1.1w 11 Sep 2023
Thanks a lot, after many weeks, I've decided to ditch pfsense for opnsense and finally I now have my Unifi controller back where I want it. I was getting error 404 initially but this turned out to be browser cache as was sorted in a private session.
I also lost the adoption of my AP but the last backup I had was a couple of revisions old. All the settings restored so I just factory reset my AP and adopted as new. Back online now
Just wanted to let you know that the following script works without issue on pfSense Plus 23.09.1
beta UniFi Network Application 8.0.24 Firmware Overview/Details Install command: fetch -o - https://rb.gy/4iq0kr | sh -s
No need to apply any fix after running the script.
Successfully upgraded to 8.0.28 from 8.0.7 on PFSense 2.7.2
How come these changes are not being merged into master?
How come these changes are not being merged into master?
not enough contributor/devs to verify and check before merging.
UniFi Network Application 8.0.28 is already official though. if more contributor would comment for a merge to main, which would mean that they have checked and tested. I will also probably closing 7.x series as this 8.x series seems stable, except for the installation issues in other PFsense 2.7 systems
then again the master is too old either
Just tested 8.1.104 on pfSense 23.09.1-RELEASE and unfortunately, it's not working.
Just tested 8.1.104 on pfSense 23.09.1-RELEASE and unfortunately, it's not working. did you try #328 fix? do you have specific error?
Just tested 8.1.104 on pfSense 23.09.1-RELEASE and unfortunately, it's not working. did you try #328 fix? do you have specific error?
I can't apply the fix in #328 because the link to download MongoDB isn't working anymore.
Here's the error after installation:
Starting UniFi controller.
[23.09.1-RELEASE][root@Router.SiD.LAN]/root: 07:12:36,079 |-INFO in ch.qos.logback.classic.LoggerContext[default] - This is logback-classic version 1.4.14
07:12:36,082 |-INFO in ch.qos.logback.classic.util.ContextInitializer@41488b16 - Here is a list of configurators discovered as a service, by rank:
07:12:36,082 |-INFO in ch.qos.logback.classic.util.ContextInitializer@41488b16 - org.springframework.boot.logging.logback.RootLogLevelConfigurator
07:12:36,082 |-INFO in ch.qos.logback.classic.util.ContextInitializer@41488b16 - They will be invoked in order until ExecutionStatus.DO_NOT_INVOKE_NEXT_IF_ANY is returned.
07:12:36,082 |-INFO in ch.qos.logback.classic.util.ContextInitializer@41488b16 - Constructed configurator of type class org.springframework.boot.logging.logback.RootLogLevelConfigurator
07:12:36,094 |-INFO in ch.qos.logback.classic.util.ContextInitializer@41488b16 - org.springframework.boot.logging.logback.RootLogLevelConfigurator.configure() call lasted 0 milliseconds. ExecutionStatus=INVOKE_NEXT_IF_ANY
07:12:36,094 |-INFO in ch.qos.logback.classic.util.ContextInitializer@41488b16 - Trying to configure with ch.qos.logback.classic.joran.SerializedModelConfigurator
07:12:36,094 |-INFO in ch.qos.logback.classic.util.ContextInitializer@41488b16 - Constructed configurator of type class ch.qos.logback.classic.joran.SerializedModelConfigurator
07:12:36,097 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.scmo]
07:12:36,098 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.scmo]
07:12:36,098 |-INFO in ch.qos.logback.classic.util.ContextInitializer@41488b16 - ch.qos.logback.classic.joran.SerializedModelConfigurator.configure() call lasted 4 milliseconds. ExecutionStatus=INVOKE_NEXT_IF_ANY
07:12:36,098 |-INFO in ch.qos.logback.classic.util.ContextInitializer@41488b16 - Trying to configure with ch.qos.logback.classic.util.DefaultJoranConfigurator
07:12:36,098 |-INFO in ch.qos.logback.classic.util.ContextInitializer@41488b16 - Constructed configurator of type class ch.qos.logback.classic.util.DefaultJoranConfigurator
07:12:36,102 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback-test.xml] at [jar:file:/usr/local/UniFi/lib/ace.jar!/logback-test.xml]
07:12:36,108 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@a8ef162 - URL [jar:file:/usr/local/UniFi/lib/ace.jar!/logback-test.xml] is not of type file
07:12:36,225 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - Processing appender named [server_log]
07:12:36,225 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
07:12:36,235 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@2eea88a1 - No compression will be used
07:12:36,238 |-ERROR in ch.qos.logback.core.model.processor.ImplicitModelHandler - Could not create component [filter] of type [com.ubnt.ace.logs.SkipLoggersPrintingToDedicatedFileOnly] java.lang.ClassNotFoundException: com.ubnt.ace.logs.SkipLoggersPrintingToDedicatedFileOnly
at java.lang.ClassNotFoundException: com.ubnt.ace.logs.SkipLoggersPrintingToDedicatedFileOnly
at at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
at at ch.qos.logback.core.util.Loader.loadClass(Loader.java:132)
at at ch.qos.logback.core.model.processor.ImplicitModelHandler.doComplex(ImplicitModelHandler.java:134)
at at ch.qos.logback.core.model.processor.ImplicitModelHandler.handle(ImplicitModelHandler.java:94)
at at ch.qos.logback.core.model.processor.DefaultProcessor.secondPhaseTraverse(DefaultProcessor.java:241)
at at ch.qos.logback.core.model.processor.DefaultProcessor.secondPhaseTraverse(DefaultProcessor.java:253)
at at ch.qos.logback.core.model.processor.DefaultProcessor.secondPhaseTraverse(DefaultProcessor.java:253)
at at ch.qos.logback.core.model.processor.DefaultProcessor.traversalLoop(DefaultProcessor.java:90)
at at ch.qos.logback.core.model.processor.DefaultProcessor.process(DefaultProcessor.java:106)
at at ch.qos.logback.core.joran.GenericXMLConfigurator.processModel(GenericXMLConfigurator.java:208)
at at ch.qos.logback.core.joran.GenericXMLConfigurator.doConfigure(GenericXMLConfigurator.java:170)
at at ch.qos.logback.core.joran.GenericXMLConfigurator.doConfigure(GenericXMLConfigurator.java:122)
at at ch.qos.logback.core.joran.GenericXMLConfigurator.doConfigure(GenericXMLConfigurator.java:65)
at at ch.qos.logback.classic.util.DefaultJoranConfigurator.configureByResource(DefaultJoranConfigurator.java:68)
at at ch.qos.logback.classic.util.DefaultJoranConfigurator.configure(DefaultJoranConfigurator.java:35)
at at ch.qos.logback.classic.util.ContextInitializer.invokeConfigure(ContextInitializer.java:128)
at at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:103)
at at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:66)
at at ch.qos.logback.classic.spi.LogbackServiceProvider.initializeLoggerContext(LogbackServiceProvider.java:52)
at at ch.qos.logback.classic.spi.LogbackServiceProvider.initialize(LogbackServiceProvider.java:41)
at at org.slf4j.LoggerFactory.bind(LoggerFactory.java:195)
at at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:182)
at at org.slf4j.LoggerFactory.getProvider(LoggerFactory.java:490)
at at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:476)
at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:425)
at at com.ubnt.service.system.OO0oo.null(Unknown Source)
at at com.ubnt.service.system.OO0oo.
I have almost the same error, since there is too much text to compare but mine seemed to work, it is on OPNSENSE though. what is the last working firmware version you tried?
I have almost the same error, since there is too much text to compare but mine seemed to work, it is on OPNSENSE though. what is the last working firmware version you tried?
I had to go back to 8.0.24. All other versions give me a 404 when loading the page.
I'll test again later and I'll keep you in touch.
hmmm there is actauly not much change since 8.0.24 except the firmware itself. maybe you can try also a clean install of unifi (then just reload a backup copy of your site, if unifi works)
sometime it takes 2 to 5 minutes for unifi to load/start some times i need to restart the server.
hmmm there is actauly not much change since 8.0.24 except the firmware itself. maybe you can try also a clean install of unifi (then just reload a backup copy of your site, if unifi works)
sometime it takes 2 to 5 minutes for unifi to load/start some times i need to restart the server.
8.0.28 finally works fine.
None of the versions are working now on 2.7.2, as the link "http://pkg.freebsd.org/FreeBSD:13:amd64/latest/All/mongodb44-4.4.25.pkg" is dead.
You cannot complete the workaround anymore, because the needed package is missing.
How can we fix this?
None of the versions are working now on 2.7.2, as the link "http://pkg.freebsd.org/FreeBSD:13:amd64/latest/All/mongodb44-4.4.25.pkg" is dead.
You cannot complete the workaround anymore, because the needed package is missing.
How can we fix this?
Perhaps try the latest version: https://pkg.freebsd.org/FreeBSD:13:amd64/latest/All/mongodb44-4.4.28.pkg
That link works, and it will install. But when you try to run the script, it still errors out with:
"Usage: pkg lock [-lqy] [-a|[-Cgix]
pkg: Impossible to get the value from Last-Modified HTTP header
pkg: archive_read_open_filename(/tmp/.XXXXX): Unrecognized archive format
Failed to install the following 1 package(s): https://pkg.freebsd.org/FreeBSD:14:amd64/latest/ "
The workaround itself does not work, as the script will not complete. It halts when it reaches mongodb, and will not proceed. Even if you install mongodb44-4.4.28.pkg, it will not proceed, nor fetch UniFi.zip, nor any of it.
The workaround itself does not work, as the script will not complete. It halts when it reaches mongodb, and will not proceed. Even if you install mongodb44-4.4.28.pkg, it will not proceed, nor fetch UniFi.zip, nor any of it.
Exact same issue here with the 8.0.28 script. I upgraded successfully 2 weeks ago; the pull-request has changed in the mean time: https://github.com/unofficial-unifi/unifi-pfsense/pull/332#issuecomment-1913070772 So it's not caused by your PFsense installation.
So how do we get the script to complete? Any ideas?
With mongodb44-4.4.28 installed, now it is saying "ld-elf.so.1: Shared object "libcrypto.so.111" not found, required by "mongod"" when you run the script.
I keep getting the same error as you with both the 8.1.104 as well as 8.0.28 script. Thus being unable to upgrade from 8.0.28 to 8.1.104.
[...]
Package yaml-cpp-0.8.0 already installed.
Usage: pkg lock [-lqy] [-a|[-Cgix] <pkg-name>]
pkg lock --has-locked-packages
pkg unlock [-lqy] [-a|[-Cgix] <pkg-name>]
For more information see 'pkg help lock'.
Fetching : . done
pkg: Impossible to get the value from Last-Modified HTTP header
pkg: archive_read_open_filename(/tmp/.XXXXX): Unrecognized archive format
Failed to install the following 1 package(s): https://pkg.freebsd.org/FreeBSD:14:amd64/latest/
Seems to me there is something going on with the line that installs mongodb / getting the current version.
AddPkg ${CURRENT_MONGODB_VERSION}
command:
pkg info | grep mongodb
does return:
mongodb44-4.4.28 Distributed document-oriented "NoSQL" database (4.4.x Branch)
Not sure why this happens. The controller still runs fine and is online on v8.0.28 since I upgraded the last time https://github.com/unofficial-unifi/unifi-pfsense/pull/332#issuecomment-1913070772. Perhaps @tong2x can have a look.
there are open issue relating to PFSense having its SSL Library not fully 3.0, not quite sure about this but this relate to the mongodb library. there should be not much of a code change only the actual unifi firmware changes.
Please check/report openssl version and PFsense version
See also: https://github.com/unofficial-unifi/unifi-pfsense/issues/320#issuecomment-1646732257, but TL;DR:
pfSense 2.7.0 forked off from FreeBSD 14.0-pre at some time N FreeBSD 14.0-pre switched to OpenSSL 3.0 in base at some time N+1 we pull from FreeBSD:14:x "latest" here thus "latest" expects OpenSSL 3.0, but we (pfSense) have a base with OpenSSL 1.x Thus, mongodb from FreeBSD:14:x errors out with missing libssl.so.30 linking errors.
https://github.com/pfsense/FreeBSD-src/commit/b077aed33b7b6aefca7b17ddb250cf521f938613 says that we're gonna get OpenSSL 3.0 eventually in pfSense, but for now, we can pull from FreeBSD:13:x if we see that bad combination of (abi, pfSense version).
Fixes https://github.com/unofficial-unifi/unifi-pfsense/issues/320
I am on the latest pFsense Plus, 23.09.1. OpenSSL 3.0.12. So the problem is not old OpenSSL in my case. The script halts on mongodb. Installing FreeBSD:13 mongodb and re-running the script doesn't fix it - still halts at mongodb. I cannot get the script to complete. It worked BEFORE the link we were using went dead. I ran it successfully on 2.7.2 with the latest script. Then tried to give opnsense a go (didn't like it). Switched to pfSense plus. In the few days that transpired, the link went dead and the script stopped working.
could it be that your PFsense version requires newer mongoDB versions? I have set a limit for this script to mongodb44 becuase allowing more version cuase more openssl error before
I am on the latest pFsense Plus, 23.09.1. OpenSSL 3.0.12. So the problem is not old OpenSSL in my case. The script halts on mongodb. Installing FreeBSD:13 mongodb and re-running the script doesn't fix it - still halts at mongodb. I cannot get the script to complete. It worked BEFORE the link we were using went dead. I ran it successfully on 2.7.2 with the latest script. Then tried to give opnsense a go (didn't like it). Switched to pfSense plus. In the few days that transpired, the link went dead and the script stopped working.
Maybe? When it was on a clean install of 2.7.2, and before the link went dead, it installed fine. Ran without a hitch.
I am on the latest pFsense Plus, 23.09.1. OpenSSL 3.0.12. So the problem is not old OpenSSL in my case. The script halts on mongodb. Installing FreeBSD:13 mongodb and re-running the script doesn't fix it - still halts at mongodb. I cannot get the script to complete. It worked BEFORE the link we were using went dead. I ran it successfully on 2.7.2 with the latest script. Then tried to give opnsense a go (didn't like it). Switched to pfSense plus. In the few days that transpired, the link went dead and the script stopped working.
I also have the same issue on pfSense plus but I found a way to install it.
Simply comment the line "AddPkg ${CURRENT_MONGODB_VERSION}" and the installation will keep going.
You need MongoDB installed else UniFi won't start but as long as you already have it installed it will work.
I'm personally running mongodb44-4.4.28 and the installation works fine as long as the line "AddPkg ${CURRENT_MONGODB_VERSION}" is commented.
Where is it storing the install script when you run the fetch command, or do I need to cut and paste, create the script locally?
Where is it storing the install script when you run the fetch command, or do I need to cut and paste, create the script locally?
I'm unsure where it stores it but the easiest way is to copy and paste it in a bash script and then run "bash filename.bash"
That worked, but now I get the same error as @CryptoSiD posted up there. Won't start.
Also " WARN Unable to load properties from '/usr/local/UniFi/data/system.properties' - /usr/local/UniFi/data/system.properties (No such file or directory) " The file is there. Don't know why it throws that error.
EDIT: ran it a second time, and it started up. Weird.
EDIT EDIT: Stuck on "UniFi Network Application is starting up...
Please wait a moment"
Is it because "Port 8080 not available" ?
EDIT EDIT EDIT: Rebooting didn't fix it.
at first time it will load slower 3 to 5minutes, maybe DB migration. it will be faster next time, if error is 404 most probably it is not loaded yet
If it indicates "Port 8080 not available" it will sit on "Please wait a moment" forever.
EDIT: Still waiting a moment after a half hour.
If it indicates "Port 8080 not available" it will sit on "Please wait a moment" forever.
EDIT: Still waiting a moment after a half hour.
goto your firewall and get the PID goto shell and kill PID
in opnsense it is settings->diagnostics->activity
bin/mongod --dbpath /usr/local/UniFi/data
or check all with unifi after killing the pid in shell try to run again or run installer script if a bad install
This is what is turning up: 82115 root 20 0 10G 581M kqread 3 0:00 0.00% /usr/local/openjdk17/bin/java --add-opens=java.base/java.time=ALL-UNNAMED -jar /usr/local/UniFi/lib/ace.jar start{http-nio-8080-Polle}
It's that ace.jar that the script supposed to kill.
yes normally I kill that and rerun the installer script or just start the installed script. but if the app itself is hanging, this might not work, but you can try
Seeing these over and over and over: 82115 root 20 0 10G 582M uwait 7 0:00 0.00% /usr/local/openjdk17/bin/java --add-opens=java.base/java.time=ALL-UNNAMED -jar /usr/local/UniFi/lib/ace.jar start{mongo-db}
killing 1 should kill all but maybe it is an issue with mongodb hanging or not laoding completely have you tried a clean install?
Finally got the sumbitch to work.
Alright, you have to be on pFsense Plus, 23.09.1. OpenSSL 3.0.12 (CE 2.7.2 will probably work too).
DO NOT install an old mongodb from FreeBSD 13 - you don't need it.
You DO however need a newer version of mongodb for FreeBSD 14, as the version linked is no longer there.
I used this command to get it to install: /usr/sbin/pkg add -f "https://repo.nepustil.net/FreeBSD:14:amd64/.latest/All/mongodb44-4.4.28.pkg"
Once it installs, you have to create a local copy of the install script so you can modify it. I installed nano, went in and commented out the line: AddPkg ${CURRENT_MONGODB_VERSION}
Don't forget to run chmod +x on the script. Then you just need to run "sh install-unifi.sh".
Then the script completes and UniFi will run, and you can restore your backup.
Now, I suspect the reason my ports were blocked may have been pfBlockerNG.
You have to go into Firewall / pfBlockerNG / DNSBL and set your DNSBL Webserver Configuration to not conflict with UniFi. Set your port to 8081 and your SSL port to 8444.
I think that was the final obstacle. Now the current version 8.1.104 is running once again.
Hope this helps.
does this mean the script is getting incorrect or invalid mongoDB links? or getting the package with the invalid mongoDB?
the install script should have supposedly check the type of system, modified the package URL and downloaded the correct one.
maybe could some check if the listed repo is mostly late in updating
Script worked perfectly this time. Thank you!
Script worked perfectly this time. Thank you!
may we know your firewall version/base?
8.1.107 works fine on pfSense plus 23.09.1-RELEASE
I am on 23.09.1
Version 8.1.111 works properly on pfSense plus 23.09.1
Version 8.1.113 works perfectly on pfSense plus 23.09.1
8.1.122 works perfectly on pfSense plus 23.09.1 :)
working on OPNsense 24.1.4-amd64 FreeBSD 13.2-RELEASE-p10 OpenSSL 3.0.13
Tested on... OPNsense 24.1.5_3-amd64 FreeBSD 13.2-RELEASE-p11 OpenSSL 3.0.13
8.1.124 works perfectly on pfSense plus 23.09.1
Thank you.
8.1.127 works perfectly on pfSense plus 23.09.1
Thank you.
To work on PFSense 2.7 follow FIX/Work around SEE #328 beta UniFi Network Application 8.6.3 Firmware Overview/Details Install command: fetch -o - https://t.ly/AlEhP | sh -s
beta UniFi Network Application 8.5.1 Firmware Overview/Details Install command: fetch -o - https://t.ly/DPn0b | sh -s
beta UniFi Network Application 8.4.62 Firmware Overview/Details Install command: fetch -o - https://rb.gy/f69du8 | sh -s
beta UniFi Network Application 8.4.59 Firmware Overview/Details Install command: fetch -o - https://rb.gy/354l9q | sh -s
beta UniFi Network Application 8.3.32 Firmware Overview/Details Install command: fetch -o - https://shorturl.at/1f44U | sh -s
beta UniFi Network Application 8.3.28 Firmware Overview/Details Install command: fetch -o - https://shorturl.at/ygJGt | sh -s
beta UniFi Network Application 8.3.20 Firmware Overview/Details Install command: fetch -o - https://shorturl.at/bUwZ9 | sh -s
beta UniFi Network Application 8.2.93 Firmware Overview/Details Install command: fetch -o - https://t.ly/yQxHQ | sh -s
beta UniFi Network Application 8.2.92 Firmware Overview/Details Install command: fetch -o - https://t.ly/xs1vH | sh -s
beta UniFi Network Application 8.2.87 Firmware Overview/Details Install command: fetch -o - https://t.ly/G6itS | sh -s
beta UniFi Network Application 8.1.127 Firmware Overview/Details Install command: fetch -o - https://t.ly/EPR0K | sh -s NOTE: Make backup first, failed update on OPNsense
beta UniFi Network Application 8.1.124 Firmware Overview/Details Install command: fetch -o - https://t.ly/HB5WH | sh -s
beta UniFi Network Application 8.1.122 Firmware Overview/Details Install command: fetch -o - https://t.ly/mYbiJ | sh -s
beta UniFi Network Application 8.1.113 Firmware Overview/Details Install command: fetch -o - https://t.ly/ndYxT | sh -s
beta UniFi Network Application 8.1.111 Firmware Overview/Details Install command: fetch -o - https://t.ly/BKLXa | sh -s
beta UniFi Network Application 8.1.107 Firmware Overview/Details Install command: fetch -o - https://t.ly/Gh07R | sh -s
beta UniFi Network Application 8.1.104 Firmware Overview/Details Install command: fetch -o - https://t.ly/t3xOo | sh -s
beta UniFi Network Application 8.0.28 Firmware Overview/Details Install command: fetch -o - https://t.ly/wpfzJ | sh -s
beta UniFi Network Application 8.0.26 Firmware Overview/Details Install command: fetch -o - https://t.ly/VkdKY | sh -s
beta UniFi Network Application 8.0.24 Firmware Overview/Details Install command: fetch -o - https://rb.gy/4iq0kr | sh -s Install command: fetch -o - https://t.ly/jDsQe | sh -s
beta UniFi Network Application 8.0.21 Firmware Overview/Details Install command: fetch -o - https://rb.gy/xxesox | sh -s Install command: fetch -o - https://t.ly/DIwbq | sh -s *changed to https://rb.gy due to issued with https://shorturl.at
beta UniFi Network Application 8.0.7 Firmware Overview/Details Install command: fetch -o - https://rb.gy/5p8f1o | sh -s Install command: fetch -o - https://shorturl.at/pqsuG | sh -s changed to www.shorturl.at due to issued with tinyurl.com unifi.sh modification NOT required, commited to main branch already
beta UniFi Network Application 8.0.6 Firmware Overview/Details Install command: fetch -o - https://rb.gy/6eirx2 | sh -s Install command: fetch -o - https://shorturl.at/ckGO6 | sh -s *unifi.sh modification NOT required, commited to main branch already
beta UniFi Network Application 8.0.2 Firmware Overview/Details Install command: fetch -o - https://rb.gy/qfb8or | sh -s Install command: fetch -o - https://shorturl.at/fnEGU | sh -s
Other required changes working for opnsense 23: saw some posted this fix for the log errors in the main Unifi forums page... by User "doestergaard" view post
/usr/local/etc/rc.d/unifi.sh Try appending --add-opens=java.base/java.time=ALL-UNNAMED to your execstart: ExecStart=/usr/bin/java --add-opens=java.base/java.time=ALL-UNNAMED -jar /opt/UniFi/lib/ace.jar using winscp I modified
to