Unable to access port in rootful mode.

Open
#4,246 8 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
go, linux
Domain
cli, networking

Research direction

Start by reproducing the issue with the listed nerdctl command and checking the reported bridge-nf-call-iptables and bridge-nf-call-ip6tables warnings. Trace rootful port publishing and compare the result with the expected curl response on localhost:8080. Done means the nginx container is reachable from the host on port 8080.

Written by the indexing model from the issue text.

Description

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

Dominant language
Go
Stars
10.5k
Forks
853
Avg merge
6d 14h
Merged PRs (30d)
38

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from containerd/nerdctl

All issues in containerd/nerdctl

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.