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

Failed to install the following 1 package(s): https://pkg.freebsd.org/FreeBSD:14:amd64/latest/ #323

Open sriegodedios opened 1 year ago

sriegodedios commented 1 year ago

When I try install on the latest script, I keep getting: Mounting new filesystems... done. Gathering package list from remote repository... Done. Removing discontinued packages... done. Installing required packages... Package png-1.6.39 already installed. Package brotli-1.0.9,1 already installed. Package freetype2-2.12.1_2 already installed. Package fontconfig-2.14.2,1 already installed. Package alsa-lib-1.2.2_1 already installed. Package mpdecimal-2.5.1 already installed. Package python37- already installed. Package libfontenc-1.1.4 already installed. Package mkfontscale-1.2.1 already installed. Package dejavu-2.37_1 already installed. Package giflib-5.2.1 already installed. Package xorgproto-2022.1_1 already installed. Package libXdmcp-1.1.3 already installed. Fetching : 100% 2 KiB 2.3kB/s 00:01 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/

tong2x commented 1 year ago

related to freebsd 14 #320

fabriciocampos2022 commented 1 year ago

use the script from https://github.com/DirectXMan12/unifi-pfsense/blob/3dcf6016f8c318ea4c4115aabe6395a43fd8e807/install-unifi/install-unifi.sh

tong2x commented 1 year ago

@fabriciocampos2022 did this work for pfsense 2.7?

fabriciocampos2022 commented 1 year ago

yes. pfsense 2.7

Lucero7919 commented 1 year ago

yes. pfsense 2.7

Are there instructions for installing the script from that branch in pfsense? Using the normal link still produces the error.

tong2x commented 1 year ago

yes. pfsense 2.7

Are there instructions for installing the script from that branch in pfsense? Using the normal link still produces the error.

325

Lucero7919 commented 1 year ago

Reference

Hi there, getting these error lines, then a hang when following that script

Exception in thread "launcher" java.lang.NullPointerException: Web context failed to initialize at java.base/java.util.Objects.requireNonNull(Objects.java:235) at com.ubnt.net.C.ÖÒ0000(Unknown Source) at com.ubnt.net.C.Òo0000(Unknown Source) at com.ubnt.service.ooOO.øÓ0000(Unknown Source) at com.ubnt.ace.Launcher.Ó00000(Unknown Source) at com.ubnt.ace.Launcher.main(Unknown Source)

Lucero7919 commented 1 year ago

Just asking if anyone is actually looking at this issue as it's a show stopper for me at home. If not, I'm going to have to look at another solution for my ProtectLi box running PFSense. I wish I was clever enough to fix it myself, but I'm not. Please help the community and try to spare some time to assist with this issue.

tong2x commented 1 year ago

there is a pull request that should have somewhat allowed 7.5sereis in PFSense 2.7 but no concreate script yet. it is beyond my knowledge unfortunately...

last stable 7.4.162 for both opnsense and pfsense

Lucero7919 commented 1 year ago

there is a pull request that should have somewhat allowed 7.5sereis in PFSense 2.7 but no concreate script yet. it is beyond my knowledge unfortunately...

last stable 7.4.162 for both opnsense and pfsense

Thank you. What would be the steps for installing the PR?

Or, do I go back to installing 7.4.162 and if so, what pfsense version do I need to be running?

tong2x commented 1 year ago

311 is the latest script with the most recent running Unifi Firmware 7.4.162

325 is and attempt to integrate fix by [DirectXMan12] #328

unfortunately I think I failed following his changes, but [DirectXMan12] seemed to have reported success in #328 still hoping for someone with more knowledge to correct the issues (no easy installation script yet #328, if I have more time I will try to create a install script/link)

from the comments, it would seem that in PFsense 2.7 mongodb uses difference libcrypt that cuases error. 7.5 also fails in opnsense 23 more on the log

7.4.162 should work for opensense 23 or lower or pfsense 2.6 or lower (not much feedback in 2.7, but seems to have issue with mongodb)

Lucero7919 commented 1 year ago

311 is the latest script with the most recent running Unifi Firmware 7.4.162

325 is and attempt to integrate fix by [DirectXMan12] #328 unfortunately I think I failed following his changes, but [DirectXMan12] seemed to have reported success in #328 still hoping for someone with more knowledge to correct the issues (no easy installation script yet #328, if I have more time I will try to create a install script/link)

from the comments, it would seem that in PFsense 2.7 mongodb uses difference libcrypt that cuases error. 7.5 also fails in opnsense 23 more on the log

7.4.162 should work for opensense 23 or lower or pfsense 2.6 or lower (not much feedback in 2.7, but seems to have issue with mongodb)

Thank you tong2x. When I install back to pfsense2.6 and try the install script, pfsense stops as it says it needs to update to pfsense2.7 (or some such error, I can't quite remember). How to I stop pfsense from package checking and seeing the install to 2.7

tong2x commented 1 year ago

for that you might need to check out the pfsense forum (I am using Opnsense, in opensense there is an option in the settings not to check for updates autoamtically), but there should be an option not to upgrade and not to check.

Lucero7919 commented 1 year ago

for that you might need to check out the pfsense forum (I am using Opnsense, in opensense there is an option in the settings not to check for updates autoamtically), but there should be an option not to upgrade and not to check.

Hmm, on a clean 2.6.0 trying to run #311 7.4.162 using: fetch -o - https://tinyurl.com/yc5nv7fs | sh -s

and I get the immediate following error: FreeBSD pkgng not installed. Installing... pkg already bootstrapped at /usr/local/sbin/pkg done. ERROR: pkgng installation failed. Exiting.

tong2x commented 1 year ago

300 could be this issue?

or

228 or check this

Lucero7919 commented 1 year ago

300 could be this issue? or #228 or check this

The issue was to ensure pfSense is set to the deprecated branch (System > Update > Update Settings > Branch). However, I am still hitting an error now when the script completes:

WARN Unable to load properties from '/usr/local/UniFi/data/system.properties' - /usr/local/UniFi/data/system.properties (No such file or directory)
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.catalina.loader.WebappClassLoaderBase (file:/usr/local/UniFi/lib/tomcat-embed-core-9.0.65.jar) to field java.io.ObjectStreamClass$Caches.localDescs
WARNING: Please consider reporting this to the maintainers of org.apache.catalina.loader.WebappClassLoaderBase
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

No idea really where to go from here

WillieWookiee commented 1 year ago

I have a working solution. It is using mongodb 3.6 and there is a modification to the service for Java we need to do. With a combination of DirectXMan's solution and what I said above, it works!!

This also uses the latest 7.5 firmware and 2.7.

I will be posting the PR later tonight.

Lucero7919 commented 1 year ago

I have a working solution. It is using mongodb 3.6 and there is a modification to the service for Java we need to do. With a combination of DirectXMan's solution and what I said above, it works!!

This also uses the latest 7.5 firmware and 2.7.

I will be posting the PR later tonight.

How did you get on?

WillieWookiee commented 1 year ago

I didn't have time to work on it, but planning to over the weekend.

sikysikov commented 1 year ago

Any progress?

tong2x commented 1 year ago

fix for opnsense to use latest

326

please test on pfsense though pfsense has a different issue with ssl just need tester maybe we could come up with alitle progress

sikysikov commented 1 year ago

Installation went fine, but still "HTTP Status 404 – Not Found" error...

tong2x commented 1 year ago

For clarify you used #326 And using PFSense 2.7, correct?

sikysikov commented 1 year ago

On 2.7 used:

beta UniFi Network Application 7.5.187 Firmware Overview/Details Install command: fetch -o - https://tinyurl.com/44v7wa2n | sh -s

cdolin805 commented 1 year ago

On 2.7 used:

beta UniFi Network Application 7.5.187 Firmware Overview/Details Install command: fetch -o - https://tinyurl.com/44v7wa2n | sh -s

This worked for me after a clean install of pfSense 2.7.1

tong2x commented 11 months ago

fix for some PFSense 2.7 follow #328

for the latest Unifi Controller #332

slmingol commented 10 months ago

Clean install of 2.7.1 and this fetch -o - https://tinyurl.com/44v7wa2n | sh -s wfm.

Menethoran commented 10 months ago

Clean install of 2.7.1 and this fetch -o - https://tinyurl.com/44v7wa2n | sh -s wfm.

Clean install of 2.7.2 and fetch -o - https://tinyurl.com/44v7wa2n | sh -s worked for me as well

Hotwire commented 10 months ago

Clean install of 2.7.1 and this fetch -o - https://tinyurl.com/44v7wa2n | sh -s wfm.

Clean install of 2.7.2 and fetch -o - https://tinyurl.com/44v7wa2n | sh -s worked for me as well

It is giving me an error after running the script as root, it completes and trys to start unifi.sh... but I get this error.

eval: /usr/local/bin/java: Permission denied

Menethoran commented 10 months ago

Clean install of 2.7.1 and this fetch -o - https://tinyurl.com/44v7wa2n | sh -s wfm.

Clean install of 2.7.2 and fetch -o - https://tinyurl.com/44v7wa2n | sh -s worked for me as well

It is giving me an error after running the script as root, it completes and trys to start unifi.sh... but I get this error.

eval: /usr/local/bin/java: Permission denied

What version PfSense are you on?

Hotwire commented 10 months ago

Clean install of 2.7.1 and this fetch -o - https://tinyurl.com/44v7wa2n | sh -s wfm.

Clean install of 2.7.2 and fetch -o - https://tinyurl.com/44v7wa2n | sh -s worked for me as well

It is giving me an error after running the script as root, it completes and trys to start unifi.sh... but I get this error. eval: /usr/local/bin/java: Permission denied

What version PfSense are you on?

Version | 2.7.2-RELEASE (amd64)built on Fri Dec 8 15:55:00 EST 2023FreeBSD 14.0-CURRENT

customshell commented 8 months ago

Clean install of 2.7.1 and this fetch -o - https://tinyurl.com/44v7wa2n | sh -s wfm.

Clean install of 2.7.2 and fetch -o - https://tinyurl.com/44v7wa2n | sh -s worked for me as well

tong2x commented 8 months ago

please try #332 firmwares also and report