Scheduled maintenance: Community will be offline Monday June 17th, 1:00 AM - 6:00 AM (PT)
Reply
Member
Posts: 149
Registered: ‎09-11-2010
Kudos: 11

Re: Cloud Key Issue

The UBNT support has asked me to RMA the key, they just gave up on.

 

But is there anyway to pull the configuration for the unifi controller webui out to put on a new cloudkey?

Ubiquiti Employee
Posts: 4,896
Registered: ‎06-18-2015
Kudos: 1533
Solutions: 456

Re: Cloud Key Issue

@osunifi,

When I say purge, I am referring to sudo apt-get purge unifi then installing the controller from scratch.

Did you do this?

UBNT_Alternate_Logo.png
Ubiquiti Networks Enterprise Support Team


UniFi Protect: UniFi Protect Help Center | Frequently Asked Questions

UniFi Video 3: UniFi Video Help Center | UFV3 User Guide


Regular Member
Posts: 696
Registered: ‎06-18-2010
Kudos: 176
Solutions: 5

Re: Cloud Key Issue


UBNT-Cody wrote:...I suspect the error is appearing because downgrades aren't typically supported (or can yield unexpected results...).

Hello @UBNT-Cody,

 

Excuse me please. Regarding this caution on downgrading, when I received CK it came with FW v 0.4x and controller version 4.x. I upgraded the firmware (only) to 0.5x. In doing so the the controller was upgraded as well, to v5.x.

 

I do not desire to run 5.x on this system so I SSh'd in and downgraded the controller back to 4.x.

 

Question: Does the above action put the CK in a potentially unstable state? Are the FW versions tied to a specifc controller version on CK? Should I downgrde the firmware back 0.4x?

 

Thank you.

jim

 

 

 

 

Established Member
Posts: 1,945
Registered: ‎01-30-2016
Kudos: 999
Solutions: 244

Re: Cloud Key Issue


@UBNT-Cody wrote:
@osunifi,

When I say purge, I am referring to sudo apt-get purge unifi then installing the controller from scratch.

Did you do this?

Hi @UBNT-Cody

 

No I did not issue the command "apt-get purge unifi" when I installed 4.8.20.

 

But I did run the command now and installed 4.8.20 again. Now the controller started without "FATAL db - We do not support upgrading from 5.0.6. Please downgrade to V3, migrate db and upgrade back again to 4.8.20."

 

Maybe you should put this information into the knowledgebase. I remeber that I asked chat support if I could downgrade my CK from v5 to v4. It was answered with an unconditional yes.

 

 

 

Please give kudo's to the people who have helped you and mark your thread as solved when you receive a solution to your issue.
For a deeper understanding on how WiFi works.
Certified UEWA, ACSP, ACTC
New Member
Posts: 38
Registered: ‎11-30-2015
Kudos: 21

Re: Cloud Key Issue

Same [no 8443 after power cycle] issue.  Just happened today.  PLEASE tell me how to get my DB backup.

Established Member
Posts: 1,945
Registered: ‎01-30-2016
Kudos: 999
Solutions: 244

Re: Cloud Key Issue


@UBNT-Cody wrote:

Hi @osunifi,

 

The QUERY-LOWRATIO messages are normal and are caused when very large queries are made to the database (such as when viewing the events).  You can ignore these messages.

 

By default to conserve space, mongod logging is disabled on the Cloud Key. To enable logging, add the following to your system.properties file (remember to avoid spaces at the end of the line): 

 

unifi.db.extraargs="--logappend --logpath logs/mongod.log"

 

As for the upgrade warning, when you initially set up your Cloud Key, did you purge the controller first, or did you "upgrade" to version v4.8.20?  I suspect the error is appearing because downgrades aren't typically supported (or can yield unexpected results - such as this).  There may be unidentified data or structures that are triggering that warning, left over from the v5 database.


Hi @UBNT-Cody

 

I see that other people keep having problems getting the controller running after a powercycle of the CK.

I woud like to suggest to them to enable the mongod.log per your instructions.

So I tried it on my CK.

But when I add 

 

unifi.db.extraargs="--logappend --logpath logs/mongod.log"

 

to my system.properties file the controller does not start and my server.log shows following:

 

[2016-07-24 08:37:11,905] <launcher> INFO system - Setting LED status to INITIALIZING
[2016-07-24 08:37:16,233] <db-server> ERROR system - [exec] error, rc=1
[2016-07-24 08:37:21,397] <db-server> ERROR system - [exec] error, rc=1

 

