Skip to content

fix(scheduler): move singleton lock port off Windows reserved range#688

Open
winterhuan wants to merge 1 commit into
lsdefine:mainfrom
winterhuan:fix/scheduler-lock-port-reserved-range
Open

fix(scheduler): move singleton lock port off Windows reserved range#688
winterhuan wants to merge 1 commit into
lsdefine:mainfrom
winterhuan:fix/scheduler-lock-port-reserved-range

Conversation

@winterhuan

Copy link
Copy Markdown

What

Move the scheduler singleton-lock port from 45762 to 41537.

Why

reflect/scheduler.py binds 127.0.0.1:45762 as a singleton lock so a second scheduler instance fails to start. On some Windows machines this port falls inside a system reserved port range (Hyper-V / WSL / Docker WinNAT dynamic exclusions). When that happens:

  • No process actually listens on the port (netstat, Get-NetTCPConnection show nothing).
  • A plain bind() still fails with WinError 10048.
  • Binding with SO_REUSEADDR fails with WinError 10013 (EACCES).

The 10013 result under SO_REUSEADDR is the tell-tale sign of a reserved range rather than an in-use port. The result is the scheduler autostart fails on every launch with OSError: [WinError 10048], even on a clean machine with no other GA instances running.

Fix

Switch the lock port to 41537, which is outside the common reserved ranges, and add a comment explaining the reserved-range pitfall. Singleton-lock semantics are unchanged.

Test

  • Verified 41537 binds successfully where 45762 fails (10048) on the affected machine.
  • Scheduler now starts cleanly alongside bridge + conductor.

45762 falls inside the WinNAT dynamically-excluded port range on some
Windows machines (Hyper-V/WSL/Docker). bind() there fails with 10048
(and 10013/EACCES even with SO_REUSEADDR) despite no process holding the
port, so the scheduler could never start on those hosts. Switch the lock
port to 41537, which is outside the common reserved ranges.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant