Skip to content

[llm] Move ModelExpress default ports out of Ray's worker port range - #67921

Merged
kouroshHakha merged 1 commit into
ray-project:masterfrom
kouroshHakha:kourosh/mx-ports-outside-worker-range
Nov 7, 2026
Merged

kouroshHakha merged 1 commit into
ray-project:masterfrom
kouroshHakha:kourosh/mx-ports-outside-worker-range

Conversation

@kouroshHakha

Copy link
Copy Markdown
Contributor

Description

ModelExpress's metadata and worker gRPC ports default to 15555 and 16555 (plus each worker's GPU index). Both sit inside Ray's default worker port range, 10002–19999, where any Ray worker process may already be listening.

What we hit: two DeepSeek-V4.1-Flash TP4 replicas on one node. One TP rank failed with Failed to bind to address [::]:16556; ss showed an idle Ray worker (ray::IDLE) holding the port. That rank never started its MX gRPC server, so the replica could not act as a P2P source, and its publisher retried every second for the full 30-minute timeout.

Fix: default to 21555 and 22555 — above Ray's worker range and below the Linux ephemeral range (32768+). The RAY_MX_*_PORT_BASE overrides are unchanged.

Related issues

Follow-up to #67316.

Additional information

AI assistance was used.

🤖 Generated with Claude Code

@kouroshHakha
kouroshHakha requested a review from a team as a code owner November 7, 2026 00:25

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the default Model Express (MX) metadata and worker gRPC port bases to 21555 and 22555, respectively, to prevent conflicts with Ray's default worker port range. While the assertions in test_mx_server_envs were updated to reflect these changes, the reviewer correctly pointed out that another test in the same file, test_setup_sets_client_env, still asserts the old default ports and needs to be updated to avoid test failures.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

Reviewed by Cursor Bugbot for commit 328983b. Configure here.

@kouroshHakha kouroshHakha added the go add ONLY when ready to merge, run all tests label Nov 7, 2026
The MX metadata and worker gRPC ports defaulted to 15555 and 16555 plus each
worker's GPU index, inside Ray's default worker port range (10002-19999). Any
Ray worker process on the node may already listen there, so a replica's MX
worker can fail to bind and stop serving as a P2P source. Default to 21555
and 22555 instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Kourosh Hakhamaneshi <[email protected]>
@kouroshHakha
kouroshHakha force-pushed the kourosh/mx-ports-outside-worker-range branch from 328983b to dc6298a Compare November 7, 2026 00:34
@kouroshHakha
kouroshHakha enabled auto-merge (squash) November 7, 2026 00:35
@ray-gardener ray-gardener Bot added serve Ray Serve Related Issue core Issues that should be addressed in Ray Core labels Nov 7, 2026
@kouroshHakha
kouroshHakha merged commit 891a5a8 into ray-project:master Nov 7, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Issues that should be addressed in Ray Core go add ONLY when ready to merge, run all tests serve Ray Serve Related Issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants