Closed StealthNetLabs closed 1 year ago
thank you will have that add on test scripts
btw did Unifi run?
Yes, ran fine.
beta UniFi Network Application 7.4.162 Install command: fetch -o - https://tinyurl.com/3vm9d5cv | sh -s
Works great, used it a few times now.
Not working for me on PFSense 2.7.0.
The script runs to completion but there is an error part way up "Could not locate a valid mongodb package" and no version of MongoDB is installed and running at the end. (Why does the script continue when an essential package can't be installed instead of stopping with a critical error ?)
This results in "HTTP Status 404 – Not Found" when trying to log in.
PFSense 2.7.0 switched to a FreeBSD 14 base instead of FreeBSD 12.3 in 2.6.0.
pkg search mongodb
gives no matches in PFSense 2.7.0 so we might have to install a copy from somewhere else...
Looking further the FreeBSD repository used by PFSense 2.7.0 does have a mongodb44, so adding it to the following line does allow the package to install:
SUPPORTED_MONGODB_PACKAGES="mongodb44 mongodb42 mongodb40 mongodb36 mongodb34 mongodb32 mongodb"
However the wrong version of libcrypto.so and libssl.so are on the system:
[2.7.0-RELEASE][admin@pfSense-Home.lan]/root: mongod
ld-elf.so.1: Shared object "libcrypto.so.30" not found, required by "mongod"
The version on the system is libcrypto.so.111 etc.
I did try to fudge it with symlinks however it then complained about the version of OpenSSL:
[2.7.0-RELEASE][admin@pfSense-Home.lan]/usr/lib: mongod
ld-elf.so.1: /usr/lib/libcrypto.so.30: version OPENSSL_3_0_9 required by /usr/local/bin/mongod not found
A bit stuck at the moment. What is the latest version of mongodb compatible with unifi ? Or are we just missing a package that includes older versions of crypto libraries ?
I also noted that there appears to be an up to date version of the Unifi controller software (package name, Unifi7) in the freebsd 14 repo:
{"name":"unifi7","origin":"net-mgmt/unifi7","version":"7.4.156","comment":"UniFi Controller v7","maintainer":"otis@FreeBSD.org","www":"https://help.ui.com/hc/en-us/categories/200320654-UniFi-Wireless","abi":"FreeBSD:14:*","arch":"freebsd:14:*","prefix":"/usr/local","sum":"addbf7febad146f4a58e2ba2d34b9bfaeda42e449309c332b02d0a443bf16d28","flatsize":232249356,"path":"All/unifi7-7.4.156.pkg","repopath":"All/unifi7-7.4.156.pkg","licenselogic":"single","pkgsize":137941469,"desc":"The UniFi Controller allows you to manage Wireless, Routing & Switching,\nVoIP and Video of Ubiquiti Networks.\n\nWWW: https://help.ui.com/hc/en-us/categories/200320654-UniFi-Wireless","deps":{"mongodb44":{"origin":"databases/mongodb44","version":"4.4.22"},"openjdk11":{"origin":"java/openjdk11","version":"11.0.19+7.1"},"snappyjava":{"origin":"archivers/snappy-java","version":"1.1.7.5"}},"categories":["net-mgmt","java"],"users":["unifi"],"groups":["unifi"],"options":{"EXTERNALDB":"off"},"annotations":{"cpe":"cpe:2.3:a:ui:unifi_controller:7.4.156:::::freebsd14:x64"},"messages":[{"message":"ATTENTION: The mongodb dependency has been changed from 36 to 44, as MongoDB\n3.6 is long out out support and end of life.\n\nOne of implications is that the instance MUST be restored from backup.\n\nThe upgrade path can be as following:\n\n- Take a backup from within the unifi7 application PRIOR to\n updating!\n \n- Stop the unifi7 service (if running)\n \n- Copy the \"backup\" directory from /usr/local/share/java/unifi/data\n to a safe location. Also copy keystore and system.properties if\n you have made any modifications to those files\n \n- Remove files and directories under /usr/local/share/java/unifi/data\n \n- Upgrade the package\n \n- Copy the \"backup\" directory from a safe location back to\n /usr/local/share/java/unifi/data\n \n- Start the service\n \n- Restore the configuration from backup\n\n- Review system.properties and keystore to merge any manual\n modifications you have made (this has to be done with\n the application stopped)","type":"upgrade","maximum_version":"7.3.83"}]}
Are we unable to get this version working on PFSense ? I note that it uses mongodb44.
@DBMandrake last known mongodb is 42, good to know there is 44, pfsense 2.7 is based on freebsd14, the script was modified before to actually get the base architecture and adjust accordingly. based on your help, adding mongodb 44 didnt outright help? have you tried it in clean install? missing or new packages is also what we encountered when the script changed from freebsd12 to freebsd13. and the shift to unifi 7.3x series. unifi 7.3 series required mongodb 4.0 or higher (at that time 4.2)
a code has been added for the script to stop/exit, supposedly on package failure. maybe that is not working as it is.
currently I dont have pfsense 2.7, but I will be taking input of your progress.
btw for 404 not found, try reinstalling script twice or 3 times before running. or waiting for 3 to 5 minutes before loading the site. sometimes unifi takes awhile to load. btw we are on 7.4.156 but this is not the link on the main page yet, it is on the pull request beta 311. does manually running "pkg install libcrypto" works?
could you confirm that by adding mongodb44 there where no error in the script and i run completely?
based on your help, adding mongodb 44 didnt outright help?
could you confirm that by adding mongodb44 there where no error in the script and i run completely?
It installed mongodb44 and ran to completion, but mongodb cannot run due to the version of libcrypto it is looking for not existing, as shown in the error trying to run mongod directly.
btw for 404 not found, try reinstalling script twice or 3 times before running. or waiting for 3 to 5 minutes before loading the site. sometimes unifi takes awhile to load.
That doesn't help - if mongodb is not running I can't see how it could work.
does manually running "pkg install libcrypto" works?
No, not found:
[2.7.0-RELEASE][admin@pfSense-Home.lan]/root: pkg install libcrypto
Updating pfSense-core repository catalogue...
pfSense-core repository is up to date.
Updating pfSense repository catalogue...
pfSense repository is up to date.
All repositories are up to date.
pkg: No packages available to install matching 'libcrypto' have been found in the repositories
There is something unusual about PFSense 2.7.0 compared to previous versions - 2.6.0 was based on FreeBSD 12.3 Stable, however 2.7.0 is based on 14.0 Current, and the ABI of the packages in the PFSense repository does not seem to match the ABI of the FreeBSD 14 repository.
Refer to the following page:
https://docs.netgate.com/pfsense/en/latest/recipes/freebsd-pkg-repo.html
When I try enabling the FreeBSD repo as documented (this documentation pre-dates PFSense 2.7.0 I think) and try to install any packages directly from the FreeBSD repo like libcrypto they are the wrong versions - they are version .30 so's while the packages from the PFSense repo are version .111.
So there is a mismatch - this even breaks pkg itself - I had to disable the FreeBSD repo again and run pkg bootstrap -f
to fix it.
I'm afraid my knowledge of the FreeBSD / PFSense package system is limited, I'm a Linux guy... 🙂
no more update follow #324 instead
Python37 no longer appears on FreeBSD official repos so installer stopped working for me on pfSense 2.6 base.
Changed to "python38" in the package script, ran locally and now it installs fine. You might also consider the python3 meta port/package, not sure if differences between 3.x versions are a problem or not.
Changed to:
AddPkg python38
at line 137.