Skip to content

Python Server(port=0) reports an unusable port-zero URL #12905

Description

@promiseeuler

Describe the bug
While using the released Python SDK, I found that rr.server.Server(host="127.0.0.1", port=0) successfully binds an OS-assigned ephemeral port, but server.url() reports rerun+http://127.0.0.1:0. The returned URL therefore cannot be used to connect to the running server.

To Reproduce

  1. Install rerun-sdk==0.35.0.
  2. Run:
import rerun as rr

with rr.server.Server(host="127.0.0.1", port=0) as server:
    print(server.url())
  1. Observe:
rerun+http://127.0.0.1:0

The server is actually listening on a nonzero OS-assigned port.

Expected behavior
server.url() should contain the actual bound port so callers can connect to the server.

Screenshots
Not applicable.

Backtrace
Not applicable; this does not crash.

Desktop (please complete the following information):

  • OS: macOS 26.4

Rerun version
rerun-sdk==0.35.0

Additional context
I searched the open issues for port=0, 127.0.0.1:0, and Python server ephemeral-port reports and did not find an exact duplicate. The current Python binding constructs the URL from the requested port before the server starts, rather than from the server handle’s bound address.

Agent

🤖 This issue was opened using an LLM-assisted workflow. I manually reproduced the behavior with the released SDK, checked for duplicates, and reviewed the current binding path.

Metadata

Metadata

Assignees

Labels

🪳 bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions