podman: [prior to v1.8] Port binding not working in rootless mode
EDIT (by @AkihiroSuda): If you are hitting an issue similar to this with Podman >= v.1.8.0, you are likely to be hitting https://github.com/containers/libpod/issues/5249, not this issue.
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description Podman isn’t properly binding to a port I specify when running rootless
Steps to reproduce the issue:
-
podman run -d -p 6000:8080 --name <name> <image tag> -
curl http://localhost:6000-> ReturnsFailed to connect to localhost port 6000: Connection refused -
lsof -i :6000-> Returns nothing (i.e. no output, nothing running on port 6000) -
podman ps-> Lists container as running
Describe the results you received: Container is not published to port, but is running
Describe the results you expected:
Expected it to work similarly to docker run given the same arguments. When I run sudo docker run -d -p 6000:8080 --name <name> <image tag>, the port binding works correctly. However it seems something else is going on with podman, even when using non-privileged ports.
Additional information you deem important (e.g. issue happens only occasionally): I’ve tried looking through various other similar issues but unfortunately nothing in those seemed be applicable to me. Specifically issue #661
Output of podman version:
Version: 1.6.2
RemoteAPI Version: 1
Go Version: go1.10.4
OS/Arch: linux/amd64
Output of podman info --debug:
debug:
compiler: gc
git commit: ""
go version: go1.10.4
podman version: 1.6.2
host:
BuildahVersion: 1.11.3
CgroupVersion: v1
Conmon:
package: 'conmon: /usr/libexec/podman/conmon'
path: /usr/libexec/podman/conmon
version: 'conmon version 2.0.3, commit: unknown'
Distribution:
distribution: ubuntu
version: "19.04"
IDMappings:
gidmap:
- container_id: 0
host_id: 1001
size: 1
- container_id: 1
host_id: 165536
size: 65536
uidmap:
- container_id: 0
host_id: 1001
size: 1
- container_id: 1
host_id: 165536
size: 65536
MemFree: 257163264
MemTotal: 1030762496
OCIRuntime:
name: runc
package: 'containerd.io: /usr/bin/runc'
path: /usr/bin/runc
version: |-
runc version 1.0.0-rc8+dev
commit: 3e425f80a8c931f88e6d94a8c831b9d5aa481657
spec: 1.0.1-dev
SwapFree: 0
SwapTotal: 0
arch: amd64
cpus: 1
eventlogger: journald
hostname: transity
kernel: 5.0.0-38-generic
os: linux
rootless: true
slirp4netns:
Executable: /usr/bin/slirp4netns
Package: 'slirp4netns: /usr/bin/slirp4netns'
Version: |-
slirp4netns version 0.4.2
commit: unknown
uptime: 12h 12m 9.73s (Approximately 0.50 days)
registries:
blocked: null
insecure: null
search:
- docker.io
store:
ConfigFile: /home/default/.config/containers/storage.conf
ContainerStore:
number: 1
GraphDriverName: vfs
GraphOptions: {}
GraphRoot: /home/default/.local/share/containers/storage
GraphStatus: {}
ImageStore:
number: 13
RunRoot: /run/user/1001
VolumePath: /home/default/.local/share/containers/storage/volumes
Package info (e.g. output of rpm -q podman or apt list podman):
podman/disco,now 1.6.2-1~ubuntu19.04~ppa1 amd64 [installed]
Additional environment details (AWS, VirtualBox, physical, etc.): Running on an Ubuntu 19.04 digital ocean droplet
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 15 (8 by maintainers)
@xcffl @aleks-mariusz It is likely that you are hitting https://github.com/containers/libpod/issues/5249 , not this issue. The code has significantly changed in v1.8.