Can you please verify the proper steps to get mongod.log going? I think we need that to properly troubleshoot why the controller does not start.

 

Please give kudo's to the people who have helped you and mark your thread as solved when you receive a solution to your issue.
For a deeper understanding on how WiFi works.
Certified UEWA, ACSP, ACTC
New Member
Posts: 38
Registered: ‎11-30-2015
Kudos: 21

Re: Cloud Key Issue

+1 for anyway to pull the configuration for the unifi controller webui out to put on a new cloudkey?

 

@UBNT-Cody

Ubiquiti Employee
Posts: 4,896
Registered: ‎06-18-2015
Kudos: 1533
Solutions: 456

Re: Cloud Key Issue


@coastalcruiser wrote:

UBNT-Cody wrote:...I suspect the error is appearing because downgrades aren't typically supported (or can yield unexpected results...).

Hello @UBNT-Cody,

 

Excuse me please. Regarding this caution on downgrading, when I received CK it came with FW v 0.4x and controller version 4.x. I upgraded the firmware (only) to 0.5x. In doing so the the controller was upgraded as well, to v5.x.

 

I do not desire to run 5.x on this system so I SSh'd in and downgraded the controller back to 4.x.

 

Question: Does the above action put the CK in a potentially unstable state? Are the FW versions tied to a specifc controller version on CK? Should I downgrde the firmware back 0.4x?

 

Thank you.

jim

 

 

 

 



Although there are no known issues with downgrading at the moment, downgrading is not officially supported or recommended. I suspecting at this point that the downgrade may be causing some of the issues on this thread (such as the note to downgrade to v3 first, and not starting the controller after a cold start).

 

As the Cloud Key is an appliance solution designed to run the latest controller release, the firmware bundles the latest controller release with the firmware (at the time when the FW was released). The firmware itself is essentially the OS image, customized for the hardware with drivers for the LED and reset button. The controller version isn't necessarly tied to the firmware - but since it comes preinstalled with a v5 controller, the user needs to purge the controller and reinstall the v4 they want to use, rather than downgrade.

 

