Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPv6 wrongly enabled, causes "Cannot assign requested address" #2904

Closed
antoineco opened this issue Aug 6, 2018 · 0 comments · Fixed by #2905
Closed

IPv6 wrongly enabled, causes "Cannot assign requested address" #2904

antoineco opened this issue Aug 6, 2018 · 0 comments · Fixed by #2905
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@antoineco
Copy link
Contributor

antoineco commented Aug 6, 2018

NGINX Ingress controller version: master @ a688208

Environment: Docker for Mac

  • OS: Linux
  • Kernel: 4.9.93-linuxkit-aufs

What happened:

net.IsIPV6Enabled() wrongly returns true because the /proc/net/if_inet6 file exists in the container, however my network interfaces do not have IPv6 addresses:

$ kubectl -n ingress-nginx exec nginx-ingress-controller-8547fdb4d9-f94n4 -- ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: ...

As a result, (re)loading the NGINX config fails with

nginx: the configuration file /tmp/nginx-cfg255014169 syntax is ok
2018/08/06 10:00:51 [emerg] 50#50: bind() to [::1]:18080 failed (99: Cannot assign requested address)
nginx: [emerg] bind() to [::1]:18080 failed (99: Cannot assign requested address)

What you expected to happen:

$IsIPV6Enabled is false when network interfaces can not handle IPv6, and NGINX does not try to listen on IPv6 addresses.

How to reproduce it:

Simply run the Ingress controller in an environment where the container's network interface do not have IPv6 addresses. In the case of Docker for Mac, --network-plugin=cni and an empty --cni-conf-dirdirectory (kubelet flags).

/kind bug

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Aug 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants