Skip to content

docs: document Windows reserved ports in the FAQ - #229

Open
scottsgevor wants to merge 1 commit into
ActivityWatch:masterfrom
scottsgevor:docs/windows-reserved-port
Open

scottsgevor wants to merge 1 commit into
ActivityWatch:masterfrom
scottsgevor:docs/windows-reserved-port

Conversation

@scottsgevor

Copy link
Copy Markdown

Problem

The FAQ entry "The server fails to start: Address already in use" only covers the case where another program holds port 5600. On Windows, Hyper-V/WSL/Docker (WinNAT) can reserve ranges of TCP ports; if 5600 is inside one, netstat shows nothing listening and binding fails with WinError 10013 (WSAEACCES). This is ActivityWatch/activitywatch#571. The recently added diagnostics (ActivityWatch/aw-server#243, ActivityWatch/aw-qt#164) make the error visible, but users still need the fix.

Change

Adds a subsection to src/faq.rst with:

  • the symptom (nothing listening, error 10013)
  • netsh interface ipv4 show excludedportrange protocol=tcp to check for a reserved range
  • the net stop winnat → persistent exclusion → net start winnat workaround
  • links to the Microsoft netsh documentation and the 10013/excluded-port article

The wording sticks to what the Microsoft documentation states (store=persistent survives reboots) and recommends re-checking if the problem returns after a Windows update, rather than claiming WinNAT will never reserve the port again.

Verification

  • Reproduced on Windows 11 (build 26300): netstat showed nothing on 5600 and binding returned WinError 10013. After stopping WinNAT, adding the persistent exclusion for 5600, and starting WinNAT again, the port was bindable and ActivityWatch ran normally; netsh ... show lists 5600 as an administered exclusion.
  • Sphinx dummy build of the FAQ passes with no new warnings.

Suggested by @TimeToBuildBob in ActivityWatch/activitywatch#1594.

The FAQ only covered a port taken by another program. On systems using
Hyper-V, WSL2, or Docker, WinNAT can reserve a range that includes 5600;
netstat shows nothing listening and binding fails with WSAEACCES 10013.

Add a subsection with the netsh check and the persistent exclusion
workaround, linking the Microsoft documentation for the exclusion
semantics. The workaround was verified on Windows 11, where ActivityWatch
was silently failing to bind 5600.
@greptile-apps

greptile-apps Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5RetriggerView in Greptile

[Low impact] The PR appears safe to merge; no actionable issues were found.

Summary

Adds Windows reserved-port troubleshooting to the FAQ.

  • The FAQ helps Windows users free port 5600 when WinNAT reserves it.

No actionable issues were found. The Windows commands and documentation build were not run during this review.

Reviews (1) · Last reviewed commit: "docs: document Windows reserved ports in..." · Reviewed by Greptile

@TimeToBuildBob TimeToBuildBob 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.

Thanks for following up with the FAQ PR and testing the workaround on Windows 11. This covers the documentation gap I pointed out in ActivityWatch/activitywatch#1594: it distinguishes a reserved port from a listening process, keeps the workaround conditional on finding 5600 in an excluded range, and warns about the WinNAT networking interruption.

I checked 1316bac and built the FAQ in isolation with Sphinx 8.2.3. It produces the same five missing-cross-reference warnings as the base FAQ; the added subsection also passes a standalone HTML build with warnings treated as errors. I haven't independently run the Windows commands. No changes requested from me.

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