Closed juniorUniv 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.
Deployment managed by Portainer 2,19 /Stacks Ill start here - we do not support portainer - https://docs.linuxserver.io/misc/support-policy/
before i close it, i will note something you should've seen while posting all these screenshots.
subnet: "172.30.1.0/16"
as you can see, you're forcing an ip subnet and it's not being used. this is one of the reasons we do not support portainer. I suggest that you leverage a supported method of deploying your containers, otherwise, you're going to struggle.
All said, the logs tell you the issue, unifi-network-application can't reach the unifi-db. Until you fix that, it will not work.
Is there an existing issue for this?
Current Behavior
this is another derivate from the CLOSED issue related to error from Unifi NatwApp container on Synology: Defined MONGO_HOST unifi-db is not reachable, cannot proceed.
Deployment managed by Portainer 2,19 /Stacks
Check list: Firewall checked, defined Rule for the subnet from the Compose. Done. Remote control of the MongoDB by MongoDB Compass Desktop ver. As expected. Connection string:![image](https://github.com/linuxserver/docker-unifi-network-application/assets/55238022/8d4f3dc6-8fa0-4f77-b532-b3862dc9fe7a)
mongodb://unifi:COMPOSEPSW@NASIP:27117/?authMechanism=DEFAULT&authSource=unifi
tested initialized "unifi" DB users:![image](https://github.com/linuxserver/docker-unifi-network-application/assets/55238022/4101c128-9d65-4531-b4e4-c006800b2ce6)
same result for the "unifi_stat" DB
test of role:
db.getRole("dbOwner")
result:{ role: 'dbOwner', db: 'unifi' ....
Same for the DB unifi_statSo, port mapping is working and Mongo is available from outside. Manageable.
CLI from NAS environment:
docker exec unifi-db env | grep -E 'PUID|PGID' PUID=SAME AS IN the COMPOSE PGID=SAME AS IN the COMPOSE
ordocker exec unifi-network-application env | grep -E 'PUID|PGID' PUID=SAME AS IN the COMPOSE PGID=SAME AS IN the COMPOSE
both PUID and PGID outputs as expected.
Inside of the Mongo container:
getent passwd ... output - is missing the user with defined PUID and GUID there is defined: mongodb:x:999:999::/data/db:/bin/sh
which is different from the defined PUID and GUIDSame tested inside the unifi-network-application container, found with the defined PUID and GUID: "abc:x:PUID:GUID::/config:/bin/false unifi:x:101:102::/var/lib/unifi:/usr/sbin/nologin"
Conclusion: DB is accessible from the outside environment, except the Unifi container within the same subnet:
Expected Behavior
unif-app conects to unifi-db and creates initialization of the unifi network application
Steps To Reproduce
Created Stack App Template in Portainer using the docker-compose.yml Created init-mongo.js in a directory on NAS Deployed the Stack without any issues. Both Containers shows green check in Containers. DB container shows that user and databases are created and container successfully stores data in provided volumes. APP container is able to create two empty folders "data" and "logs" in provided directory on NAS and is displaying Defined MONGO_HOST unifi-db is not reachable, cannot proceed. in container Logs.
Environment
CPU architecture
x86-64
Docker creation
Container logs