Tecnativa / Tecnativa/docker-socket-proxy
Error "Docker daemon connection interrupted" after 20 minutes of bringing up containers
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.8k
- Forks
- 207
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I was checking your image with the following setup and I am getting the error "Docker daemon connection interrupted" after 20 minutes of bringing up containers, and then it repeats every 10 minutes after that:
This is my docker-compose.yml:
version: '3.8'
services:
socket-proxy:
image: tecnativa/docker-socket-proxy
ports:
- "127.0.0.1:2375:2375"
# privileged: true # true for VM, false for unprivileged LXC container
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
LOG_LEVEL: debug # debug,info,notice,warning,err,crit,alert,emerg
# Flags: 0 to revoke or 1 to grant access
## Granted by Default
EVENTS: 1 # nginx-proxy
PING: 1 # nginx-proxy
VERSION: 1
## Revoked by Default
# Security critical
AUTH: 1
SECRETS: 1
POST: 1
# Not always needed
BUILD: 1
COMMIT: 1
CONFIGS: 1
CONTAINERS: 1
DISTRIBUTION: 1
EXEC: 1
IMAGES: 1
INFO: 1
NETWORKS: 1
NODES: 1
PLUGINS: 1
SERVICES: 1
SESSION: 1
SWARM: 1
SYSTEM: 1
TASKS: 1
VOLUMES: 1
networks:
- proxy
nginx-proxy:
image: jwilder/nginx-proxy:1.3
ports:
- 80:80
- 443:443
volumes:
#- /var/run/docker.sock:/tmp/docker.sock:ro
- ssl:/etc/nginx/certs
- vhost:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
environment:
DOCKER_HOST: "tcp://socket-proxy:2375"
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: ""
networks:
- proxy
- edge
- frontend
depends_on:
- socket-proxy
acme-companion:
image: nginxproxy/acme-companion:2.2
volumes:
#- /var/run/docker.sock:/var/run/docker.sock:ro
- acme:/etc/acme.sh
- ssl:/etc/nginx/certs
- vhost:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
environment:
DOCKER_HOST: "tcp://socket-proxy:2375"
networks:
- proxy
- edge
- frontend
depends_on:
- nginx-proxy
apache:
image: bitnami/apache:2.4
volumes:
# Web files
- ./test:/app
environment:
VIRTUAL_HOST: fulano.com
VIRTUAL_PORT: 8080
networks:
- frontend
depends_on:
- nginx-proxy
volumes:
ssl:
vhost:
html:
acme:
networks:
edge:
frontend:
proxy:
This is my docker version:
$ docker version
Client:
Version: 20.10.21
API version: 1.41
Go version: go1.18.1
Git commit: 20.10.21-0ubuntu1~20.04.2
Built: Thu Apr 27 05:56:19 2023
OS/Arch: linux/amd64
Context: default
Experimental: true
Server:
Engine:
Version: 20.10.21
API version: 1.41 (minimum version 1.12)
Go version: go1.18.1
Git commit: 20.10.21-0ubuntu1~20.04.2
Built: Thu Apr 27 05:37:01 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.12-0ubuntu1~20.04.1
GitCommit:
runc:
Version: 1.1.4-0ubuntu1~20.04.3
GitCommit:
docker-init:
Version: 0.19.0
GitCommit:
This is what I get on the logs of the nginx-proxy (also happens on the acme-companion one):
dockergen.1 | 2023/06/11 14:25:25 Docker daemon connection interrupted
And this on the systemd docker.service log:
jun 11 16:25:25 prt2 1b5ccb10ab23[5650]: dockergen.1 | 2023/06/11 14:25:25 Docker daemon connection interrupted
jun 11 16:25:25 prt2 dockerd[5650]: time="2023-06-11T16:25:25.455961717+02:00" level=debug msg="Client context cancelled, stop sending events"
jun 11 16:25:25 prt2 b85512b08cc9[5650]: 192.168.144.5:40022 [11/Jun/2023:14:15:25.454] dockerfrontend dockerbackend/dockersocket 0/0/0/0/600001 200 230 - - sD-- 9/9/8/8/0 0/0 "GET /events? HTTP/1.1"
jun 11 16:25:25 prt2 ba6f37369766[5650]: 2023/06/11 14:25:25 Docker daemon connection interrupted
jun 11 16:25:35 prt2 1b5ccb10ab23[5650]: dockergen.1 | 2023/06/11 14:25:35 Watching docker events
What I have tried without luck:
- Enable the privileged mode in the socket-proxy container as my system has an app_armour profile enabled for Docker.
- Enable/allow all API calls (as you can see on the compose file above).
Maybe it has something to do with the api version (unsupported)?
Thanks in advance.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the supplied docker-compose.yml and trace the /events connection from nginx-proxy and acme-companion through socket-proxy. Reproduce the interruption while watching the socket-proxy and systemd docker.service logs, using the reported Docker 20.10.21 setup. Done means identifying the cause and documenting or implementing a verified correction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, docker-compose
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100