I am trying to run a few docker containers on GCP VMs. As of today, when I run a docker-compose, my ssh connection breaks. This was not happening as of this morning. The only thing that changed was I did a sudo apt update && sudo apt upgrade
.
An example of a docker-compose file that breaks the connection:
version: '3'
services:
mongo:
container_name: mongo
image: mongo
expose:
- "27017"
ports:
- "27017:27017"
I’m on Ubuntu 5.13.0-1030-gcp #36~20.04.1-Ubuntu SMP Fri Jun 3 15:33:42 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
.
docker-compose version 1.25.0
Docker version 20.10.17, build 100c701
and I’m using BuildKit for my Docker and docker-compose builds.
I’m not sure how to debug this issue, any suggestions would be appreciated. Will update the post with more info if needed.
3
Answers
Do not update your kernel,new kernel will influence docker process
Check your dmesg to see if the kernel crashed.
Probably related to https://www.mail-archive.com/[email protected]/msg482001.html
in our case it was an internal ip address space exhaustion
because docker switches afterwards to the 192.168.. network
and blocks external traffic
to fix – shutdown all docker containers
purge all docker networks
add or append to docker daemon.json
e.g. vi /etc/docker/daemon.json for 512 networks