linuxserver / docker-unifi-network-application

GNU General Public License v3.0
551 stars 40 forks source link

MONGO DB Connection Error #58

Closed ajicles closed 5 months ago

ajicles commented 5 months ago

Is there an existing issue for this?

Current Behavior

[2024-01-22 12:11:47,980] ERROR db - Got error while connecting to db: Exception authenticating MongoCredential{mechanism=SCRAM-SHA-1, userName='unifi', source='unifi', password=, mechanismProperties=} [2024-01-22 12:11:48,480] INFO db - db connection established... [2024-01-22 12:11:48,993] ERROR db - Got error while connecting to db: Exception authenticating MongoCredential{mechanism=SCRAM-SHA-1, userName='unifi', source='unifi', password=, mechanismProperties=} [2024-01-22 12:11:49,494] INFO db - db connection established... [2024-01-22 12:11:50,007] ERROR db - Got error while connecting to db: Exception authenticating MongoCredential{mechanism=SCRAM-SHA-1, userName='unifi', source='unifi', password=, mechanismProperties=} [2024-01-22 12:11:50,507] INFO db - db connection established... [2024-01-22 12:11:51,023] ERROR db - Got error while connecting to db: Exception authenticating MongoCredential{mechanism=SCRAM-SHA-1, userName='unifi', source='unifi', password=, mechanismProperties=}

Expected Behavior

Connection to Mongo DB to succeed.

Steps To Reproduce

Setup controller as per documentation. Was able to restore from backups and migration from deprecated LSIO docker image. Few weeks later /usr/lib/unifi/logs/server.log reporting error with connection to MongoDB.

Verified that credentials work:

mongosh -u unifi -p <redacted> mongodb://localhost:27017/unifidb
unifidb> 

Connection string in /usr/lib/unifi/data/system.properties statdb.mongo.uri=mongodb\://unifi\:<redacted>@192.168.111.46\:27017/unifi_stat?tls\=false

Environment

- OS: unRaid
- How docker service was installed:
Docker Server is already apart of unRaid.

CPU architecture

x86-64

Docker creation

docker run
  -d
  --name='unifi-network-application'
  --net='br0'
  --ip='192.168.111.10'
  -e TZ="America/New_York"
  -e HOST_OS="Unraid"
  -e HOST_HOSTNAME="Tower"
  -e HOST_CONTAINERNAME="unifi-network-application"
  -e 'TCP_PORT_8443'='8443'
  -e 'UDP_PORT_3478'='3478'
  -e 'UDP_PORT_10001'='10001'
  -e 'TCP_PORT_8080'='8080'
  -e 'UDP_PORT_1900'='1900'
  -e 'TCP_PORT_8843'='8843'
  -e 'TCP_PORT_8880'='8880'
  -e 'TCP_PORT_6789'='6789'
  -e 'UDP_PORT_5514'='5514'
  -e 'MONGO_USER'='unifi'
  -e 'MONGO_PASS'='<redacted>'
  -e 'MONGO_HOST'='192.168.111.46'
  -e 'MONGO_PORT'='27017'
  -e 'MONGO_DBNAME'='unifidb'
  -e 'MEM_LIMIT'='1024'
  -e 'MEM_STARTUP'='1024'
  -e 'MONGO_TLS'=''
  -e 'MONGO_AUTHSOURCE'=''
  -e 'PUID'='99'
  -e 'PGID'='100'
  -e 'UMASK'='022'
  -l net.unraid.docker.managed=dockerman
  -l net.unraid.docker.icon='https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/unifi-network-application-icon.png'
  -v '/mnt/user/appdata/unifi-network-application':'/config':'rw' 'lscr.io/linuxserver/unifi-network-application'
e2b1fd1d81d515e06d3e19d82d6e624cfe192033d2d135ec7fdc19b21bbda23d

Container logs

[migrations] started
[migrations] no migrations found
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    99
User GID:    100
───────────────────────────────────────

[custom-init] No custom files found, skipping...
github-actions[bot] commented 5 months ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.