I have a server A (application server) using docker service, and application inside running in docker container. I also have server B and C (database server primary and secondary) running in container as well.
Everything runs normally til one day, the application log says cannot connect to database, and both of the database (primary and secondary) cannot communicate with each other. I tried restart container/application, the connection still dead, so I have to restart the docker service of every server (A,B,C) so the connection restore back to normal.
I have checked with the network and firewall, and found that they are normal, nothing blocks the communication between them, so the problem should not be in this part.
I met this problem for several times in another environment, and all I have to do is restarting docker service.
I would like to know how to fix this and the root cause, or are there anyone met this problem and has the better work around than restarting docker service?
here is the version that I use:
Client: Docker Engine - Community
Version: 27.3.1
API version: 1.47
Go version: go1.22.7
Git commit: ce12230
Built: Fri Sep 20 11:42:37 2024
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 27.3.1
API version: 1.47 (minimum version 1.24)
Go version: go1.22.7
Git commit: 41ca978
Built: Fri Sep 20 11:41:36 2024
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.7.22
GitCommit: 7f7fdf5fed64eb6a7caf99b3e12efcf9d60e311c
runc:
Version: 1.1.14
GitCommit: v1.1.14-0-g2c9f560
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Thanks.