I have a multi-services environment that is hosted with docker swarm. There are multiple stacks that are created. All the docker containers which are running have an inbuild Spring Boot application. The issue is coming that all my stacks get restarted on their own. Now I know that in compose file I have mentioned that restart_policy as on failure. Hence it auto restarted. The issue comes that when services are restarted, I get errors from a particular service and this breaks everything. I am not able to figure out what actually happens. I did quite a lot of research and found out about these things.
- Docker daemon is not restarted. I double-checked this with the uptime of the docker daemon.
- I checked the docker service ps <Service_ID> and there I can see service showing shutdown and starting. No other information.
- I checked the docker service logs <Service_ID> but no error in there too.
- I checked for resource crunch. I can assure you that there was quite a good resource available at the host as well as each container level. Can someone help where exactly to find logs for this even? Any other thoughts on this?
My host is actually a VM hosted on VMWare Vcenter.