-
Notifications
You must be signed in to change notification settings - Fork 87
Description
- This is a bug report
- This is a feature request
- I searched existing issues before opening this one
Expected behavior
When exposing ports with docker run -p hostport:containerport the image is started and the ports are exposed.
Actual behavior
Docker throws an error:
docker: Error response from daemon: driver failed programming external connectivity on endpoint elegant_dirac (e9f85245f5f83cc770c5383a370015c84c63a235c159c5abf3ebad61225d46e0):
Error starting userland proxy: listen tcp6 [::]:8888: socket: address family not supported by protocol.
Steps to reproduce the behavior
I'm not entirely sure how the machine I run this on was configured, so I cannot explain how to reproduce my configuration exactly.
Using the commands found here I do know that the OS (Ubuntu 20.04.2 LTS) is compiled with IPv6 support, but it's disabled with boot parameters.
user@server: ~$ grep CONFIG_IPV6= /boot/config-$(uname -r)
CONFIG_IPV6=y
user@server: ~$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-5.4.0-71-generic root=/dev/mapper/vg00-root ro ipv6.disable=1 maybe-ubiquity
user@server: ~$ sudo modprobe -c |grep "options ipv6"
options ipv6 disable=1I'm not the machine admin, so I don't want to configure IPv6, I want to keep it in the state it is now (as this used to work with docker < 20.10.6).
Running a simple docker run -p command triggers the error (I understand that busybox has no ports to publish, but this is a mere example):
user@server:~$ sudo docker run -p 8888:8888 -it --rm busybox
docker: Error response from daemon: driver failed programming external connectivity on endpoint compassionate_bouman (c0571cb8e44da78ee31fcc6b99327f11aec943070d4fa492fed17a1da636a40b):
Error starting userland proxy: listen tcp6 [::]:8888: socket: address family not supported by protocol.Running the same command, but this time specifying --net=host without any published ports works:
user@server:~$ sudo docker run -it --rm --net=host busybox
/ #Output of docker version:
Client: Docker Engine - Community
Version: 20.10.6
API version: 1.41
Go version: go1.13.15
Git commit: 370c289
Built: Fri Apr 9 22:47:17 2021
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.6
API version: 1.41 (minimum version 1.12)
Go version: go1.13.15
Git commit: 8728dd2
Built: Fri Apr 9 22:45:28 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.4
GitCommit: 05f951a3781f4f2c1911b05e61c160e9c30eaa8e
runc:
Version: 1.0.0-rc93
GitCommit: 12644e614e25b05da6fd08a38ffa0cfe1903fdec
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Output of docker info:
Client:
Context: default
Debug Mode: false
Plugins:
app: Docker App (Docker Inc., v0.9.1-beta3)
buildx: Build with BuildKit (Docker Inc., v0.5.1-docker)
scan: Docker Scan (Docker Inc., v0.7.0)
Server:
Containers: 11
Running: 1
Paused: 0
Stopped: 10
Images: 25
Server Version: 20.10.6
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 05f951a3781f4f2c1911b05e61c160e9c30eaa8e
runc version: 12644e614e25b05da6fd08a38ffa0cfe1903fdec
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 5.4.0-71-generic
Operating System: Ubuntu 20.04.2 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 15.64GiB
Name: REDACTED
ID: REDACTED
Docker Root Dir: /var/lib/docker
Debug Mode: false
HTTP Proxy: http://REDACTED:8080/
Username: REDACTED
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
WARNING: No swap limit support
Additional environment details (AWS, VirtualBox, physical, etc.)