You should not downgrade the device firmware - you will want to be on the latest release. My suggestion for anyone that is having problems after downgrading, rather than purging, is to first make sure the firmware is on the latest release (v0.5.0 at time of posting), then purge the controller, install v4.8.20, and configure the controller from scratch (don't restore a v5 backup).

 

In the future, when upgrading the CK firmware, it's important to take a backup of the v4.8.20 controller, upgrade the firmware (which will upgrade controller to v5.x), then purge and reinstall the latest v4.8.x controller, restoring from the backup during the install wizard.

UBNT_Alternate_Logo.png
Ubiquiti Networks Enterprise Support Team


UniFi Protect: UniFi Protect Help Center | Frequently Asked Questions

UniFi Video 3: UniFi Video Help Center | UFV3 User Guide


Ubiquiti Employee
Posts: 4,896
Registered: ‎06-18-2015
Kudos: 1533
Solutions: 456

Re: Cloud Key Issue

@osunifi,

 

Sorry, the argument does not require quotes.  To get logging, you will need to remove the quotes as such, or the mongod won't start:

 

unifi.db.extraargs=--logappend --logpath logs/mongod.log

UBNT_Alternate_Logo.png
Ubiquiti Networks Enterprise Support Team


UniFi Protect: UniFi Protect Help Center | Frequently Asked Questions

UniFi Video 3: UniFi Video Help Center | UFV3 User Guide


Ubiquiti Employee
Posts: 4,896
Registered: ‎06-18-2015
Kudos: 1533
Solutions: 456

Re: Cloud Key Issue

@jporozynski,

The only way to export the configuration is by downloading a controller backup - but the controller backup should not be restored to a controller version prior to the one it was generated on.

If your controller is not starting and you want to recover access, you should be able to upgrade to v5.0.7 to regain access - assuming you are having the same issue (controller won't start, saying with the "downgrade to v3" message in server.log).

UBNT_Alternate_Logo.png
Ubiquiti Networks Enterprise Support Team


UniFi Protect: UniFi Protect Help Center | Frequently Asked Questions

UniFi Video 3: UniFi Video Help Center | UFV3 User Guide


New Member
Posts: 38
Registered: ‎11-30-2015
Kudos: 21

Re: Cloud Key Issue

@UBNT-Cody

I never did a downgrade.  This is a true blue issue with no messing around with firmware other than the official upgrade to the latest build.  Please help me.  I think you are going to have a lot of customers in my boat if you don't get this resoved fast.

Ubiquiti Employee
Posts: 4,896
Registered: ‎06-18-2015
Kudos: 1533
Solutions: 456

Re: Cloud Key Issue


@jporozynski wrote:

@UBNT-Cody

I never did a downgrade.  This is a true blue issue with no messing around with firmware other than the official upgrade to the latest build.  Please help me.  I think you are going to have a lot of customers in my boat if you don't get this resoved fast.


Assuming you are running v5.0.6 or above (and haven't downgraded in the past, as you say); could you enable mongod logging as I explained above, then share both your server.log and mongod.log files?

UBNT_Alternate_Logo.png
Ubiquiti Networks Enterprise Support Team


UniFi Protect: UniFi Protect Help Center | Frequently Asked Questions

UniFi Video 3: UniFi Video Help Center | UFV3 User Guide


New Member
Posts: 38
Registered: ‎11-30-2015
Kudos: 21

Re: Cloud Key Issue

[ Edited ]

Here's my server.log

 

root@UniFi-CloudKey:/usr/lib/unifi/data# cat /logs/server.log
[2014-07-03 11:46:30,829] <unifi-monitor> INFO launcher - service_loop()
[2014-07-03 11:46:32,941] <unifi-monitor> INFO launcher - service_loop()
[2016-02-01 14:45:25,363] <unifi-monitor> INFO launcher - service_loop()
[2016-05-18 10:57:21,998] <UniFi> ERROR system - [exec] error, rc=134
[2016-06-07 08:37:01,807] <UniFi> ERROR system - [exec] error, rc=134
[2016-07-03 11:26:47,702] <UniFi> ERROR system - [exec] error, rc=134

 

NO Mongo!  Check below to see if there's any mistakes in my system.properties.

I'm trying to pull it up by typing: cat /logs/mongod.log

 

Here's a copy of my system.properties:

 

Welcome to UniFi CloudKey!

Last login: Mon Jul 25 13:13:45 2016
root@UniFi-CloudKey:~# cd /usr/lib/unifi/data
root@UniFi-CloudKey:/usr/lib/unifi/data# vi system.properties

## system.properties
#
# each unifi instance requires a set of ports:
#
# unifi.http.port=8080 # device inform
# unifi.https.port=8443 # controller UI / API
# portal.http.port=8880 # portal redirect port for HTTP
# portal.https.port=8843 # portal redirect port for HTTPs
# unifi.db.port=27117 # local-bound port for DB server
# unifi.stun.port=3478 # UDP port used for STUN
#
# system_ip=a.b.c.d # the IP devices should be talking to for inform
# unifi.db.nojournal=false # disable mongodb journaling
# unifi.db.extraargs # extra mongod args
#
## HTTPS options
# unifi.https.ciphers=TLS_RSA_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA
# unifi.https.sslEnabledProtocols=TLSv1,SSLv2Hello
#
# Ports reserved for device redirector. There is no need to open
# firewall for these ports on controller, however do NOT set
# controller to use these ports.
#
# portal.redirector.port=8881
# portal.redirector.port.wired=8882
#
#Mon Jul 25 18:14:06 UTC 2016
debug.device=warn
debug.mgmt=warn
debug.system=warn
download_timeframe=7
is_default=false
unifi.db.extraargs=--logappend --logpath logs/mongod.log
uuid=3cb11e7f-b53e-54f0-b707-785fd563d3b3
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
"system.properties" 34 lines, 1176 characters

 

Here's my Unifi service status

 

root@UniFi-CloudKey:/usr/lib/unifi/data# service unifi status
* unifi.service - unifi
Loaded: loaded (/lib/systemd/system/unifi.service; enabled)
Active: active (running) since Mon 2016-07-25 13:13:42 CDT; 12min ago
Process: 349 ExecStart=/usr/lib/unifi/bin/unifi.init start (code=exited, status=0/SUCCESS)
Main PID: 399 (jsvc)
CGroup: /system.slice/unifi.service
|-399 unifi -home /usr/lib/jvm/java-7-openjdk-armhf -cp /usr/share...
|-401 unifi -home /usr/lib/jvm/java-7-openjdk-armhf -cp /usr/share...
|-402 unifi -home /usr/lib/jvm/java-7-openjdk-armhf -cp /usr/share...
`-429 /usr/lib/jvm/java-7-openjdk-armhf/jre/bin/java -Xmx768M -XX:...

Ubiquiti Employee
Posts: 4,896
Registered: ‎06-18-2015
Kudos: 1533
Solutions: 456

Re: Cloud Key Issue

Did you restart the controller after adding that line?

UBNT_Alternate_Logo.png
Ubiquiti Networks Enterprise Support Team


UniFi Protect: UniFi Protect Help Center | Frequently Asked Questions

UniFi Video 3: UniFi Video Help Center | UFV3 User Guide


New Member
Posts: 38
Registered: ‎11-30-2015
Kudos: 21

Re: Cloud Key Issue

Rebooted it three times. No better :-(

Ubiquiti Employee
Posts: 4,896
Registered: ‎06-18-2015
Kudos: 1533
Solutions: 456

Re: Cloud Key Issue

I'm assuming there are no spaces or extra characters beyond that line that you added.

Can you check to see if mongod is running?

ps aux | grep mongod

Additionally, have you made any changes regarding Java? Have you checked your free space (df -h)?

UBNT_Alternate_Logo.png
Ubiquiti Networks Enterprise Support Team


UniFi Protect: UniFi Protect Help Center | Frequently Asked Questions

UniFi Video 3: UniFi Video Help Center | UFV3 User Guide


New Member
Posts: 38
Registered: ‎11-30-2015
Kudos: 21

Re: Cloud Key Issue

When I entered the line, rebooted, it had shifted to the second line up...and there's a bunch of "~" characters.  Should those be there? (see post a few up)

 

I haven't messed with Java.

Here's the results of the commands-

 

ps aux | grep mongod:


root 14280 0.0 0.0 2068 540 pts/1 S+ 16:36 0:00 grep mongod

 

df -h:


Filesystem Size Used Avail Use% Mounted on
aufs-root 1.1G 604M 450M 58% /
udev 10M 0 10M 0% /dev
tmpfs 202M 312K 201M 1% /run
/dev/disk/by-label/userdata 1.1G 604M 450M 58% /mnt/.rwfs
/dev/disk/by-partlabel/rootfs 271M 271M 0 100% /mnt/.rofs
tmpfs 504M 0 504M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 504M 0 504M 0% /sys/fs/cgroup
tmpfs 504M 64K 504M 1% /tmp
/dev/mmcblk0p7 1.5G 553M 897M 39% /srv

Ubiquiti Employee
Posts: 4,896
Registered: ‎06-18-2015
Kudos: 1533
Solutions: 456

Re: Cloud Key Issue

Would it be possible to get SSH access to your Cloud Key? If you could PM me credentials I'd appreciate it.

UBNT_Alternate_Logo.png
Ubiquiti Networks Enterprise Support Team


UniFi Protect: UniFi Protect Help Center | Frequently Asked Questions

UniFi Video 3: UniFi Video Help Center | UFV3 User Guide


Ubiquiti Employee
Posts: 4,896
Registered: ‎06-18-2015
Kudos: 1533
Solutions: 456

Re: Cloud Key Issue

@jporozynski,

 

I was able to log into your controller.  You did correctly enable logging, mongod.log is available under /srv/unifi/logs/ as expected.

 

It appears that the _local_ database was damaged by the hard shutdown though.  I don't think it can be repaired, but I will look into it further.  At the moment, the easiest way to get the controller back online would be to restore from a backup.

UBNT_Alternate_Logo.png
Ubiquiti Networks Enterprise Support Team


UniFi Protect: UniFi Protect Help Center | Frequently Asked Questions

UniFi Video 3: UniFi Video Help Center | UFV3 User Guide


Established Member
Posts: 1,131
Registered: ‎12-12-2015
Kudos: 397
Solutions: 19

Re: Cloud Key Issue

Just found this thread.  We're having different Cloudkeys gone at least once a week.  I'm downloading a config backup after every little change I make.  After a crash I reset th CK and upload the config.  Not ideal to say the least.

 

I first thought the CK was to be blamed directly, but indeed, we do have the occasional power loss.  Thinking to put the CK behind a UPS.  Talking about overkill :-)

Reply