So I've managed to get the Unifi Controller image working with an external database however the Unifi Controller never actually starts up. Using MongoDB 3.4.19. The Server.log stops adding entries after it connects to the database and the mongod.log is never created.
[2019-02-10 18:37:32,771] <launcher> INFO system - *** Running for the first time, creating identity ***
[2019-02-10 18:37:32,779] <launcher> INFO system - UUID: bf5e13cf-3c84-476b-aaa3-e9feb51ae995
[2019-02-10 18:37:32,820] <launcher> INFO system - ======================================================================
[2019-02-10 18:37:32,821] <launcher> INFO system - UniFi 5.6.40 (build atag_5.6.40_10370 - release) is started
[2019-02-10 18:37:32,821] <launcher> INFO system - ======================================================================
[2019-02-10 18:37:32,828] <launcher> INFO system - BASE dir:/usr/lib/unifi
[2019-02-10 18:37:32,848] <launcher> INFO system - Current System IP: 192.168.0.1
[2019-02-10 18:37:32,848] <launcher> INFO system - Hostname: unifi-controller-5bb95c7688-xj99j
[2019-02-10 18:37:36,202] <launcher> INFO db - waiting for db connection...
[2019-02-10 18:37:36,722] <launcher> INFO db - Connecting to mongodb://ubnt:PASSWORD@unifi-controller-mongodb:27017/unifi
[2019-02-10 18:37:51,296] <launcher> INFO db - Connecting to mongodb://ubnt:PASSWORD@unifi-controller-mongodb:27017/unifi_stat
[2019-02-10 18:37:54,295] <launcher> INFO webrtc - WebRTC library version: EvoStream Media Server (www.evostream.com) build v1.0.31 - Gladiator - (built for Debian-7.0.5-x86_64 on 2018-02-01T22:48:38.000) OpenSSL version: 1.0.2l usrsctp version: 6d79bcc19755bc08 compiled on machine: Linux debian-7-0-5-64 3.2.0-4-amd64 #1 SMP Debian 3.2.68-1+deb7u6 x86_64 GNU/Linux
[2019-02-10 18:38:56,232] <autoupdate-check> INFO system - firmware[U7E] new version (3.8.17.6789) is available
[2019-02-10 18:38:56,233] <autoupdate-check> INFO system - firmware[U7MP] new version (4.0.21.9965) is available
[2019-02-10 18:38:56,233] <autoupdate-check> INFO system - firmware[U7SHD] new version (4.0.21.9965) is available
[2019-02-10 18:38:56,233] <autoupdate-check> INFO system - firmware[US48] new version (4.0.21.9965) is available
[2019-02-10 18:38:56,233] <autoupdate-check> INFO system - firmware[U7O] new version (3.8.17.6789) is available
[2019-02-10 18:38:56,234] <autoupdate-check> INFO system - firmware[U7P] new version (4.0.15.9872) is available
[2019-02-10 18:38:56,234] <autoupdate-check> INFO system - firmware[U7PG2] new version (4.0.21.9965) is available
[2019-02-10 18:38:56,234] <autoupdate-check> INFO system - firmware[U7EDU] new version (4.0.21.9965) is available
[2019-02-10 18:38:56,234] <autoupdate-check> INFO system - firmware[U7IW] new version (4.0.21.9965) is available
[2019-02-10 18:38:56,234] <autoupdate-check> INFO system - firmware[US48P500] new version (4.0.21.9965) is available
[2019-02-10 18:38:56,234] <autoupdate-check> INFO system - firmware[USXG] new version (4.0.21.9965) is available
[2019-02-10 18:38:56,234] <autoupdate-check> INFO system - firmware[S216150] new version (4.0.21.9965) is available
[2019-02-10 18:38:56,234] <autoupdate-check> INFO system - firmware[BZ2LR] new version (4.0.15.9872) is available
[2019-02-10 18:38:56,234] <autoupdate-check> INFO system - firmware[U7LT] new version (4.0.21.9965) is available
[2019-02-10 18:38:56,234] <autoupdate-check> INFO system - firmware[U7LR] new version (4.0.21.9965) is available
[2019-02-10 18:38:56,234] <autoupdate-check> INFO system - firmware[UHDIW] new version (4.0.21.9965) is available
[2019-02-10 18:38:56,234] <autoupdate-check> INFO system - firmware[U2Sv2] new version (4.0.15.9872) is available
[2019-02-10 18:38:56,234] <autoupdate-check> INFO system - firmware[US24P500] new version (4.0.21.9965) is available
[2019-02-10 18:38:56,234] <autoupdate-check> INFO system - firmware[US24PL2] new version (4.0.21.9965) is available
[2019-02-10 18:38:56,234] <autoupdate-check> INFO system - firmware[US48P750] new version (4.0.21.9965) is available
[2019-02-10 18:38:56,234] <autoupdate-check> INFO system - firmware[S224250] new version (4.0.21.9965) is available
[2019-02-10 18:38:56,235] <autoupdate-check> INFO system - firmware[S248750] new version (4.0.21.9965) is available
[2019-02-10 18:38:56,235] <autoupdate-check> INFO system - firmware[S224500] new version (4.0.21.9965) is available
[2019-02-10 18:38:56,235] <autoupdate-check> INFO system - firmware[US24] new version (4.0.21.9965) is available
[2019-02-10 18:38:56,235] <autoupdate-check> INFO system - firmware[US8P60] new version (4.0.21.9965) is available
[2019-02-10 18:38:56,235] <autoupdate-check> INFO system - firmware[U2IW] new version (4.0.15.9872) is available
[2019-02-10 18:38:56,235] <autoupdate-check> INFO system - firmware[U5O] new version (4.0.15.9872) is available
[2019-02-10 18:38:56,235] <autoupdate-check> INFO system - firmware[U2HSR] new version (4.0.15.9872) is available
[2019-02-10 18:38:56,235] <autoupdate-check> INFO system - firmware[U7NHD] new version (4.0.21.9965) is available
[2019-02-10 18:38:56,235] <autoupdate-check> INFO system - firmware[USC8] new version (4.0.21.9965) is available
[2019-02-10 18:38:56,235] <autoupdate-check> INFO system - firmware[US8P150] new version (4.0.21.9965) is available
[2019-02-10 18:38:56,235] <autoupdate-check> INFO system - firmware[U7HD] new version (4.0.21.9965) is available
[2019-02-10 18:38:56,235] <autoupdate-check> INFO system - firmware[US16P150] new version (4.0.21.9965) is available
[2019-02-10 18:38:56,235] <autoupdate-check> INFO system - firmware[BZ2] new version (4.0.15.9872) is available
[2019-02-10 18:38:56,235] <autoupdate-check> INFO system - firmware[US8] new version (4.0.21.9965) is available
[2019-02-10 18:38:56,235] <autoupdate-check> INFO system - firmware[US48PL2] new version (4.0.21.9965) is available
[2019-02-10 18:38:56,235] <autoupdate-check> INFO system - firmware[US24P250] new version (4.0.21.9965) is available
[2019-02-10 18:38:56,236] <autoupdate-check> INFO system - firmware[U7MSH] new version (4.0.21.9965) is available
[2019-02-10 18:38:56,236] <autoupdate-check> INFO system - firmware[U7IWP] new version (4.0.21.9965) is available
[2019-02-10 18:38:56,236] <autoupdate-check> INFO system - firmware[UGW4] new version (4.4.29.5124212) is available
[2019-02-10 18:38:56,236] <autoupdate-check> INFO system - firmware[UGW3] new version (4.4.29.5124210) is available
[2019-02-10 18:38:56,240] <autoupdate-check> INFO system - firmware[S28150] new version (4.0.21.9965) is available
[2019-02-10 18:38:56,240] <autoupdate-check> INFO system - firmware[U2Lv2] new version (4.0.15.9872) is available
[2019-02-10 18:38:56,240] <autoupdate-check> INFO system - firmware[U2O] new version (4.0.15.9872) is available
[2019-02-10 18:38:56,240] <autoupdate-check> INFO system - firmware[U7Ev2] new version (3.8.17.6789) is available
[2019-02-10 18:38:56,240] <autoupdate-check> INFO system - firmware[UGWXG] new version (4.4.29.5124239) is available
[2019-02-10 18:38:56,240] <autoupdate-check> INFO system - firmware[S248500] new version (4.0.21.9965) is available
If I manually connect to the database and run a show collections I can see that the controller has talked to the database as there are many new collections obviously created by the controller. EG: firewallgroup, broadcastgroup, networkconf, etc.
$> mongo -host mongodb://ubnt:PASSWORD@unifi-controller-mongodb:27017/unifi
MongoDB shell version v3.4.19
connecting to: mongodb://ubnt:PASSWORD@unifi-controller-mongodb:27017/unifi
MongoDB server version: 3.4.19
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
http://docs.mongodb.org/
Questions? Try the support group
http://groups.google.com/group/mongodb-user
> show collections
account
admin
alarm
broadcastgroup
device
dpiapp
dpigroup
dynamicdns
event
extension
firewallgroup
firewallrule
guest
heatmap
heatmappoint
hotspot2conf
hotspotop
hotspotpackage
map
mediafile
networkconf
payment
portalfile
portconf
portforward
privilege
radiusprofile
rogue
rogueknown
routing
scheduletask
setting
site
stat
tag
task
user
usergroup
verification
voucher
wall
wlanconf
wlangroup
Here are the logs from STDOUT:
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 10-adduser: executing...
-------------------------------------
_ ()
| | ___ _ __
| | / __| | | / \
| | \__ \ | | | () |
|_| |___/ |_| \__/
Brought to you by linuxserver.io
We gratefully accept donations at:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------
User uid: 1002
User gid: 1007
-------------------------------------
[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-config: executing...
[cont-init.d] 20-config: exited 0.
[cont-init.d] 30-keygen: executing...
Warning:
The JKS keystore uses a proprietary format. It is recommended to migrate to PKCS12 which is an industry standard format using "keytool -importkeystore -srckeystore /config/data/keystore -destkeystore /config/data/keystore -deststoretype pkcs12".
[cont-init.d] 30-keygen: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
And lastly a lame attempt at starting the service manually:
root@unifi-controller-c76f46bcc-nnrhh:/usr/lib/unifi# service unifi status
* unifi is not running
root@unifi-controller-c76f46bcc-nnrhh:/usr/lib/unifi# service unifi start
* Starting Ubiquiti UniFi Controller unifi [fail]
root@unifi-controller-c76f46bcc-nnrhh:/usr/lib/unifi# service unifi stop
* Stopping Ubiquiti UniFi Controller unifi [ OK ]
root@unifi-controller-c76f46bcc-nnrhh:/usr/lib/unifi# service unifi start
* Starting Ubiquiti UniFi Controller unifi [fail]
Any idea how I can continue troubleshooting from here? I'm at my witts end unfortunately after 2 days of work.