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

Container doesn't listen on IPv6 #66

Open
SuperQ opened this issue Sep 30, 2023 · 0 comments
Open

Container doesn't listen on IPv6 #66

SuperQ opened this issue Sep 30, 2023 · 0 comments
Labels

Comments

@SuperQ
Copy link

SuperQ commented Sep 30, 2023

Summary

In a dual-stack Kubernetes environment the health checks default to probing via IPv6. The container nginx only listens on IPv4 by default.

[tiredofit/self-service-password 12:30:57 /] $ netstat -nltp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:9000            0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:73              0.0.0.0:*               LISTEN      3139/nginx: master 
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      3139/nginx: master 
tcp        0      0 :::8050                 :::*                    LISTEN      -
tcp        0      0 :::10050                :::*                    LISTEN      -

Steps to reproduce

From inside the container:

bash-5.1# curl http://[::1]:80/
curl: (7) Failed to connect to ::1 port 80 after 0 ms: Couldn't connect to server

What is the expected correct behavior?

Returns 200 OK.

Relevant logs and/or screenshots

Environment

Dual-Stack Kubernetes (k3s) using a helm chart:

https://github.com/jp-gouin/helm-openldap

  • Image version / tag:
  • Host OS: Debian

Possible fixes

Not sure if it's the correct solution, but adding listen [::]:80 ipv6only=off; to the nginx server config.

@SuperQ SuperQ added the bug label Sep 30, 2023
SuperQ added a commit to SuperQ/helm-openldap that referenced this issue Sep 30, 2023
* Listen on both IPv4 and IPv6 in the ltb-passwd to fix health probes on
  dual-stack clusters.
* Include upstream chart env in main values.yaml.

tiredofit/docker-self-service-password#66

Signed-off-by: SuperQ <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant