Package Details: unifi 8.1.113-1

Git Clone URL: https://aur.archlinux.org/unifi.git (read-only, click to copy)
Package Base: unifi
Description: Centralized management system for Ubiquiti UniFi AP
Upstream URL: https://unifi-network.ui.com
Licenses: custom
Conflicts: tomcat-native
Submitter: seblu
Maintainer: freswa
Last Packager: freswa
Votes: 68
Popularity: 0.30
First Submitted: 2017-08-22 01:31 (UTC)
Last Updated: 2024-03-21 18:31 (UTC)

Dependencies (3)

Required by (0)

Sources (6)

Pinned Comments

freswa commented on 2019-10-30 11:50 (UTC)

We are on Stable with this Package. Please flag out-of-date only if the Version provided with this package does not match the version under "Stable" in this link: https://help.ubnt.com/hc/en-us/articles/360008240754#1

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 9 .. 22 Next › Last »

alhirzel commented on 2023-02-08 13:12 (UTC) (edited on 2023-02-08 13:13 (UTC) by alhirzel)

I initially had problems due to package versions, but was able to get it working. I had to clean up the database/logs.

# step 1: install mongodb36-bin java-11-openjdk
# step 2: clean up after my step -1, -2, -3, etc
sudo bash -c 'rm -rf /var/lib/unifi/data/* /var/log/unifi/*'
# step 3: make sure the right Java version is used
sudo -u unifi /usr/lib/jvm/java-11-openjdk/bin/java -jar /usr/lib/unifi/lib/ace.jar start

Thanks @somelucky and @torben for the tips!

somelucky commented on 2023-01-22 21:58 (UTC)

I was continuing to receive the 404 error even after changing to all of the recommendations. It wasn't until the unifi package was re-built while java 11 was defaulted that it finally started. My previous db failed to upgrade, but I was able to recover the configuration autosave. I have the following dependencies installed:

mongodb36-bin java-11-openjdk

torben commented on 2023-01-04 09:25 (UTC)

@scimmia: Ah, didn't realize that. Sorry! Do you know of any other way to start unifi with a specific JVM rather than hardcoding the path? From a package point of view, this is probably a bad idea as we have not only openjdk as an alternative that could be used. I found it error-prone to hope that the system-wide java version is set correctly :-/

Scimmia commented on 2023-01-02 17:02 (UTC)

torben, ignore what the AUR page says, the dep is 'java-runtime-headless=11'

torben commented on 2023-01-02 08:12 (UTC) (edited on 2023-01-04 09:23 (UTC) by torben)

@kohlu You need to install the v11 runtime and either set it as default. If you don't like to do that (I have 3 different open-jdks installed) you can use a systemd dropin to force unifi to use the v11 runtime, just drop this file to /etc/systemd/system/unifi.service.d/jvm.conf:

[Service]
# Clear first, Exec... is additive
ExecStart=
ExecStop=
ExecStart=/usr/lib/jvm/java-11-openjdk/bin/java -jar /usr/lib/unifi/lib/ace.jar start
ExecStop=/usr/lib/jvm/java-11-openjdk/bin/java -jar /usr/lib/unifi/lib/ace.jar stop

@freeswa: You might want to drop pre v11 runtimes from your dependency list, if that's easily possible. Unifi is rather picky on its dependencies unforntunately. Though I'm not entirely sure which dependencies work at this time. I've been in some kind of trial-and-error in my unifi install for years now ;-)

kohlu commented on 2023-01-02 02:10 (UTC)

If anyone is seeing this error Exception in thread "main" java.lang.UnsupportedClassVersionError: com/ubnt/ace/Launcher has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 in your journal log, you will have to switch to jdk11 by running archlinux-java set java-11-openjdk with root. Then restart the unifi service.

azraelle commented on 2022-12-31 23:59 (UTC)

404 after upgrade

void09 commented on 2022-12-26 13:47 (UTC)

How do I get this package working ? With jre11-openjdk-headless 11.0.17.u1-1 and mongodb36-bin as suggested below, I get a 404 when accessing https://127.0.0.1:8443/ If I use the default mongodb dependency, I get a neverending compile. Also, somebody commented that mongodb<6 is required anyway?

Scimmia commented on 2022-12-08 00:07 (UTC)

--illegal-access=warn doesn't fix anything, all it does is show more warnings. Since the warnings aren't errors to begin with and everything runs fine, ignore it, it's something upstream needs to fix.

synthead commented on 2022-12-07 19:00 (UTC) (edited on 2022-12-07 19:00 (UTC) by synthead)

jre11-openjdk-headless 11.0.17.u1-1 will cause ubiquiti.service to raise this error:

systemd[1]: Started Ubiquiti UniFi Server.
java[147423]: WARNING: An illegal reflective access operation has occurred
java[147423]: WARNING: Illegal reflective access by org.apache.catalina.loader.WebappClassLoaderBase (file:/usr/lib/unifi/lib/tomcat-embed-core-9.0.59.jar) to field java.io.ObjectStreamCla>
java[147423]: WARNING: Please consider reporting this to the maintainers of org.apache.catalina.loader.WebappClassLoaderBase
java[147423]: WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
java[147423]: WARNING: All illegal access operations will be denied in a future release
systemd[1]: Stopping Ubiquiti UniFi Server...

To fix this, include --illegal-access=warn in unifi.service, like this:

[Unit]                                                                                                
Description=Ubiquiti UniFi Server                                                                     
After=network.target

[Service]                                                                                             
User=unifi                                                                                            
WorkingDirectory=/usr/lib/unifi                                                                       
ExecStart=/usr/bin/java -jar --illegal-access=warn /usr/lib/unifi/lib/ace.jar start
ExecStop=/usr/bin/java -jar --illegal-access=warn /usr/lib/unifi/lib/ace.jar stop

[Install]                                                                                             
WantedBy=multi-user.target

You may also want to use /usr/lib/jvm/java-11-openjdk/bin/java explicitly since Unifi relies on JDK 11. See my comment here: https://aur.archlinux.org/packages/unifi#comment-891686