Skip to content

Make gunicorn bind address configurable via REDASH_GUNICORN_BIND#7647

Open
nmosafi wants to merge 2 commits intogetredash:masterfrom
nmosafi:configurable-gunicorn-bind
Open

Make gunicorn bind address configurable via REDASH_GUNICORN_BIND#7647
nmosafi wants to merge 2 commits intogetredash:masterfrom
nmosafi:configurable-gunicorn-bind

Conversation

@nmosafi
Copy link
Contributor

@nmosafi nmosafi commented Feb 26, 2026

Upstream commit d2a7d87 hardcoded the bind address to [::]:5000 for IPv6 support, but this breaks on nodes where IPv6 is disabled in the kernel. Make the bind address configurable via REDASH_GUNICORN_BIND, defaulting to 0.0.0.0:5000 for IPv4. Users needing IPv6 dual-stack can set REDASH_GUNICORN_BIND="[::]:5000".

What type of PR is this?

  • Refactor
  • Feature
  • Bug Fix
  • New Query Runner (Data Source)
  • New Alert Destination
  • Other

Description

How is this tested?

  • Unit tests (pytest, jest)
  • E2E Tests (Cypress)
  • Manually
  • N/A

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

Upstream commit d2a7d87 hardcoded the bind address to [::]:5000 for
IPv6 support, but this breaks on nodes where IPv6 is disabled in the
kernel. Make the bind address configurable via REDASH_GUNICORN_BIND,
defaulting to 0.0.0.0:5000 for IPv4. Users needing IPv6 dual-stack
can set REDASH_GUNICORN_BIND="[::]:5000".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@yoshiokatsuneo
Copy link
Contributor

Thank you for your PR !
How about listening on both IPv4 and IPv6 like below ?

/usr/local/bin/gunicorn -b 0.0.0.0:5000 -b [::]:5000 ...

@nmosafi
Copy link
Contributor Author

nmosafi commented Feb 26, 2026

Thank you for your PR ! How about listening on both IPv4 and IPv6 like below ?

/usr/local/bin/gunicorn -b 0.0.0.0:5000 -b [::]:5000 ...

Good shout, I'll try that tomorrow and get back to you!

@nmosafi
Copy link
Contributor Author

nmosafi commented Mar 1, 2026

Thank you for your PR ! How about listening on both IPv4 and IPv6 like below ?

/usr/local/bin/gunicorn -b 0.0.0.0:5000 -b [::]:5000 ...

I tried this and got the following

[2026-03-01 21:35:57 +0000] [1] [INFO] Starting gunicorn 22.0.0
[2026-03-01 21:35:57 +0000] [1] [ERROR] Connection in use: ('::', 5000)
[2026-03-01 21:35:57 +0000] [1] [ERROR] Retrying in 1 second.
[2026-03-01 21:35:58 +0000] [1] [ERROR] Connection in use: ('::', 5000)
[2026-03-01 21:35:58 +0000] [1] [ERROR] Retrying in 1 second.
[2026-03-01 21:35:59 +0000] [1] [ERROR] Connection in use: ('::', 5000)
[2026-03-01 21:35:59 +0000] [1] [ERROR] Retrying in 1 second.
[2026-03-01 21:36:00 +0000] [1] [ERROR] Connection in use: ('::', 5000)
[2026-03-01 21:36:00 +0000] [1] [ERROR] Retrying in 1 second.
[2026-03-01 21:36:01 +0000] [1] [ERROR] Connection in use: ('::', 5000)
[2026-03-01 21:36:01 +0000] [1] [ERROR] Retrying in 1 second.
[2026-03-01 21:36:02 +0000] [1] [ERROR] Can't connect to ('::', 5000)

So seems it's not too happy! Open to trying any other suggestion. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants