Cloud Key
"A key only unlocks a door. Its wielder must choose whether to cross the threshold." —*Hurkyl's Metaphysics, vol. II*
Artist: Trevor Hairsine TCG Player Link Scryfall Link EDHREC Link
seen from Yemen
seen from Belgium
seen from Lithuania
seen from United States

seen from Malaysia
seen from Argentina
seen from United States
seen from China
seen from China

seen from Australia

seen from United States
seen from Singapore
seen from Israel

seen from United States
seen from United States
seen from United States

seen from United States

seen from Malaysia
seen from Malaysia

seen from Malaysia
Cloud Key
"A key only unlocks a door. Its wielder must choose whether to cross the threshold." —*Hurkyl's Metaphysics, vol. II*
Artist: Trevor Hairsine TCG Player Link Scryfall Link EDHREC Link
Cloud Key (Edge of Eternities Commander) - Matt Stewart
More cards with art by Matt Stewart on Scryfall
Cloud Key (Future Sight) - Trevor Hairsine
More cards with art by Trevor Hairsine on Scryfall
Restart Unifi CloudKey Gen 2 PoE from switch SSH command line
I have a Cloud Key Gen 2 that has been replaced twice and is now acting up a third time. Anyway, I needed to reboot it remotely as the drive is a 2 hour trip to this particular Cloud Key. If you have SSH enabled, log in to your switch and, with proper documentation, find the port number that you need to reboot and run this command: swctrl poe restart id [port number] Example: swctrl poe restart…
View On WordPress
Fix MongoDB Issues on Unifi CloudKey Gen 1
Today I had to restart several times my network hardware due to some issues with the cable provider (COX) which they did not want to admit. When it was all finally resolved (by them!) I discovered I could not login anymore on my Cloud Key nor my Gateway Controller.
I could connect to 192.168.1.2 where I was welcomed with the usual 2 buttons to login in either interface but they did not work right. In some occasions I was able to login in the Cloud Key, but it would say that unifi was stopped. In other occasions, I would receive a blank screen trying to login in the Cloud Key panel. I was never able to login in the Controller.
Luckily I could still SSH into the Cloud Key and using the username/password above (ubtn/...) I was given root access.
After much tribulation, perusing /srv/unifi/logs/server.log I noticed some issues with MongoDB that prevented starting the unifi process
... [2021-05-04T23:56:57,008] <db-server> INFO db - Tue May 4 23:56:56.998 [initandlisten] recover skipping application of section more... [2021-05-04T23:56:57,051] <db-server> INFO db - Tue May 4 23:56:57.051 [initandlisten] recover /usr/lib/unifi/data/db/journal/j._74 [2021-05-04T23:56:57,083] <db-server> INFO db - Tue May 4 23:56:57.083 [initandlisten] couldn't uncompress journal section [2021-05-04T23:56:57,084] <db-server> INFO db - Tue May 4 23:56:57.083 [initandlisten] Assertion: 15874:couldn't uncompress journal section [2021-05-04T23:56:57,084] <db-server> INFO db - 0x48e13c 0x46f83a 0x45d190 0x27efdc 0x27f15e 0x27f4d4 0x27f718 0x27fe04 0x2800ba 0x273402 0x1681 b0 0x1699dc 0x15004c 0x7678e632 [2021-05-04T23:56:57,097] <db-server> INFO db - bin/mongod(_ZN5mongo15printStackTraceERSo+0x17) [0x48e13c] [2021-05-04T23:56:57,097] <db-server> INFO db - bin/mongod(_ZN5mongo10logContextEPKc+0xa9) [0x46f83a] [2021-05-04T23:56:57,098] <db-server> INFO db - bin/mongod(_ZN5mongo11msgassertedEiPKc+0x67) [0x45d190] [2021-05-04T23:56:57,098] <db-server> INFO db - bin/mongod(_ZN5mongo3dur11RecoveryJob14processSectionEPKNS0_11JSectHeaderEPKvjPKNS0_11JSectFoot erE+0x613) [0x27efdc] [2021-05-04T23:56:57,099] <db-server> INFO db - bin/mongod(_ZN5mongo3dur11RecoveryJob17processFileBufferEPKvj+0xe9) [0x27f15e] [2021-05-04T23:56:57,099] <db-server> INFO db - bin/mongod(_ZN5mongo3dur11RecoveryJob11processFileEN5boost10filesystem4pathE+0x7f) [0x27f4d4] [2021-05-04T23:56:57,099] <db-server> INFO db - bin/mongod(_ZN5mongo3dur11RecoveryJob2goERSt6vectorIN5boost10filesystem4pathESaIS5_EE+0xcf) [0x 27f718] [2021-05-04T23:56:57,100] <db-server> INFO db - bin/mongod(_ZN5mongo3dur8_recoverEv+0x4e3) [0x27fe04] [2021-05-04T23:56:57,100] <db-server> INFO db - bin/mongod(_ZN5mongo3dur7recoverEv+0x15) [0x2800ba] [2021-05-04T23:56:57,101] <db-server> INFO db - bin/mongod(_ZN5mongo3dur7startupEv+0x25) [0x273402] [2021-05-04T23:56:57,101] <db-server> INFO db - bin/mongod(_ZN5mongo14_initAndListenEi+0x67f) [0x1681b0] [2021-05-04T23:56:57,101] <db-server> INFO db - bin/mongod(_ZN5mongo13initAndListenEi+0xb) [0x1699dc] [2021-05-04T23:56:57,102] <db-server> INFO db - bin/mongod(main+0x1d3) [0x15004c] [2021-05-04T23:56:57,102] <db-server> INFO db - /lib/arm-linux-gnueabihf/libc.so.6(__libc_start_main+0x99) [0x7678e632] [2021-05-04T23:56:57,105] <db-server> INFO db - Tue May 4 23:56:57.105 [initandlisten] dbexception during recovery: 15874 couldn't uncompress journal section [2021-05-04T23:56:57,105] <db-server> INFO db - Tue May 4 23:56:57.105 [initandlisten] exception in initAndListen: 15874 couldn't uncompress journal section, terminating [2021-05-04T23:56:57,106] <db-server> INFO db - Tue May 4 23:56:57.105 dbexit: [2021-05-04T23:56:57,106] <db-server> INFO db - Tue May 4 23:56:57.105 [initandlisten] shutdown: going to close listening sockets... [2021-05-04T23:56:57,107] <db-server> INFO db - Tue May 4 23:56:57.105 [initandlisten] shutdown: going to flush diaglog... [2021-05-04T23:56:57,107] <db-server> INFO db - Tue May 4 23:56:57.105 [initandlisten] shutdown: going to close sockets... [2021-05-04T23:56:57,107] <db-server> INFO db - Tue May 4 23:56:57.105 [initandlisten] shutdown: waiting for fs preallocator... [2021-05-04T23:56:57,108] <db-server> INFO db - Tue May 4 23:56:57.105 [initandlisten] shutdown: lock for final commit... [2021-05-04T23:56:57,108] <db-server> INFO db - Tue May 4 23:56:57.105 [initandlisten] shutdown: final commit... [2021-05-04T23:56:57,152] <db-server> INFO db - Tue May 4 23:56:57.150 [initandlisten] shutdown: closing all files... [2021-05-04T23:56:57,153] <db-server> INFO db - Tue May 4 23:56:57.151 [initandlisten] closeAllFiles() finished [2021-05-04T23:56:57,153] <db-server> INFO db - Tue May 4 23:56:57.151 [initandlisten] shutdown: removing fs lock... [2021-05-04T23:56:57,153] <db-server> INFO db - Tue May 4 23:56:57.152 dbexit: really exiting now [2021-05-04T23:56:57,169] <db-server> INFO db - DbServer stopped ...
My guess is that the many restart corrupted one of the journal files (/usr/lib/unifi/data/db/journal/j._74) and that it was unrecoverable.
To restore things, I simply deleted the file and restarted unifi with
systemctl restart unifi
It took a while (I monitored progress with tail -f /srv/unifi/logs/server.log in another window) but eventually it started it cleanly and I was again able to login both in the Cloud Key and the Gateway Controller.
Cloud Key