Closed corincorvus closed 4 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.
Edit: Serverlog of Controller Container send:
[2024-02-01 12:28:46,944] <launcher> INFO db - db connection established...
[2024-02-01 12:28:47,520] <launcher> ERROR db - Got error while connecting to db: Exception authenticating MongoCredential{mechanism=SCRAM-SHA-1, userName=''unifi'', source=''unifi'', password=<hidden>, mechanismProperties=<hidden>}
how? i used a very easy password... i tried with '', with "" and without "" on Compose. Every time the Same.-
You're putting " 's where they shouldn't be in your compose.
You're putting " 's where they shouldn't be in your compose.
Same issue:
---
services:
unifi-controller:
image: lscr.io/linuxserver/unifi-network-application:latest
environment:
- PUID=1001
- PGID=1001
- MONGO_USER=unifi
- MONGO_PASS=unifipass
- MONGO_HOST=unifi-db
- MONGO_PORT=27017
- MONGO_DBNAME=unifi
- TZ=Europe/Berlin
- MEM_LIMIT=4096 #optional
- MEM_STARTUP=2048 #optional
volumes:
- unifi-data:/config
ports:
- 3478:3478/udp # Unifi STUN port
- 10001:10001/udp # Required for AP discovery
- 8080:8080 # Required for device communication
- 8081:8081
- 8443:8443 # Unifi web admin port
- 1900:1900/udp # optional Required for Make controller discoverable on L2 network option
- 8843:8843 # Unifi guest portal HTTPS redirect port
- 8880:8880 # Unifi guest portal HTTP redirect port
- 6789:6789 # For mobile throughput test
- 5514:5514/udp # optional Remote syslog port
restart: unless-stopped
depends_on:
- unifi-db
unifi-db:
image: docker.io/mongo:4.4
container_name: unifi-db
volumes:
- unifi-db:/data/db
- /opt/ct/unifi/db/init/init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro
restart: unless-stopped
volumes:
unifi-db:
unifi-data:
MONGO_PASS="unifipass
I would at this point suggest starting fresh as I don't believe they change after first deployment.
MONGO_PASS="unifipass
I would at this point suggest starting fresh as I don't believe they change after first deployment.
services:
unifi-controller:
image: lscr.io/linuxserver/unifi-network-application:latest
environment:
- PUID=1001
- PGID=1001
- MONGO_USER=unifi
- MONGO_PASS=unifi
- MONGO_HOST=unifi-db
- MONGO_PORT=27017
- MONGO_DBNAME=unifi
- TZ=Europe/Berlin
- MEM_LIMIT=4096 #optional
- MEM_STARTUP=2048 #optional
volumes:
- /opt/ct/unifi/config:/config
ports:
- 3478:3478/udp # Unifi STUN port
- 10001:10001/udp # Required for AP discovery
- 8080:8080 # Required for device communication
- 8081:8081
- 8443:8443 # Unifi web admin port
- 1900:1900/udp # optional Required for Make controller discoverable on L2 network option
- 8843:8843 # Unifi guest portal HTTPS redirect port
- 8880:8880 # Unifi guest portal HTTP redirect port
- 6789:6789 # For mobile throughput test
- 5514:5514/udp # optional Remote syslog port
restart: unless-stopped
depends_on:
- unifi-db
unifi-db:
image: docker.io/mongo:4.4.28
environment:
- MONGO_DBNAME=unifi
- MONGO_USER=unifi
- MONGO_PASS=unifi
volumes:
- unifi-db:/data/db
- /opt/ct/unifi/db/init/init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro
restart: unless-stopped
volumes:
unifi-db:
unifi-data:
Deployed on another machine with fresh init.
As per our docs, we don't suggest using both env's for user/pass + the init file.
As per our docs, we don't suggest using both env's for user/pass + the init file.
yea at the moment i am looking for solutions in the issues, where users said: "it works", cause the docs not work.
The docs not work.
Resettet Test Machine: Compose:
services:
unifi-controller:
image: lscr.io/linuxserver/unifi-network-application:latest
environment:
- PUID=1001
- PGID=1001
- MONGO_USER=unifi
- MONGO_PASS=unifi
- MONGO_HOST=unifi-db
- MONGO_PORT=27017
- MONGO_DBNAME=unifi
- TZ=Europe/Berlin
- MEM_LIMIT=4096 #optional
- MEM_STARTUP=2048 #optional
volumes:
- /opt/ct/unifi/config:/config
ports:
- 3478:3478/udp # Unifi STUN port
- 10001:10001/udp # Required for AP discovery
- 8080:8080 # Required for device communication
- 8081:8081
- 8443:8443 # Unifi web admin port
- 1900:1900/udp # optional Required for Make controller discoverable on L2 network option
- 8843:8843 # Unifi guest portal HTTPS redirect port
- 8880:8880 # Unifi guest portal HTTP redirect port
- 6789:6789 # For mobile throughput test
- 5514:5514/udp # optional Remote syslog port
restart: unless-stopped
depends_on:
- unifi-db
unifi-db:
image: docker.io/mongo:4.4
volumes:
- unifi-db:/data/db
- /opt/ct/unifi/db/init/init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro
restart: unless-stopped
volumes:
unifi-db:
unifi-data:
No Volumes of Unifi:
root@network:/opt/ct/unifi/db/init# docker volume list
DRIVER VOLUME NAME
local portainer_data
root@network:/opt/ct/unifi/db/init#
Config folger for controller is empty: drwxrwx--- 4 unifi unifi 4096 Feb 1 12:26 .. drwxrwx--- 2 unifi unifi 4096 Feb 1 12:51 . root@network:/opt/ct/unifi/config#
init: root@network:/opt/ct/unifi/db/init# ls init-mongo.js root@network:/opt/ct/unifi/db/init# cat init-mongo.js db.getSiblingDB("unifi").createUser({user: "unifi", pwd: "unifi", roles: [{role: "dbOwner", db: "unifi"}]}); db.getSiblingDB("unifi_stat").createUser({user: "unifi", pwd: "unifi", roles: [{role: "dbOwner", db: "unifi_stat"}]}); root@network:/opt/ct/unifi/db/init#
I Deploy:
Log Controller
[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: 1001
User GID: 1001
───────────────────────────────────────
*** Waiting for MONGO_HOST unifi-db to be reachable. ***
Generating 4,096 bit RSA key pair and self-signed certificate (SHA384withRSA) with a validity of 3,650 days
for: CN=unifi
[custom-init] No custom files found, skipping...
Serverlog:
same....
[2024-02-01 12:55:59,450] <launcher> INFO db - db connection established...
[2024-02-01 12:55:59,976] <launcher> ERROR db - Got error while connecting to db: Exception authenticating MongoCredential{mechanism=SCRAM-SHA-1, userName='unifi', source='unifi', password=<hidden>, mechanismProperties=<hidden>}
[2024-02-01 12:56:00,477] <launcher> INFO db - db connection established...
[2024-02-01 12:56:00,999] <launcher> ERROR db - Got error while connecting to db: Exception authenticating MongoCredential{mechanism=SCRAM-SHA-1, userName='unifi', source='unifi', password=<hidden>, mechanismProperties=<hidden>}
[2024-02-01 12:56:01,500] <launcher> INFO db - db connection established...
You are welcome to test whatever you like. The docs work for thousands of other people just fine. I would suggest that if you need further assistance, you visit discord to ask for help as a github issue is not the appropriate place to seek guidance.
As a note, we do not support or recommend using portainer to deploy our containers. https://docs.linuxserver.io/misc/support-policy/
Is there an existing issue for this?
Current Behavior
I try to deploy the container, the container starts, a cert will created, but i only get 404 on webbrowser. I tried to restart the controller container, but its not coming up. I also removed the containers, deleted the volumes and tried again. same problem. I tried to first start only db, second the controller. dont work also (i saw it in other issue)
After Deploy on db Container is visible the initscript is used, the db container restarts after. Connection with Controller and db comes up, but nothing work
Before i set an strong password, i use "unifipass"
Expected Behavior
The Unifi controller is visible
Steps To Reproduce
Environment
CPU architecture
x86-64
Docker creation
Container logs