Skip to content

Breeze: bind api-server dual-stack so http://localhost works in Chrome/Safari#67320

Merged
pierrejeambrun merged 2 commits into
apache:mainfrom
astronomer:fix/breeze-api-server-bind-ipv6
May 22, 2026
Merged

Breeze: bind api-server dual-stack so http://localhost works in Chrome/Safari#67320
pierrejeambrun merged 2 commits into
apache:mainfrom
astronomer:fix/breeze-api-server-bind-ipv6

Conversation

@pierrejeambrun
Copy link
Copy Markdown
Member

@pierrejeambrun pierrejeambrun commented May 22, 2026

Summary

breeze start-airflow launches airflow api-server with no --host override, so it picks up the default [api] host = 0.0.0.0IPv4 only. On macOS with OrbStack (and any other dual-stack-forwarding runtime), this breaks http://localhost:28080 in Chrome and Safari but not Firefox — a confusing failure mode hidden behind an opaque chrome-error://chromewebdata/... page.

This change makes the breeze-spawned api-server bind :: (the IPv6 wildcard), which on Linux/macOS dual-stack sockets accepts both IPv4 and IPv6 connections. One-line behavior fix; no public Airflow config changes.

Why this happens

  • macOS /etc/hosts resolves localhost to both 127.0.0.1 (A) and ::1 (AAAA).
  • Chrome / Safari prefer the IPv6 address — they try [::1]:28080 first.
  • OrbStack binds the host-side port-forward dual-stack: OrbStack ... TCP *:28080 (LISTEN) on both IPv4 and IPv6. The IPv6 TCP handshake therefore succeeds at the host…
  • …but the api-server inside the container is bound to 0.0.0.0 only, so there's no listener on [::]:8080. The container responds with TCP RST.
  • The browser then renders chrome-error://chromewebdata/ and emits the misleading "Unsafe attempt to load URL ... from frame with URL chrome-error://chromewebdata/" console message.
  • Firefox prefers IPv4, so it hits 127.0.0.1:28080 and never sees this. Docker Desktop historically only forwards IPv4, so happy-eyeballs falls back cleanly to IPv4 there too. The combo of Chrome + macOS + OrbStack is what surfaces it.

Reproduce (before this patch)

breeze start-airflow
curl -v http://localhost:28080/        # → Recv failure: Connection reset by peer
curl -v http://127.0.0.1:28080/        # → 200 OK
# open http://localhost:28080/ in Chrome  → chrome-error page
# open http://localhost:28080/ in Firefox → works

After this patch

The api-server binds dual-stack inside the container, so localhost reaches it regardless of which family the browser picks.

Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 4.7)

Generated-by: Claude Code (Opus 4.7) following the guidelines

@boring-cyborg boring-cyborg Bot added area:dev-tools backport-to-v3-2-test Mark PR with this label to backport to v3-2-test branch labels May 22, 2026
The mprocs path was patched in the previous commit, but breeze also
supports tmux as a terminal multiplexer (selectable via
`--terminal-multiplexer tmux`). The tmux path hard-codes the
api-server invocation in scripts/in_container/bin/run_tmux and needs
the same `--host '::'` treatment so localhost works in browsers that
prefer IPv6.
@pierrejeambrun pierrejeambrun merged commit 11ba5ec into apache:main May 22, 2026
143 checks passed
@pierrejeambrun pierrejeambrun deleted the fix/breeze-api-server-bind-ipv6 branch May 22, 2026 14:03
@github-actions
Copy link
Copy Markdown
Contributor

Backport successfully created: v3-2-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
v3-2-test PR Link

pierrejeambrun added a commit that referenced this pull request May 22, 2026
…rks in Chrome/Safari (#67320) (#67339)

* Breeze: bind api-server dual-stack so localhost works in Chrome/Safari

* Apply the same dual-stack bind in the tmux startup script

The mprocs path was patched in the previous commit, but breeze also
supports tmux as a terminal multiplexer (selectable via
`--terminal-multiplexer tmux`). The tmux path hard-codes the
api-server invocation in scripts/in_container/bin/run_tmux and needs
the same `--host '::'` treatment so localhost works in browsers that
prefer IPv6.
(cherry picked from commit 11ba5ec)

Co-authored-by: Pierre Jeambrun <pierrejbrun@gmail.com>
@jroachgolf84
Copy link
Copy Markdown
Collaborator

This actually broke my setup. I'm using Orbstack and Safari, and I get a blank page when trying to navigate to localhost:28080. I have a backdoor way around this for now.

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

Labels

area:dev-tools backport-to-v3-2-test Mark PR with this label to backport to v3-2-test branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants