This is an old revision of the document!
Restoring Cloud Access when it's attached to an account that no longer exists on a UniFi controller
If a UniFi controller is stuck in a perpetual state of Connecting under Cloud Access Status, and it's not related to firewall or DNS issues preventing connection back to the Ubiquiti cloud, and no options to turn off Cloud Access are visible on the Cloud Access settings page, there may be leftover cloud access configuration on a previously existing user account that is no longer associated with any current site.
This solution requires manipulation of the UniFi controller's database. If you're not comfortable working with the mongo CLI, do not attempt the following steps. Take a full backup of your UniFi controller before proceeding!
Connect to mongodb on the UniFi controller host:
mongo –port 27117
Switch to the UniFi Database:
use ace
Show all admins:
db.admin.find()
Note the "ubic_uuid" associated with each account.
Show all settings:
db.setting.find()
Look for the line that begins:
{ "_id" : ObjectId("[objectid]"), "key" : "super_cloudaccess", "enabled" : true, "ubic_uuid" : "[uuid]"
and note the "ubic_uuid" listed in this line.
Use the command:
db.setting.update({ _id: ObjectId("[objectid]") }, { $set: { ubic_uuid: "[uuid of desired user]"}})
to update the cloud access to a current account
Use exit
to leave the mongo CLI
Refresh the Cloud Access settings page, and the option to toggle Cloud Access should now be visible, along with a button to Disable and Remove cloud access. It may be necessary to disable cloud access and then turn it on again to restore full connectivity with the new credentials, but these options should now be visible where they were not previously. After updated credentials are entered, Cloud Access should function as expected.