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

netbox ipv6 listens #220

Closed
kfox1111 opened this issue May 20, 2024 · 5 comments
Closed

netbox ipv6 listens #220

kfox1111 opened this issue May 20, 2024 · 5 comments
Assignees
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@kfox1111
Copy link

We tried to deploy netbox-5.0.0-beta13 on a cluster that has ipv6 totally disabled. It fails to listen on the [::] rules. Can those be made configurable?

@RangerRick
Copy link
Contributor

This is a changed that happened in the upstream docker image. We've had reports of it failing both on IPv6-only clusters and IPv4-only clusters. (sigh 😅)

The good news is that you can update it to work however you want using the overrideUnitConfig section of values.yaml. You can take a look at the one provided by netbox-docker as reference.

This will probably be a more common problem over time, we should update the docs to talk about it.

@RangerRick RangerRick self-assigned this May 20, 2024
@RangerRick RangerRick added the documentation Improvements or additions to documentation label May 20, 2024
@kfox1111
Copy link
Author

Ah. Perfect. Will give that a try. Thanks! :)

@kikem4n
Copy link

kikem4n commented Jun 21, 2024

Having the same issue here. How would be the right way to set it trough a --set ? Have tried but I do not get having netbox listen on [::]:8080 :(

@dbrennand
Copy link

Having the same issue here. How would be the right way to set it trough a --set ? Have tried but I do not get having netbox listen on [::]:8080 :(

@kikem4n Using your own values.yaml file.

# values.yaml
overrideUnitConfig:
  {
    "listeners": {
      "0.0.0.0:8080": {
        "pass": "routes/main"
      },
      # Remove below lines
      "[::]:8080": {
        "pass": "routes/main"
      },
      "0.0.0.0:8081": {
        "pass": "routes/status"
      },
      # Remove these too
      "[::]:8081": {
        "pass": "routes/status"
      }
    },
    # ... Rest of the config from https://github.com/netbox-community/netbox-docker/blob/release/docker/nginx-unit.json
  }

Then provide your values.yaml to Helm:

helm install netbox oci://ghcr.io/netbox-community/netbox-chart/netbox -f values.yaml

@RangerRick RangerRick added this to the 5.0.0 milestone Jul 22, 2024
@LeoColomb
Copy link
Member

For your information, this has been documented on the Docker image wiki: https://github.com/netbox-community/netbox-docker/wiki/Troubleshooting#netbox-container-doesnt-start-when-ipv6-is-disabled

With the use of overrideUnitConfig in the values, the workaround is fairly simple.

# Override the NGINX Unit configuration inside the container. When enabled, this
# overrides the default configuration loaded into Unit. The upstream config is:
# https://github.com/netbox-community/netbox-docker/blob/release/docker/nginx-unit.json
# Remember that JSON is valid YAML: you can safely copy-and-paste from the above
# into your values.yaml, or you can copy the YAML version from below as a
# starting point.
# overrideUnitConfig:
# listeners:
# "0.0.0.0:8080":
# pass: routes/main
# "[::]:8080":
# pass: routes/main
# "0.0.0.0:8081":
# pass: routes/status
# "[::]:8081":
# pass: routes/status
# routes:
# main:
# - match:
# uri: "/static/*"
# action:
# share: "/opt/netbox/netbox${uri}"
# - action:
# pass: applications/netbox
# status:
# - match:
# uri: "/status/*"
# action:
# proxy: "http://unix:/opt/unit/unit.sock"
# applications:
# netbox:
# type: "python 3"
# path: /opt/netbox/netbox/
# module: netbox.wsgi
# home: /opt/netbox/venv
# processes:
# max: 4
# spare: 1
# idle_timeout: 120
# access_log: /dev/stdout
overrideUnitConfig: {}

Closing in favor of netbox-community/netbox-docker#997 & netbox-community/netbox-docker#925

@LeoColomb LeoColomb closed this as not planned Won't fix, can't repro, duplicate, stale Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

5 participants