Repository navigation
docs: document Windows reserved ports in the FAQ - #229
scottsgevor wants to merge 1 commit into
Conversation
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.
Confidence Score: 5/5
[Low impact] The PR appears safe to merge; no actionable issues were found. SummaryAdds Windows reserved-port troubleshooting to the FAQ.
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
left a comment
There was a problem hiding this comment.
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.
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,
netstatshows 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.rstwith:netsh interface ipv4 show excludedportrange protocol=tcpto check for a reserved rangenet stop winnat→ persistent exclusion →net start winnatworkaroundnetshdocumentation and the 10013/excluded-port articleThe wording sticks to what the Microsoft documentation states (
store=persistentsurvives reboots) and recommends re-checking if the problem returns after a Windows update, rather than claiming WinNAT will never reserve the port again.Verification
netstatshowed 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 ... showlists 5600 as an administered exclusion.Suggested by @TimeToBuildBob in ActivityWatch/activitywatch#1594.