use of closed network connection

未关闭
#7,552 5 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
55/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
docker, go
领域
cli

调研方向

Start by tracing the Docker CLI code path for docker logs -f and how it handles Ctrl+C while reading from the Unix socket. The report gives a reproducible command and expected behavior, but does not identify a file or test, so first locate the follow mode and its interruption tests. Done means Ctrl+C stops log following without printing the closed-connection error.

由索引模型根据 Issue 内容生成。

描述

kind/bug status/0-triage status/more-info-needed version/29.10
Description

After reading logs with docker logs -f <container_name> and pressing CTRL+C I get this:

^Cread unix @->/run/docker.sock: use of closed network connection

This happens on Debian13 docker versions 29.10.1/29.10.0

Reproduce

docker logs -f <container_name>
CTRL+C

Expected behavior

There should not be error about unix socket

docker version
Client: Docker Engine - Community
 Version:           29.10.1
 API version:       1.57
 Go version:        go1.27.4
 Git commit:        c48360f
 Built:             Tue Nov 24 19:44:19 2026
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          29.10.1
  API version:      1.57 (minimum version 1.40)
  Go version:       go1.27.4
  Git commit:       54cd494
  Built:            Tue Nov 24 19:44:41 2026
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v2.4.2
  GitCommit:        b7a25261e029d68978bbf290df0a62fc819b3c51
 runc:
  Version:          1.5.3
  GitCommit:        v1.5.3-0-g46365c62
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
docker info
Client: Docker Engine - Community
 Version:    29.10.1
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.39.1
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v5.8.0
    Path:     /usr/libexec/docker/cli-plugins/docker-compose
  model: Docker Model Runner (Docker Inc.)
    Version:  v1.2.10
    Path:     /usr/libexec/docker/cli-plugins/docker-model

Server:
 Containers: 1
  Running: 1
  Paused: 0
  Stopped: 0
 Images: 1
 Server Version: 29.10.1
 Storage Driver: overlayfs
  driver-type: io.containerd.snapshotter.v1
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 CDI spec directories:
  /etc/cdi
  /var/run/cdi
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: b7a25261e029d68978bbf290df0a62fc819b3c51
 runc version: v1.5.3-0-g46365c62
 init version: de40ad0
 Security Options:
  apparmor
   Profile: default
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.12.118+deb13-amd64
 Operating System: Debian GNU/Linux 13 (trixie)
 OSType: linux
 Architecture: x86_64
 CPUs: 6
 Total Memory: 23.48GiB
 Name: hom-smspp2-node1
 ID: 79b4843a-2ce8-4b6e-9f0f-2351b5a0262b
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
  ::1/128
 Live Restore Enabled: false
 Firewall Backend: iptables
  EnableUserlandProxy: true
  UserlandProxyPath: /usr/bin/docker-proxy
Additional Info

No response

主要语言
Go
星标
6.2k
派生
2.2k
平均合并
22 小时 19 分钟
30 天内合并 PR
60

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

docker/cli 的其他 Issue

查看 docker/cli 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。