Summary
Suggest improving the port range used in bin/run-clara for dynamic DPE process allocation on macOS and Linux.
Context
In PR #1221, the port range for DPE on macOS was changed from 7000-8000 to 8000-9000 to avoid conflicts. However, both ranges can conflict with well-known development and server ports commonly used by other applications.
Suggestion
For compatibility and to reduce chances of collision, consider using ports from the IANA-recommended dynamic/private port range:
- 49152–65535 (works on both Linux and macOS)
Example update to get_dpe_port()
ports=$(seq 49152 20 65535)
This range is officially reserved for ephemeral/dynamic use, and much less likely to clash with system or common developer services.
Motivation
- Avoids "well-known" and "registered" user port ranges
- Prevents conflicts with services like HTTP (8000, 8080), databases, and dev servers
- Aligns with operating system defaults for dynamic port assignments
Note
Alternatively, binding to port 0 and reading the dynamically allocated port from the OS may be even safer, if CLARA can support it, but that would require a larger application change.
Summary
Suggest improving the port range used in
bin/run-clarafor dynamic DPE process allocation on macOS and Linux.Context
In PR #1221, the port range for DPE on macOS was changed from
7000-8000to8000-9000to avoid conflicts. However, both ranges can conflict with well-known development and server ports commonly used by other applications.Suggestion
For compatibility and to reduce chances of collision, consider using ports from the IANA-recommended dynamic/private port range:
Example update to
get_dpe_port()ports=$(seq 49152 20 65535)This range is officially reserved for ephemeral/dynamic use, and much less likely to clash with system or common developer services.
Motivation
Note
Alternatively, binding to port
0and reading the dynamically allocated port from the OS may be even safer, if CLARA can support it, but that would require a larger application change.