Unable to access port in rootful mode.

未关闭
#4,246 8 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 3 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
go, linux
领域
cli, networking

调研方向

首先使用列出的 nerdctl 命令重现问题,并检查报告的 bridge-nf-call-iptables 和 bridge-nf-call-ip6tables 警告。跟踪 rootful 端口发布,并将结果与 localhost:8080 上预期的 curl 响应进行比较。当 nginx 容器能够从主机通过端口 8080 访问时,即表示完成。

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

描述

area/network bug
Description

I'm unable to access any containers.
A simple example would be nginx.
Bind it to 8080, and curl is unable to reach it.

Image

Steps to reproduce the issue
  1. Run sudo nerdctl run -d -p 8080:80 --name=nginx --restart=always nginx
  2. Run curl localhost:8080
Describe the results you received and expected

I would expect the host to be able to reach the container.
Instead, it seems like it times out.

What version of nerdctl are you using?

nerdctl version 2.0.3

Are you using a variant of nerdctl? (e.g., Rancher Desktop)

None

Host information

Client:
Namespace: default
Debug Mode: false

Server:
Server Version: v2.0.2
Storage Driver: overlayfs
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Log: fluentd journald json-file none syslog
Storage: btrfs native overlayfs
Security Options:
apparmor
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.5.0-0.deb12.1-amd64
Operating System: Debian GNU/Linux 12 (bookworm)
OSType: linux
Architecture: x86_64
CPUs: 20
Total Memory: 30.87GiB
Name: peeriot-00X
ID: 0f398317-967c-4237-9898-5be7c24e7429

WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled

主要语言
Go
星标
10.5k
派生
853
平均合并
6 天 14 小时
30 天内合并 PR
38

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

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

containerd/nerdctl 的其他 Issue

查看 containerd/nerdctl 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

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