Unifi video server not starting anymore on Ubuntu 20.04, help needed please

Sorry in advance for any miscategorization in this forum, feel free to move this post accordingly to the correct place.

So I’ve had unifi-video running on my ubuntu box for sometime, like 2-3 years or more. no issues until now.

I can’t seem to find why the service fails to run the process and have it up and running, it was working fine. I can’t recall what may have caused this to suddenly stop functioning, other services work fine still, such as lighttpd, pihole.

I can reach the camera by IP directly, the server seems to have no other known issues - i could be wrong, but so far not. is there a config file maybe where storage of recording can be edited or something? one of 4 disks is at 95% capacity but doubt that would cause this issue to stop running all together even after a new install of it.

Tried apt-get remove unifi-video and mongodb and so forth, clean up and zilch result. rebooted and a few other logical steps such as mongodb restart, status, check disk space, mem, CPU.

Tired 3.10 and 3.10.13 unifi-video installs also, same issue. (no this isn’t protect, it’s BYO hardware and unifi video with a dpkg file i have locally from the unifi website before they go EOL or remove it if not already done so)

unifi-video service status output shows this,

Feb 18 23:01:15 server01 systemd[1]: Starting Unifi Video NVR Daemon…
Feb 18 23:01:15 server01 unifi-video[4477]: (unifi-video) Hardware type:Unknown
Feb 18 23:01:15 server01 unifi-video[4477]: (unifi-video) checking for system.properties and truststore files…
Feb 18 23:01:15 server01 systemd[1]: Started Unifi Video NVR Daemon.
Feb 18 23:01:15 server01 systemd[1]: unifi-video.service: Main process exited, code=exited, status=1/FAILURE
Feb 18 23:01:15 server01 systemd[1]: unifi-video.service: Failed with result ‘exit-code’.

journalctl -xe doesn’t really show much more than the above neither in relation to unifi-video.

Any help is much appreciated.
p.s really do not want to rebuild the server even if it’s a home server.

Happy to provide more info where and if needed too.

If the disks are too full to write then services stop working. In ext2/ext3/ext4 file systems 5% of disk space is reserved for root in case of disk being full so processes can work properly. So any non root services, such as UnFi video, can’t write to a drive at 95%.

Hey Tom,

yeah i thought that was only on the root / filesystem (well at least on Debian and maybe Redhat, unsure solaris/FreeBSD other flavours), not additional mount points (if say ext4).

also correction this is 3 disks total, not 4 (diff server for a family member i built recently). doesn’t really make a big difference though.

vidadmin@server01:~$ showdisks
/dev/sda2 458G 156G 279G 36% /
/dev/sdc1 1.9T 1.7T 157G 92% /media/2tb-001
/dev/sdb2 3.7T 2.4T 1.4T 64% /media/4tb-backup-001

**show disks is; df -h | grep /dev/sd

i cleared up space anyway on /sdc1 just incase to get it below 95% but no luck.
i have squid, lighttpd, pihole, dnsmasq, media server services running fine though and made me think it might be a red herring?

I really wish this would have a storage location variable or parameter you could set within a file via CLI, not just the web GUI (because the service won’t start gah)

cat /var/lib/unifi-video/system.properties

Excludes network interfaces: e.g ufv.cam.ignoreinterfaces=eth0,vnic0,vnic1


I would think in a remove and install again set of actions done though, it would reset to the default storage location (Ideally i would point to a custom path - non os drive).

I have 2 G3 flex cameras and a G3 bullet, and really do not want to replace the cameras/unifi video to something else (because of unifi’s other drama going on). However I was about to before the unifi drama, get an upgrade from the UCK dongle to UCK Plus 2 (so unifi network controller + unifi protect), that is NOT happening anymore.

I am chatting to other friends more knowledgable in Linux than me to see if they can figure this out too for the service failing to start.

When you remove unifi-video it does not mean the that configuration was removed. You may have to go in a delete the databases and left over config files manually.

I’m seeing the exact same thing… and I did do a rebuild on the server.

update, I have flushed the mongo db tables out, removed mongo package, unifi-video, apt purge, autoremove the two packages, findstr and du -h and output anything mongo/unifi-video - nothing left, fresh installs, no luck.

something is still there causing issues, disk space is reclaimed to 80% now.

I know on Windows java is used for unifi controller and video, but suspect something java on linux has been updated or another package which has broken it, finding which one - is another issue. Note i only use trusted repos and use apt purely, no sideload, but did observe desktop packages tried to install about a week back and suspect that broke it, gdm3 i think it was along with java. This is a headless server i run, so not sure why apt-get update and apt-get upgrade would even look for desktop packages and package manager alike a desktop.

Rebuilding the server on a weekend soon as it just has to be up and running and the sooner the better.

Last note: unifi video package is no longer on unifi’s website that i could find, so hold onto your .deb and .exe’s all (yes they wanna push unifi protect as the only solution it seems).

Yeah… There was an update to java back in late Jan that I think is causing the issue…
I tried installing the previous version of java but had little success…
Right now I am setting up an old image that I had of a fully working install with auto update turned off. I’m going to get it up and running and then only update java to see if that’s the issue

Well, let’s say I’ve spent considerable hours on this one now.

used a mongodb tool to flush and wipe all collections/tables, verify db server health status is OK.
mongodb is fine.

sudo apt-get remove unifi-video
sudo apt purge unifi-video
sudo apt-get remove mongodb mongodb-server openjdk-8-jre-headless jsvc
sudo apt purge mongodb mongodb-server openjdk-8-jre-headless jsvc

checked the /var/cache and others caches for unifi video, also /data/db for mongod and cleaned that up, https://dl.ubnt.com/firmwares/ufv/v3.10.1/unifi-video.Debian7_amd64.v3.10.1.deb and 3.10.13

rebooted server, ps aux, du commands, find - you name it trying to find stuff.
/var/lib/dpkg/info/unifi-video.postinst looks good.

Ultimately the mongodb can create a new table from a dummy app, and can connect to it, so i yes believe it is java or possibly something else. Lesson learned to near air gap this server if there is a next time (stop java/other update).

Jan 15 was EOL for unifi-video so it’s either now, start a new server up (not desirable and a waste of more hours) OR CloudKey Gen2 plus (my country it’s $400 NZD) or find another a camera for $200 or so and use opensource NVR if something is found. Yeah my country isn’t as cheap like CA/US for stuff which is made outside China and sweat factory phone home like.

for now the camera is in standalone and works fine in this mode, but of course no recordings to store.

So now, with Unifi’s recent stance with must register to cloud and other silly things they’ve done as of late, it makes me want to switch even more to someone else for a product, that is buy a CK gen2 plus and then what happens in 3 years for support? yeah EOL probably.

Thanks again Tom and Jon for your replies :slight_smile:


downgrade the java, GRR!

#unifi-video -v will show the error.

@LTS_Tom maybe in your next video or podcast etc. let others know about the java issue. PITA!!! thanks