Do note that the UniFi-Video software is no longer supported should be migrated to the UniFi Protect systems.
Running “systemctl status unifi-video” gives the following error.
(unifi-video) checking for system.properties and truststore files…
It appears that the error is due to an unsupported version of Java. Installing an older version of Java resolves the issue.
You can check which versions of Java are available with
apt-cache show openjdk-8-jre
The versions that showed up for me were
Installing the last one fixed the issue for now.
sudo apt-get install openjdk-8-jre-headless=8u252-b09-1ubuntu1
Apparently on some versions of Java checking the Java version will give you the following error.
root@local:~# java -v
Unrecognized option: -v
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
The issue being the -v or –version options are not recognized. On newer versions of Java it is recognized.
The proper way to do it is -version with only one dash
root@local:~# java -version
openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-8u252-b09-1ubuntu1-b09)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)
You can install the default-jre to get the default Java package installed
sudo apt install -y default-jre