-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Defined MONGO_HOST is not reachable #25
Comments
Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid. |
You need to put them on a user defined bridge network. The default bridge does not allow container to container name resolution |
Thanks. I’ll try that. |
This didn't work. I created a custom docker network with the command |
Same error here. I used a |
This doesn’t work for me. The mongodb docker has been running for several days but I still get an error when trying to start UNA. |
Same issue here. If I docker exec into the container to run a wget $MONGO_HOST:$MONGO_PORT it works, really confusing |
Actually, I see in the init script here Line 26 in d571bd1
nc , but I can't find that binary in the image 🤔
|
|
Same issue. After using |
It was closed because the original issue was the user didn't have the containers on the same custom docker bridge so they couldn't talk with each other. |
While that was part of the problem, fixing it didn’t resolve the issue. I was able to resolve it using the MongoDB init js file instead of the init variables in the MongoDB docker though. So I guess the original issue is resolved. |
Hi all having the same issue. version: "2.1"
services:
unifi-app:
image: lscr.io/linuxserver/unifi-network-application:latest
container_name: unifi-app
depends_on:
- unifi-db
networks:
- unifi-net
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Prague
- MONGO_USER=unifi
- MONGO_PASS=unifi
- MONGO_HOST=unifi-db
- MONGO_PORT=27017
- MONGO_DBNAME=unifi
volumes:
- /volume1/docker/unifi-app/app:/config
ports:
- 8443:8443
- 3478:3478/udp
- 10001:10001/udp
- 8080:8080
# - 1900:1900/udp #optional
- 8843:8843 #optional
- 8880:8880 #optional
- 6789:6789 #optional
- 5514:5514/udp #optional
restart: unless-stopped
unifi-db:
image: mongo:4.4.25
container_name: unifi-db
networks:
- unifi-net
ports:
- 27017:27017
volumes:
- /volume1/docker/unifi-app/db/data:/data/db
- /volume1/docker/unifi-app/db/init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro
- /volume1/docker/unifi-app/db/config:/data/configdb
restart: unless-stopped
healthcheck:
test: ["CMD", "mongo", "--eval", "db.adminCommand('ping')"]
interval: 10s
timeout: 10s
retries: 5
start_period: 20s
networks:
unifi-net:
driver: bridge 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"}]}); |
@myazaki please open a new issue and provide the information requested. |
Is there an existing issue for this?
Current Behavior
I am trying to migrate from LSIO Unifi Controller on Unraid to LSIO UNA.
I have installed MongoDB official docker with the following docker run-
docker run
-d
--name='unifi-network-application'
--net='bridge'
-e TZ="America/New_York"
-e HOST_OS="Unraid"
-e HOST_HOSTNAME="Brunnhilde"
-e HOST_CONTAINERNAME="unifi-network-application"
-e 'MONGO_USER'='unifi'
-e 'MONGO_PASS'='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 '6789:6789/tcp'
-p '5514:5514/udp'
-v '/mnt/cache/appdata/unifi-network-application':'/config':'rw' 'lscr.io/linuxserver/unifi-network-application'
1e4456c02dc6cc046c505304d5fc68e61891b46b3d0cf4b4d2a995d360ccd312
The command finished successfully!
I have installed UNA with the following docker run-
docker run
-d
--name='unifi-network-application'
--net='bridge'
-e TZ="America/New_York"
-e HOST_OS="Unraid"
-e HOST_HOSTNAME="Brunnhilde"
-e HOST_CONTAINERNAME="unifi-network-application"
-e 'MONGO_USER'='unifi'
-e 'MONGO_PASS'='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 '6789:6789/tcp'
-p '5514:5514/udp'
-v '/mnt/cache/appdata/unifi-network-application':'/config':'rw' 'lscr.io/linuxserver/unifi-network-application'
1e4456c02dc6cc046c505304d5fc68e61891b46b3d0cf4b4d2a995d360ccd312
The command finished successfully!
When I try to start the UNA docker the log shows that the host db is unreachable. I suspect that my MongoDB docker is missing a variable for the host db but I'm unable to find the proper variable.
Expected Behavior
No response
Steps To Reproduce
install docker
Environment
CPU architecture
x86-64
Docker creation
Container logs
The text was updated successfully, but these errors were encountered: