linuxserver / docker-unifi-network-application

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

[BUG] unifi-db is not reachable #52

Closed JGNi closed 5 months ago

JGNi commented 5 months ago

Is there an existing issue for this?

Current Behavior

I'm to newbie in this, to understand if this has been adressed before. But then please let me know.

I get the following in my unRAID installation.

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

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

Waiting for MONGO_HOST unifi-db to be reachable. Defined MONGO_HOST unifi-db is not reachable, cannot proceed.

Expected Behavior

Container running, so that I can open the GUI

Steps To Reproduce

Installed it from app store in unRAID, and ran it with default settings + MongoDB password

Environment

- OS:unRAID 6.12.6
- How docker service was installed: unRAID -> Apps

CPU architecture

x86-64

Docker creation

docker run
  -d
  --name='unifi-network-application'
  --net='bridge'
  -e TZ="Europe/Paris"
  -e HOST_OS="Unraid"
  -e HOST_HOSTNAME="Vader"
  -e HOST_CONTAINERNAME="unifi-network-application"
  -e 'MONGO_USER'='unifi'
  -e 'MONGO_PASS'='MY_OWN_CHOSEN_PASSWORD'
  -e 'MONGO_HOST'='unifi-db'
  -e 'MONGO_PORT'='27017'
  -e 'MONGO_DBNAME'='unifi'
  -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'
  -p '8443:8443/tcp'
  -p '3478:3478/udp'
  -p '10001:10001/udp'
  -p '8080:8080/tcp'
  -p '1900:1900/udp'
  -p '8843:8843/tcp'
  -p '8880:8880/tcp'
  -p '6790:6790/tcp'
  -p '5514:5514/udp'
  -v '/mnt/user/appdata/unifi-network-application':'/config':'rw' 'lscr.io/linuxserver/unifi-network-application'

Container logs

root@Servername:~# docker logs unifi-network-application 
[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
───────────────────────────────────────

*** Waiting for MONGO_HOST unifi-db to be reachable. ***
*** Defined MONGO_HOST unifi-db is not reachable, cannot proceed. ***
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.

j0nnymoe commented 5 months ago

Did you setup the mongodb container as per our readme?

JGNi commented 5 months ago

Did you setup the mongodb container as per our readme?

No. I've now read it. I'm not sure I understand how it's done?

dobbsrx commented 5 months ago

I am also confused on the mongodb ... I've never had to setup a mongo container before. can someone ELI5 the process?

More specifically, I am not understanding the attachment point for mongodb

/path/to/init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro

I understand my file, but ":/docker-entrypoint-initdb.d/init-mongo.js:ro" is confusing me when trying to create the path inside the mongodb container

aptalca commented 5 months ago

Mongodb is a database like mysql, mariadb, etc.

Previously our unifi container had mongodb built in. However, due to version mismatches, we are no longer able to bundle it with unifi. So you need to set one up separately. The init-mongo.js file is an initialization config file we suggest so the necessary database and user for unifi is created in mongodb on first run and then unifi can connect to it and use it.

Keep in mind that it's unusual for us to bundle the db in (unless it's sqlite). So now it's more in line with the rest of our images where the db is external.

Closing this thread. If you're confused about the readme instructions and need help, feel free to stop by our discord.

GigaFyde commented 5 months ago

@aptalca could that message possibly be included into the deprecation notice? That it's due to version mismatches?

aptalca commented 5 months ago

That repo is archived. We had numerous notices about it. https://info.linuxserver.io/issues/2024-01-01-unifi-controller/