This issue happens on the stage-green/blue-mirror VMs in AWS.
Problem
Whenever there is a new deployment of services to the stage-mirror VMs in AWS, a container usually takes up the IP range of the tis-preprod DB therefore blocking other containers from connecting to the DB.
Temporary solution
login to the VM that is running keycloak (currently stage-green-mirror)
find the container that is causing the issues - docker inspect <container_name>
Network details can be found at the end of the inspect command. If the gateway has the address 172.21.x.x then you have found the culprit
3. go to the directory of the container - /data/docker/stacks/<container_directory>
4. delete the container - docker-compose down -v
5. recreate the container with a new network - docker-compose up -d
6. make sure that the container is not taking up the DB's IP range anymore (which is 172.21.0.0/16) -docker inspect <container_name>
7. go through the other containers (keycloak, tcs, profile, reference...) and ensure that they're pointing to the the tis-preprod DB and aren't using old variables
8. restart containers after making changes to the vars where required
Add Comment