-
-
Notifications
You must be signed in to change notification settings - Fork 88
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
I already have a production environment, with a mongo database. I need to change the database host and I need to pinpoint it to a ipv4 address, but when I try to change the docker MONGO_HOST variable value, application fails to start because it tries to reach the old value, the container hostname unifi_db, instead of the new ip address
Caused by: com.mongodb.MongoTimeoutException: Timed out while waiting for a server that matches ReadPreferenceServerSelector{readPreference=primary}. Client view of cluster state is {type=UNKNOWN, servers=[{address=unifi_db:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketException: unifi_db}, caused by {java.net.UnknownHostException: unifi_db}}]
how can I fix that?
Expected Behavior
changing variable should reflect the changes in the application configuration
Steps To Reproduce
- change docker compose MONGO_HOST variable
Environment
- OS:
- How docker service was installed:CPU architecture
x86-64
Docker creation
as aboveContainer logs
as aboveMetadata
Metadata
Assignees
Labels
Type
Projects
Status