Unifi Cloud key cannot login to maintenance

3 weeks ago by in Ubiquiti Tagged: , ,

UC-CK cannot log in fix

Cloud key recovery – mondogb with 0 bytes size files isn’t starting

This can be confirmed by sshing into the CloudKey and running the following command:

ls -l /usr/bin/sudo


This should return output similar or identical to the following if the same root cause:

-rwxr-xr-x 1 root root 106820 Jan 10 2016 /usr/bin/sudo

If it doesn’t look like it, run:

root@UniFi-CloudKey:~# chmod u+s /usr/bin/sudo
root@UniFi-CloudKey:~# ls -l /usr/bin/sudo
-rwsr-xr-x 1 root root 106820 Jan 10  2016 /usr/bin/sudo

More troubleshooting can be done by observing log:

tail -f /srv/unifi/logs/server.log

Check size of the ace (database files) at:


If they have 0 bytes, erase all ace*

  1. Navigate to /usr/lib/unifi/data
  2. Edit the file ‘system.properties’
  3. Add this line:


unifi.db.extraargs=--logappend --logpath logs/mongod.log
reboot, check the log of mongodb
If you see this:
DBException 10446: mmap: can't map area of size 0 file: /usr/lib/unifi/data/db/ace_stat.3
Then hopefully you have backup as you will need to reset UC-CK to defaults then apply the backup.

Last resort: renaming all the local.# zero length files and the _stat files, then renaming the mongod.lock
file (even though I rebooted the CK after the other steps the lock file remained).  
Once I renamed the mongod.lock file I was able to access more options on the CK

The author didnt add any Information to his profile yet

  • Published: 35 posts