Try to perform a database repair.
systemctl stop unifi
service mongodb stop
mongod --dbpath /usr/lib/unifi/data/db --repair
service mongodb start
systemctl start unifi