Using systemctl start unifi
on a fresh install results in WARN Unable to load properties from '/usr/lib/unifi/data/system.properties' - /usr/lib/unifi/data/system.properties (No such file or directory)
. The symlink in /usr/lib/unifi/data
exists and it points into a real location in /var/lib/unifi/data
which is owned by the unifi account.
Search Criteria
Package Details: unifi 8.6.9-1
Package Actions
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.167471 |
First Submitted: | 2017-08-22 01:31 (UTC) |
Last Updated: | 2024-11-07 20:46 (UTC) |
Dependencies (3)
- fontconfig (fontconfig-gitAUR, fontconfig-ubuntuAUR)
- java-runtime-headless (jre10AUR, jre12AUR, jdk10AUR, jdk10-openj9-binAUR, jdk7AUR, jre7AUR, amazon-corretto-16AUR, jdk16-adoptopenjdkAUR, jdk8-armAUR, liberica-jre-11-binAUR, jdk11-j9-binAUR, jre11-jbr-xdg-headlessAUR, jre16-openjdk-headlessAUR, jre14-openjdk-headlessAUR, jre15AUR, jre14AUR, jre13AUR, jre16AUR, jre18-openjdk-headlessAUR, amazon-corretto-19-binAUR, liberica-jre-11-full-binAUR, jdk13-openjdk-binAUR, liberica-jre-8-full-binAUR, jre-openj9-headlessAUR, jre12-openjdk-headlessAUR, jdk11-dragonwell-standard-binAUR, jdk11-jetbrains-binAUR, zulu-15-binAUR, jdk20-openj9-binAUR, zulu-13-binAUR, jdk8-dragonwell-extended-binAUR, jdk8-dragonwell-standard-binAUR, jdk11-dragonwell-extended-binAUR, jdk17-dragonwell-standard-binAUR, jre11AUR, jdk8-j9-binAUR, jdk7-j9-binAUR, jdk7r1-j9-binAUR, jre13-openjdk-headlessAUR, jre15-openjdk-headlessAUR, jdk8-openj9-binAUR, jre-ltsAUR, microsoft-openjdk-11-binAUR, microsoft-openjdk-17-binAUR, microsoft-openjdk-21-binAUR, liberica-nik-24-full-binAUR, zulu-17-binAUR, zulu-11-binAUR, zulu-8-binAUR, liberica-jdk-17-full-binAUR, liberica-jdk-11-lite-binAUR, liberica-jdk-11-full-binAUR, liberica-jdk-11-binAUR, jre19-openjdk-headlessAUR, jdk17-jetbrains-binAUR, zulu-jdk-fx-binAUR, zing-21-binAUR, zing-8-binAUR, jre17AUR, java-openjdk-binAUR, jre21-zulu-binAUR, amazon-corretto-17AUR, amazon-corretto-21-binAUR, jre17-zulu-binAUR, jdk21-temurinAUR, amazon-corretto-8AUR, amazon-corretto-11AUR, jdk11-temurinAUR, liberica-jdk-full-binAUR, liberica-jdk-21-full-binAUR, liberica-jdk-8-full-binAUR, jdk17-temurinAUR, zulu-21-binAUR, jdk-temurinAUR, jre8AUR, jdk8AUR, zulu-17-fx-binAUR, jdk8-perfAUR, zulu-jre-fx-binAUR, zulu-fx-binAUR, zulu8-fx-binAUR, zulu11-fx-binAUR, zulu17-fx-binAUR, zulu21-fx-binAUR, jdk-openj9-binAUR, jdk11-openj9-binAUR, jdk17-openj9-binAUR, jre-jetbrainsAUR, jre-openjdk-wakefield-headlessAUR, jre-openjdk-wakefieldAUR, jdk-openjdk-wakefieldAUR, jdk21-openj9-binAUR, zulu-23-binAUR, jreAUR, jdkAUR, jdk21-jetbrains-binAUR, java-openjdk-ea-binAUR, jre-zulu-binAUR, jre-zulu-fx-binAUR, jdk21-dragonwell-standard-binAUR, jdk21-dragonwell-extended-binAUR, jdk-openjdk, jdk11-openjdk, jdk17-openjdk, jdk21-openjdk, jre-openjdk, jre-openjdk-headless, jre11-openjdk, jre11-openjdk-headless, jre17-openjdk, jre17-openjdk-headless, jre21-openjdk, jre21-openjdk-headless, jre8-openjdk-headless)
- mongodbAUR (mongodb32-binAUR, percona-server-mongodb-binAUR, mongodb36-binAUR, mongodb34-binAUR, mongodb40-binAUR, mongodb44-binAUR, mongodb42-binAUR, mongodb60-binAUR, mongodb50-binAUR, mongodb50AUR, ferretdbAUR, mongodb70-binAUR, ferretdb-binAUR, mongodbAUR, mongodb-binAUR, mongodb44AUR)
Required by (0)
Sources (6)
Latest Comments
« First ‹ Previous 1 2 3 4 5 6 7 .. 23 Next › Last »
Managor commented on 2024-02-22 14:10 (UTC) (edited on 2024-02-22 14:29 (UTC) by Managor)
killermoehre commented on 2024-01-08 12:14 (UTC) (edited on 2024-01-08 12:17 (UTC) by killermoehre)
I use an actual override.conf
for the unifi.service
to pin it to jre17
[Service]
ExecStart=
ExecStart=/usr/lib/jvm/java-17-openjdk/bin/java --add-opens java.base/java.time=ALL-UNNAMED -jar /usr/lib/unifi/lib/ace.jar start
ExecStop=
ExecStop=/usr/lib/jvm/java-17-openjdk/bin/java -jar /usr/lib/unifi/lib/ace.jar stop
So proper depends=(jre17-openjdk-headless)
would be possible without touching the default system java version.
pikl commented on 2023-12-03 09:31 (UTC)
As an addition thought... since Arch only officially supports java 17 (as LTS) and 21 as stated in the wiki article and I can't even get the AUR versions of 18 and 19 to build in a clean chroot, should the PKGBUILD be simply restricted to 17 with a dependency java-runtime-headless=17
?
pikl commented on 2023-12-03 09:14 (UTC)
Following up on comments from pnedkov and GaryScottMartin, it looks like Unifi 8.0.7 introduced a restriction on using java 21. Since the core openjdk
packages are at 21 this is more likely to be a issue with new installs (as pnedkov discovered) or if you clear out java versions (as GaryScottMartin discovered).
If run with java 21, unifi
8.0.7 fails to launch and /var/log/unifi/server.log
contains the following:
[2023-12-03 08:59:39,797] <launcher> INFO launcher - Initializing on Linux(6.6.3-arch1-1), jre21(21)
[2023-12-03 08:59:39,797] <launcher> ERROR launcher - Java 21 is not supported!
Fix as pnedkov did by installing an older version of your preferred java package (e.g. 17) and setting it as the default using the archlinux-java
command.
I'm not sure how the PKGBUILD should be altered to reflect this new restriction. I experimented with adding java-runtime-headless<21
to the dependencies with the existing java-runtime-headless>=17
. Unfortunately these are treated separately as dependencies so when installing with pacman
you get two prompts and can end up installing two versions - with an incompatible version becoming the default.
pnedkov commented on 2023-12-03 04:03 (UTC) (edited on 2023-12-03 04:05 (UTC) by pnedkov)
Today I set up a brand new Arch Linux host with unifi and stumbled on the same problem GaryScottMartin has described in the previous post. Then I examined glennr's script (https://get.glennr.nl/unifi/install/unifi-8.0.7.sh) and I noticed that the latest java he is installing is version 17. So, I installed it manually and now unifi starts successfully.
[root@unifi ~]# java --version
openjdk 21 2023-09-19
OpenJDK Runtime Environment (build 21+35)
OpenJDK 64-Bit Server VM (build 21+35, mixed mode, sharing)
[root@unifi ~]#
[root@unifi ~]# pacman -S jre17-openjdk
...
Packages (2) jre17-openjdk-headless-17.0.9.u8-2 jre17-openjdk-17.0.9.u8-2
...
[root@unifi ~]# archlinux-java status
Available Java environments:
java-17-openjdk
java-21-openjdk (default)
[root@unifi ~]#
[root@unifi ~]# archlinux-java set java-17-openjdk
[root@unifi ~]# java --version
openjdk 17.0.9 2023-10-17
OpenJDK Runtime Environment (build 17.0.9+8)
OpenJDK 64-Bit Server VM (build 17.0.9+8, mixed mode)
[root@unifi ~]#
[root@unifi ~]# systemctl start unifi.service
GaryScottMartin commented on 2023-12-02 07:01 (UTC) (edited on 2023-12-04 09:25 (UTC) by GaryScottMartin)
Based on above comment by pnedkov
, I reinstalled jre17-openjdk
. Unifi
still failed to start until I set the default Java
installation to java-17-openjdk.
I searched for a way to get Unifi
to use a Java
installation other than the default, but didn't find one.
=============================================================
I have had unifi
installed and running on my system for a couple of months, but it now fails on startup.
[user@host ~]$ systemctl status unifi
× unifi.service - Ubiquiti UniFi Server
Loaded: loaded (/usr/lib/systemd/system/unifi.service; enabled; preset: disabled)
Active: failed (Result: exit-code) since Fri 2023-12-01 22:02:36 PST; 44min ago
Duration: 905ms
Process: 12857 ExecStart=/usr/bin/java --add-opens java.base/java.time=ALL-UNNAMED -jar /usr/lib/unifi/lib/ace.jar start (code=exited, status=255/EXCEPTION)
Main PID: 12857 (code=exited, status=255/EXCEPTION)
CPU: 2.265s
Dec 01 22:02:35 TehachapiMtn (java)[12857]: unifi.service: Executing: /usr/bin/java --add-opens java.base/java.time=ALL-UNNAMED -jar /usr/lib/unifi/lib/ace.jar start
Dec 01 22:02:35 TehachapiMtn systemd[1]: unifi.service: User lookup succeeded: uid=956 gid=956
Dec 01 22:02:36 TehachapiMtn systemd[1]: unifi.service: Child 12857 belongs to unifi.service.
Dec 01 22:02:36 TehachapiMtn systemd[1]: unifi.service: Main process exited, code=exited, status=255/EXCEPTION
Dec 01 22:02:36 TehachapiMtn systemd[1]: unifi.service: Failed with result 'exit-code'.
Dec 01 22:02:36 TehachapiMtn systemd[1]: unifi.service: Service will not restart (restart setting)
Dec 01 22:02:36 TehachapiMtn systemd[1]: unifi.service: Changed running -> failed
Dec 01 22:02:36 TehachapiMtn systemd[1]: unifi.service: Unit entered failed state.
Dec 01 22:02:36 TehachapiMtn systemd[1]: unifi.service: Consumed 2.265s CPU time.
Dec 01 22:02:36 TehachapiMtn systemd[1]: unifi.service: Releasing resources...
I have jdk-openjdk installed and set:
[user@host ~]$ archlinux-java status
Available Java environments:
java-21-openjdk (default)
I have recently uninstalled older versions of Java from the system during a security cleanup.
Here are listings of the two directories named in the systemctl status
:
[user@host ~]$ ls /usr/bin/java
lrwxrwxrwx - root 19 Jan 04:33 /usr/bin/java -> /usr/lib/jvm/default-runtime/bin/java*
[user@host ~]$ ls /usr/lib/unifi/lib/ace.jar
.rw-r--r-- 16M root 22 Nov 01:08 /usr/lib/unifi/lib/ace.jar
Suggestions?
ipaqmaster commented on 2023-10-09 06:53 (UTC)
I had to update my unifi systemd unit with the new ExecStart argument added a few commits ago before the UI would work again.
jdart commented on 2023-10-05 01:42 (UTC) (edited on 2023-10-07 19:30 (UTC) by jdart)
I can't get this working since a recent update. I tried wiping out /var/lib/unifi/data/db
and using mongobin-44
and mongobin-50
using java17
but I keep getting:
Exception in thread "launcher" java.lang.NullPointerException: Web context failed to initialize
Oct 04 20:29:11 darch java[33079]: at java.base/java.util.Objects.requireNonNull(Objects.java:235)
I even tried downgrading to 7.4.162 but it's the same story. I tried removing /var/lib/unifi/data/keystore
, same story.
This is my system.properties which is the only file I've modified...
reporter-uuid=...
unifi.http.port=8089
debug.device=warn
debug.mgmt=warn
unifi.https.port=8090
debug.setting_preference=auto
is_default=false
debug.system=warn
uuid=...
unifi.https.sslEnabledProtocols=TLSv1.2
debug.sdn=warn
Any idea what might be wrong?
Edit:
I had overriden the systemd unit to hardcode the jvm path, but I missed a new parameter needed --add-opens java.base/java.time=ALL-UNNAMED
jonnyabu commented on 2023-10-04 22:11 (UTC)
Just informational -- I upgraded to the 7.5.176-1 release and was getting the 404 page after that upgrade. I was on mongodb44-bin as well.
I tried pointing systemd's service file to java11, 17, and 21 first but none had luck. If it was pointed to java11 it would say it was compiled with a more recent version and would never start, for me. 17 and 21 would let the service start but gave the 404 page.
Then I tried monogdb36-bin and 50-bin and didn't have any luck. After trying those two, I reverted back to my original version of 44-bin and then it worked, with the systemd service file using java17.
So I guess ultimately in my case reinstalling mongodb44-bin was the trick for some reason, along with making sure the unifi system file pointed to java17
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