martes, 26 de marzo de 2019

Failed to Start MongoD on CloudKey

Failed to Start MongoD on CloudKey (my solution)

 [ New ] 
i had problems to reboot the CloudKey.
After reboot i could not reconnect.

tail -f /usr/lib/unifi/logs/server.log

[2018-09-25 07:33:06,146] <db-server> INFO db - DbServer stopped
[2018-09-25 07:33:10,514] <db-server> ERROR system - [exec] error, rc=100, cmdline=[bin/mongod, --dbpath, /usr/lib/unifi/data/db, --port, 27117, --unixSocketPrefix, /usr/lib/unifi/run, --noprealloc, --nohttpinterface, --journal, --smallfiles, --bind_ip, 127.0.0.1]

i stopped the services

systemctl stop unifi 

and try repair database

mongod --dbpath /usr/lib/unifi/data/db --repair


get the error 

**************
Error: journal files are present in journal directory, yet starting without journaling enabled.
It is recommended that you start with journaling enabled so that recovery may occur.
**************

then i removed the journal files

cd /usr/lib/unifi/data/db/journal
rm *

after that i start repair the database

mongod --dbpath /usr/lib/unifi/data/db --repair

and start the service

 systemctl start unifi

[2018-09-25 07:33:18,409] <launcher> INFO db - waiting for db connection...
[2018-09-25 07:44:59,388] <launcher> INFO system - ======================================================================
[2018-09-25 07:44:59,394] <launcher> INFO system - UniFi 5.8.30 (build atag_5.8.30_11076 - release) is started
[2018-09-25 07:44:59,395] <launcher> INFO system - ======================================================================
[2018-09-25 07:44:59,409] <launcher> INFO system - BASE dir:/usr/lib/unifi
[2018-09-25 07:44:59,494] <launcher> INFO system - Current System IP: 172.16.12.3
[2018-09-25 07:44:59,496] <launcher> INFO system - Hostname: UniFi-CloudKey
[2018-09-25 07:45:01,271] <launcher> INFO system - UniFi Cloudkey, UUID = ebcadbbc-dfb7-5860-aeee-76ca1104bf0b
[2018-09-25 07:45:11,043] <launcher> INFO db - waiting for db connection...
[2018-09-25 07:45:11,559] <launcher> INFO db - Connecting to mongodb://127.0.0.1:27117

now i cant login to the controller local but login over unifi.ubnt.com
get the messege Invalid username and/or password. after local login 
but i can local login to manage the cloudkey

then i changed the password on the cloudkey management.
now its fine. login to unifi works local

sorry for my english Man Happy
i try to do my best .....

Cloudkey
Version
v0.11.12
Version
5.8.30-11076-1

****tomado de forum unifi ubiquiti