-
-
Notifications
You must be signed in to change notification settings - Fork 85
Closed as not planned
Labels
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
Even after updating MONGO_HOST and restarting, the container continues to connect to the old MongoDB host, ignoring the new host specified.
Expected Behavior
After changing MONGO_HOST, the container should connect to the newly defined MongoDB host upon restart, rather than continuing to use the old one.
Steps To Reproduce
- Set up the container according to the official documentation, using an external MongoDB instance.
- Confirm the container is running and using the specified MONGO_HOST.
- Update the MONGO_HOST environment variable to point to a different MongoDB host (with the same content database).
- Restart the container.
Environment
- OS: Ubuntu 24.04
- How docker service was installed: k8s (bare metal, kubeadm)
CPU architecture
arm64
Docker creation
- image: lscr.io/linuxserver/unifi-network-application:latest
name: unifi-v2
env:
- name: MONGO_HOST
value: 127.0.0.1
- name: MONGO_PORT
value: "27017"
- name: MONGO_DBNAME
value: unifi
- name: MONGO_AUTHSOURCE
value: admin
- name: MONGO_USER
value: unifi
- name: MONGO_PASS
valueFrom:
secretKeyRef:
name: ####
key: password
volumeMounts:
- mountPath: /config
name: ####
subPath: unifi-config
Container logs
Caused by: com.mongodb.MongoTimeoutException: Timed out after 10000 ms while waiting for a server that matches ReadPreferenceServerSelector{readPreference=primary}. Client view of cluster state is {type=UNKNOWN, servers=[{address=unifi-mongo:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.SocketTimeoutException: Connect timed out}}]
NOTE: unifi-mongo is the old host
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done