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

nginx fails with IPv6 at Kubernetes cluster which is not supported IPv6 #8447

Closed
MasayaAoyama opened this issue Mar 6, 2023 · 4 comments
Closed
Assignees
Labels
docker Pull requests that update Docker code type: enhancement

Comments

@MasayaAoyama
Copy link

MasayaAoyama commented Mar 6, 2023

we encountered following error messages with image swaggerapi/swagger-ui:v4.17.1.
I think an interface cannot support IPv6 at our kubernetes clusters.
affected issues: #8438 (cc: @Southclaws

So we would like to control enable/disable IPv6 with environment variable.

$ kubectl get pods | grep swagger
swagger-784d787cfc-f46sx                      0/1     Error                        5 (91s ago)    3m2s
swagger-784d787cfc-l4nqh                      0/1     CrashLoopBackOff             4 (80s ago)    3m3s


$ kubectl  logs -f swagger-784d787cfc-f46sx
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: ipv6 not available
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/40-swagger-ui.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2023/03/06 21:22:32 [emerg] 1#1: socket() [::]:8080 failed (97: Address family not supported by protocol)
nginx: [emerg] socket() [::]:8080 failed (97: Address family not supported by protocol)
$ kubectl  exec -it mypod -- ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    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: tunl0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
    link/ipip 0.0.0.0 brd 0.0.0.0
4: eth0@if3761: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1480 qdisc noqueue state UP group default
    link/ether aa:0a:00:e4:e8:3f brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 192.168.0.1/32 scope global eth0
       valid_lft forever preferred_lft forever

Q&A (please complete the following information)

  • OS: [e.g. macOS]
  • Browser: [e.g. chrome, safari]
  • Version: [e.g. 22]
  • Method of installation: [e.g. npm, dist assets]
  • Swagger-UI version: [e.g. 3.10.0]
  • Swagger/OpenAPI version: [e.g. Swagger 2.0, OpenAPI 3.0]

Content & configuration

Example Swagger/OpenAPI definition:

# your YAML here

Swagger-UI configuration options:

SwaggerUI({
  // your config options here
})
?yourQueryStringConfig

Describe the bug you're encountering

To reproduce...

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

Screenshots

Additional context or thoughts

@char0n char0n self-assigned this Mar 7, 2023
@char0n char0n added type: enhancement docker Pull requests that update Docker code labels Mar 7, 2023
char0n added a commit that referenced this issue Mar 7, 2023
Enabling IPv6 address and port for IPv6 addresses
caused backward incompatible issues in the docker image.

Refs #8447
@char0n
Copy link
Member

char0n commented Mar 7, 2023

@MasayaAoyama,

Thanks for the report. I've issued #8449. Please have a look at it.

char0n added a commit that referenced this issue Mar 7, 2023
Enabling IPv6 address and port for IPv6 addresses
caused backward incompatible issues in the docker image.
If one wants to use it, it must be turned on explicitly
with PORT_IPV6 env variable.

Refs #8447
Refs #8437
@char0n
Copy link
Member

char0n commented Mar 7, 2023

Fix will be released in next release cycle. Closing.

@char0n char0n closed this as completed Mar 7, 2023
@Southclaws
Copy link
Contributor

Apologies for that one, I didn't consider environments that did not support ipv6! Thanks for the quick fix and the config value to support both of our use-cases 🙏

@MasayaAoyama
Copy link
Author

Thank you for fix it🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker Pull requests that update Docker code type: enhancement
Projects
None yet
Development

No branches or pull requests

3 participants