unofficial-unifi / unifi-pfsense

A script that installs the UniFi Controller software on pfSense and other FreeBSD systems
BSD 2-Clause "Simplified" License
755 stars 245 forks source link

beta UniFi Network Application 8.6.3 #332

Open tong2x opened 1 year ago

tong2x commented 1 year ago

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

    # So we start it in the background and stash the pid:
    /usr/local/bin/java -jar /usr/local/UniFi/lib/ace.jar start &

to

    # So we start it in the background and stash the pid:
    /usr/local/bin/java --add-opens=java.base/java.time=ALL-UNNAMED -jar /usr/local/UniFi/lib/ace.jar start &
tong2x commented 6 months ago

tested on... OPNsense 24.1.7_4-amd64 FreeBSD 13.2-RELEASE-p11 OpenSSL 3.0.13

CryptoSiD commented 6 months ago

Version 8.2.87 tested on pfSense 24.03-RELEASE, working perfectly!

CryptoSiD commented 6 months ago

Version 8.2.93 tested on pfSense 24.03-RELEASE, working perfectly!

tong2x commented 5 months ago

tested on OPNSENSE OPNsense 24.1.8-amd64 FreeBSD 13.2-RELEASE-p11 OpenSSL 3.0.13

CryptoSiD commented 5 months ago

Version 8.3.20 tested on pfSense Plus 24.03-RELEASE, working perfectly!

tong2x commented 4 months ago

Note working any more on OPNSense 24.7 FreeBSD 14.1 github

tong2x commented 3 months ago

installer installed correctly in OPNSENSE 24.7.1 but seem mongoDB is hanging... tried mongoDB 7.0 had problems also hanging, revert to to mongoDB 5.0 please try in PFsense

I have also tried clean install, no go still

n3IVI0 commented 3 months ago

It's borked. Controller won't start. Can't roll back to previous version.

dvdp commented 3 months ago

Church the mongo log - most likely feature level issue. Downgrade mongo, change feature level an upgrade again.

On August 21, 2024 12:36:19 PM GMT+02:00, n3IVI0 @.***> wrote:

It's borked. Controller won't start. Can't roll back to previous version.

-- Reply to this email directly or view it on GitHub: https://github.com/unofficial-unifi/unifi-pfsense/pull/332#issuecomment-2301722369 You are receiving this because you are subscribed to this thread.

Message ID: @.***> -- Verstuurd vanaf mijn Android apparaat met K-9 Mail. Excuseer mijn beknoptheid.

dvdp commented 3 months ago

... happened to me too, the install script is not updating the FeatureCompatibilityVersion. I had mongodb42 running and after mongodb50 got installed, mongod wouldn't start anymore complaining about the FeatureCompatibilityVersion. So I installed mongodb44 from [ https://pkg.freebsd.org/FreeBSD:14:amd64/quarterly/ | https://pkg.freebsd.org/FreeBSD:14:amd64/quarterly/ ] which made mongod start again. Next set the FeatureCompatibilityVersion to 4.4 (was 4.2) and after that I upgraded to mongodb50 and set the FeatureCompatibilityVersion to 5.0 Things are working fine now. I had another system that was running mongodb44, it successfully upgraded to mongodb50 but it did not update the FeatureCompatibilityVersion - updated that one to to 5.0.

Van: "n3IVI0" @.> Aan: "unofficial-unifi/unifi-pfsense" @.> Cc: "Subscribed" @.***> Verzonden: Woensdag 21 augustus 2024 12:36:19 Onderwerp: Re: [unofficial-unifi/unifi-pfsense] beta UniFi Network Application 8.4.59 (PR #332)

It's borked. Controller won't start. Can't roll back to previous version.

— Reply to this email directly, [ https://github.com/unofficial-unifi/unifi-pfsense/pull/332#issuecomment-2301722369 | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/ABEX3MQXJOSIPYRLBOKGJBLZSRUSHAVCNFSM6AAAAAA6TUKKTKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBRG4ZDEMZWHE | unsubscribe ] . You are receiving this because you are subscribed to this thread. Message ID: @.***>

tong2x commented 3 months ago

was able to start Unifi controller Opnsense 24.7.1, clean install and installed it twice and let it sit for more than 2 hours... image

@dvdp how do you set compability mode via command?

could you post command also to uninstall and install mongoDB? via command line

n3IVI0 commented 3 months ago

pkg add https://pkg.freebsd.org/FreeBSD:14:amd64/quarterly/All/mongodb44-4.4.29.pkg Fetching mongodb44-4.4.29.pkg: 100% 42 MiB 4.9MB/s 00:09
Installing mongodb44-4.4.29... pkg: wrong architecture: FreeBSD:14:amd64 instead of FreeBSD:15:amd64 Failed to install the following 1 package(s): https://pkg.freebsd.org/FreeBSD:14:amd64/quarterly/All/mongodb44-4.4.29.pkg

Can't install mongodb44

tong2x commented 3 months ago

ithink that was the initial failure in freebsd14, mongodb44. hence I first switch to mongodb70, which should be compatible to unifi controller 8.1

n3IVI0 commented 3 months ago

I can see the changes in the script. Does it take 2 hours for the controller to start every time?

dvdp commented 3 months ago

You're on FreeBSD 15 - unlike me, I'm on 14 So you'll need to dig up the correct package for that version

Van: "n3IVI0" @.> Aan: "unofficial-unifi/unifi-pfsense" @.> Cc: "danny vandepol" @.>, "Mention" @.> Verzonden: Woensdag 21 augustus 2024 14:23:01 Onderwerp: Re: [unofficial-unifi/unifi-pfsense] beta UniFi Network Application 8.4.59 (PR #332)

pkg add [ https://pkg.freebsd.org/FreeBSD:14:amd64/quarterly/All/mongodb44-4.4.29.pkg | https://pkg.freebsd.org/FreeBSD:14:amd64/quarterly/All/mongodb44-4.4.29.pkg ] Fetching mongodb44-4.4.29.pkg: 100% 42 MiB 4.9MB/s 00:09 Installing mongodb44-4.4.29... pkg: wrong architecture: FreeBSD:14:amd64 instead of FreeBSD:15:amd64 Failed to install the following 1 package(s): [ https://pkg.freebsd.org/FreeBSD:14:amd64/quarterly/All/mongodb44-4.4.29.pkg | https://pkg.freebsd.org/FreeBSD:14:amd64/quarterly/All/mongodb44-4.4.29.pkg ]

Can't install mongodb44

— Reply to this email directly, [ https://github.com/unofficial-unifi/unifi-pfsense/pull/332#issuecomment-2301921699 | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/ABEX3MR46F3RGMK6NIGOOLLZSSBCLAVCNFSM6AAAAAA6TUKKTKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBRHEZDCNRZHE | unsubscribe ] . You are receiving this because you were mentioned. Message ID: @.***>

n3IVI0 commented 3 months ago

I am on pfSense 24.03. Which uses FreeBSD 15.

dvdp commented 3 months ago

In one shell start mongod (adapt the db path if needed to match your setup)

mongod --port 27117 -dbpath /usr/local/UniFi/data/db

if your mongodb binary is supported by the featureCompatibilityVersion in the db it will keep on running

if not it will shutdown and return to the command prompt, if so uninstall and install the required version

In another shell launch

mongo --port 27117

this will give you an interactive mongo shell, then to check the current setting enter

db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )

change to e.g. 4.4 with

db.adminCommand( { setFeatureCompatibilityVersion: "4.4", } )

and check it again if you like and finally

exit

Van: "tong2x" @.> Aan: "unofficial-unifi/unifi-pfsense" @.> Cc: "danny vandepol" @.>, "Mention" @.> Verzonden: Woensdag 21 augustus 2024 14:22:14 Onderwerp: Re: [unofficial-unifi/unifi-pfsense] beta UniFi Network Application 8.4.59 (PR #332)

was able to start Unifi controller Opnsense 24.7.1, clean install and installed it twice and let it sit for more than 2 hours... [ https://github.com/user-attachments/assets/3c23d79e-7fbe-49e0-b67f-a54b63e1bc5b | image.png (view on web) ]

[ https://github.com/dvdp | @dvdp ] how do you set compability mode via command?

could you post command also to uninstall and install mongoDB? via command line

— Reply to this email directly, [ https://github.com/unofficial-unifi/unifi-pfsense/pull/332#issuecomment-2301920116 | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/ABEX3MRKOP7J6O3UFEVRI5DZSSA7NAVCNFSM6AAAAAA6TUKKTKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBRHEZDAMJRGY | unsubscribe ] . You are receiving this because you were mentioned. Message ID: @.***>

dvdp commented 3 months ago

If you have a huge history, the database conversion could take quite a while I guess, stop and start again to find out ... (I'm running a db prune job every now and then to reduce the history)

Van: "n3IVI0" @.> Aan: "unofficial-unifi/unifi-pfsense" @.> Cc: "danny vandepol" @.>, "Mention" @.> Verzonden: Woensdag 21 augustus 2024 14:33:44 Onderwerp: Re: [unofficial-unifi/unifi-pfsense] beta UniFi Network Application 8.4.59 (PR #332)

I can see the changes in the script. Does it take 2 hours for the controller to start every time?

— Reply to this email directly, [ https://github.com/unofficial-unifi/unifi-pfsense/pull/332#issuecomment-2301943363 | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/ABEX3MWM3PDP37MS6F66NMDZSSCKRAVCNFSM6AAAAAA6TUKKTKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBRHE2DGMZWGM | unsubscribe ] . You are receiving this because you were mentioned. Message ID: @.***>

dvdp commented 3 months ago

So check in the logs what compatibility level you have and find a mongodb package for one above that version (not sure how many you can skip before it starts complaining - check the mongodb website for that maybe)

Van: "n3IVI0" @.> Aan: "unofficial-unifi/unifi-pfsense" @.> Cc: "danny vandepol" @.>, "Mention" @.> Verzonden: Woensdag 21 augustus 2024 14:47:00 Onderwerp: Re: [unofficial-unifi/unifi-pfsense] beta UniFi Network Application 8.4.59 (PR #332)

I am on pfSense 24.03. Which uses FreeBSD 15.

— Reply to this email directly, [ https://github.com/unofficial-unifi/unifi-pfsense/pull/332#issuecomment-2301969836 | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/ABEX3MXF4B6ZHLZEZXUO7Q3ZSSD4JAVCNFSM6AAAAAA6TUKKTKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBRHE3DSOBTGY | unsubscribe ] . You are receiving this because you were mentioned. Message ID: @.***>

dvdp commented 3 months ago

For the commands to uninstall/install I just grabbed some lines from the install-unifi.sh script As I mentioned before, this worked for me on FreeBSD 14 to go back from 5.0 to 4.4 with 4.4 allowing me to step feature level from 4.2 to 4.4

get into an interactive shell

/bin/sh

unlock and remove

pkg unlock -yq mongodb50 pkg remove -yq mongodb50

removed mongodb50 from the list since that one was not working for my featureCompatibilityVersion 4.2

SUPPORTED_MONGODB_PACKAGES="mongodb44 mongodb42 mongodb40 mongodb" ABI=/usr/sbin/pkg config abi FREEBSD_PACKAGE_URL="https://pkg.freebsd.org/${ABI}/quarterly/"

I changed latest to quarterly - that one contains mongodb44

Build a list of possible packagesite.* URLs

for ext in pkg txz; do FREEBSD_PACKAGE_LIST_URLS="$FREEBSD_PACKAGE_LIST_URLS ${FREEBSD_PACKAGE_URL}packagesite.${ext}" done

Try each of the URLs in the list and exit if they all fail

if ! fetch -q1o - $FREEBSD_PACKAGE_LIST_URLS > packagesite.pkg 2> /dev/null; then echo "Error downloading $FREEBSD_PACKAGE_LIST_URLS" exit 1 fi tar fx packagesite.pkg || exit 1

Find the latest supported mongodb version that's available in the repository

for package_name in $SUPPORTED_MONGODB_PACKAGES; do if grep -q "\"name\":\"$package_name\"" packagesite.yaml; then CURRENT_MONGODB_VERSION="$package_name" break fi done

check the result - I needed mongodb44 so it should print that version

echo $ CURRENT_MONGODB_VERSION

if that matches the version you need, continue

pkgname=$ CURRENT_MONGODB_VERSION base_url=${2:-$FREEBSD_PACKAGE_URL} pkginfo=grep "\"name\":\"$pkgname\"" packagesite.yaml pkgvers=echo $pkginfo | pcregrep -o1 '"version":"(.*?)"' | head -1 pkgurl="${base_url}echo $pkginfo | pcregrep -o1 '"path":"(.*?)"' | head -1"

one more check - this should print the full path to the pkg file

echo $pkgurl

if you like what you see, install and lock

/usr/sbin/pkg add -f "$pkgurl" pkg lock $pkgname

and finally exit the shell

exit

After all this, I used pretty much the same code to go from 4.4 to 5.0

Van: "tong2x" @.> Aan: "unofficial-unifi/unifi-pfsense" @.> Cc: "danny vandepol" @.>, "Mention" @.> Verzonden: Woensdag 21 augustus 2024 14:22:14 Onderwerp: Re: [unofficial-unifi/unifi-pfsense] beta UniFi Network Application 8.4.59 (PR #332)

was able to start Unifi controller Opnsense 24.7.1, clean install and installed it twice and let it sit for more than 2 hours... [ https://github.com/user-attachments/assets/3c23d79e-7fbe-49e0-b67f-a54b63e1bc5b | image.png (view on web) ]

[ https://github.com/dvdp | @dvdp ] how do you set compability mode via command?

could you post command also to uninstall and install mongoDB? via command line

— Reply to this email directly, [ https://github.com/unofficial-unifi/unifi-pfsense/pull/332#issuecomment-2301920116 | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/ABEX3MRKOP7J6O3UFEVRI5DZSSA7NAVCNFSM6AAAAAA6TUKKTKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBRHEZDAMJRGY | unsubscribe ] . You are receiving this because you were mentioned. Message ID: @.***>

dvdp commented 3 months ago

Did a quick check, [ http://pkg.freebsd.org/FreeBSD:15:amd64/latest/ | http://pkg.freebsd.org/FreeBSD:15:amd64/latest/ ] contains mongodb60, 70 and 80 ...

Van: "danny vandepol" @.> Aan: "unofficial-unifi/unifi-pfsense" @.> Verzonden: Woensdag 21 augustus 2024 14:33:24 Onderwerp: Re: [unofficial-unifi/unifi-pfsense] beta UniFi Network Application 8.4.59 (PR #332)

You're on FreeBSD 15 - unlike me, I'm on 14 So you'll need to dig up the correct package for that version

Van: "n3IVI0" @.> Aan: "unofficial-unifi/unifi-pfsense" @.> Cc: "danny vandepol" @.>, "Mention" @.> Verzonden: Woensdag 21 augustus 2024 14:23:01 Onderwerp: Re: [unofficial-unifi/unifi-pfsense] beta UniFi Network Application 8.4.59 (PR #332)

pkg add [ https://pkg.freebsd.org/FreeBSD:14:amd64/quarterly/All/mongodb44-4.4.29.pkg | https://pkg.freebsd.org/FreeBSD:14:amd64/quarterly/All/mongodb44-4.4.29.pkg ] Fetching mongodb44-4.4.29.pkg: 100% 42 MiB 4.9MB/s 00:09 Installing mongodb44-4.4.29... pkg: wrong architecture: FreeBSD:14:amd64 instead of FreeBSD:15:amd64 Failed to install the following 1 package(s): [ https://pkg.freebsd.org/FreeBSD:14:amd64/quarterly/All/mongodb44-4.4.29.pkg | https://pkg.freebsd.org/FreeBSD:14:amd64/quarterly/All/mongodb44-4.4.29.pkg ]

Can't install mongodb44

— Reply to this email directly, [ https://github.com/unofficial-unifi/unifi-pfsense/pull/332#issuecomment-2301921699 | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/ABEX3MR46F3RGMK6NIGOOLLZSSBCLAVCNFSM6AAAAAA6TUKKTKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBRHEZDCNRZHE | unsubscribe ] . You are receiving this because you were mentioned. Message ID: @.***>

n3IVI0 commented 1 month ago

I am on pfSense 24.03, FreeBSD 15.

When attempting to run the latest 8.5.1, fetch -o - https://t.ly/DPn0b | sh -s

I get this:

0 B 0 Bpssh: Syntax error: newline unexpected (expecting word)

What does this mean?

This can be bypassed by creating the install script manually via cut and paste. It then runs normally. Everything installs. But then the unifi controller will not start. It seems to hang. Cannot be closed. It waits for unifi service to stop forever.

I am also getting "WARN Unable to load properties from '/usr/local/UniFi/data/system.properties' - /usr/local/UniFi/data/system.properties (No such file or directory)" in the CLI.

I suspect this is the same problem of mongodb not starting, needing to rollback to mongodb44. Is this still the case?

If so, how do I rollback to mongodb44 on FreeBSD 15?

tong2x commented 1 month ago

this is now using a higher mongodb 5.0 version due to freebsd14 but there seems to be a problem somewhere

tong2x commented 1 month ago

fix the mongodb install issues on 2.7.0

328

please check out thread there is instruction to reinstall mongoDB

I am on pfSense 24.03, FreeBSD 15.

When attempting to run the latest 8.5.1, fetch -o - https://t.ly/DPn0b | sh -s

I get this:

0 B 0 Bpssh: Syntax error: newline unexpected (expecting word)

What does this mean?

This can be bypassed by creating the install script manually via cut and paste. It then runs normally. Everything installs. But then the unifi controller will not start. It seems to hang. Cannot be closed. It waits for unifi service to stop forever.

I am also getting "WARN Unable to load properties from '/usr/local/UniFi/data/system.properties' - /usr/local/UniFi/data/system.properties (No such file or directory)" in the CLI.

I suspect this is the same problem of mongodb not starting, needing to rollback to mongodb44. Is this still the case?

If so, how do I rollback to mongodb44 on FreeBSD 15?

n3IVI0 commented 1 month ago

Will this work with the current version of pfSense+ / FreeBSD 15?

Running the current script under 24.03 gives this:

9028 B 7713 kBps 00s ld-elf.so.1: /usr/local/bin/mongod: Undefined symbol "_ZNSt13exception_ptr31__from_native_exception_pointerEPv"

But proceeds with install. Still hanging.

n3IVI0 commented 1 month ago

Hey. Check this out: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277990

Seems the new mongodb50 is not compatible with our CPUs. This is the source of the illegal character errors. And why unifi hangs.

n3IVI0 commented 1 month ago

Yep, my CPU is non-AVX:

grep -i -e features -e avx /var/run/dmesg.boot Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE> Features2=0x43d8e3bf<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,MOVBE,POPCNT,TSCDLT,AESNI,RDRAND> AMD Features=0x28100800<SYSCALL,NX,RDTSCP,LM> AMD Features2=0x101<LAHF,Prefetch> Structured Extended Features=0x2282<TSCADJ,SMEP,ERMS,NFPUSG> Structured Extended Features3=0xc000000<IBPB,STIBP> ZFS storage pool version: features support (5000) Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE> Features2=0x43d8e3bf<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,MOVBE,POPCNT,TSCDLT,AESNI,RDRAND> AMD Features=0x28100800<SYSCALL,NX,RDTSCP,LM> AMD Features2=0x101<LAHF,Prefetch> Structured Extended Features=0x2282<TSCADJ,SMEP,ERMS,NFPUSG> Structured Extended Features3=0xc000400<MD_CLEAR,IBPB,STIBP>

We need a version of mongodb50 that is compiled for non-AVX CPUs to work with these newer versions of the unifi controller.

n3IVI0 commented 1 month ago

Here is one: https://github.com/GermanAizek/mongodb-without-avx

Not sure how to integrate this.

These guys have some premade builds: https://github.com/turnkeylinux/tracker/issues/1724 --> https://dist.flakybit.net/mongodb/

tong2x commented 1 month ago

would newer mongodb work? monggodb44 is not working in freebsd14 they say though some have tried the reinstalling outside the script

n3IVI0 commented 1 month ago

All mongodb newer than 44 requires a CPU with AVX support. The only workaround it seems is to compile with noavx. I tried both 6 and 7 to confirm - everything 5 and newer requires AVX CPUs. I have an Intel Atom CPU in my pfSense box. So I cannot run the unifi controller if it requires mongodb 5 or newer, which is the case on FreeBSD15. I am stuck. Anybody with older CPUs is going to be in the same boat. It's a pickle.

CryptoSiD commented 1 month ago

My CPU, Intel e3-8100, has AVX instructions and mongodb50 or mongodb60 won't start anyway.

The error is: ld-elf.so.1: /usr/local/bin/mongod: Undefined symbol "_ZNSt13exception_ptr31__from_native_exception_pointerEPv"

tong2x commented 1 month ago

how bout force install of mongodb44?

Fry-kun commented 3 weeks ago

Seems like mongodb44 is not available anymore. How about mongodb50-5.0.28? That version seems to be working fine

tong2x commented 3 weeks ago

Seems like mongodb44 is not available anymore. How about mongodb50-5.0.28? That version seems to be working fine

some users are reporting that mongodB 5.0 and up required a secure CPU, which most cheap 3years old above ptocessors are not capable. anyone code modify code in which mongodb 44 will be installed via freebsd13?

Fry-kun commented 3 weeks ago

Seems like mongodb44 is not available anymore. How about mongodb50-5.0.28? That version seems to be working fine

some users are reporting that mongodB 5.0 and up required a secure CPU, which most cheap 3years old above ptocessors are not capable. anyone code modify code in which mongodb 44 will be installed via freebsd13?

To clarify, I have CPUs without AVX. One of my routers was using mongodb50-5.0.28 (from earlier upgrade) -- and that version is compatible. The 2nd router I just tried to upgrade -- and mongodb50-5.0.29 failed to start. I didn't find any official way of getting 5.0.28 or 4.4.*, so I copied over binaries from my other router for now.

My point was that 5.0.28 seems to be ok to use, so you don't have to go all the way back to 4.4.*

Aside, even 5.0 is noted as being EOL. If you're you able to make unifi server accept newer versions, 6.0 or even 7.0 would seem like a better choice.

CryptoSiD commented 16 hours ago

Version 8.6.3 is working fine with pfSense plus 24.11.

I suspect the MongoDB package installed by the script isn't compatible with the FreeBSD kernel of pfSense plus 24.03.