v.21.7Improvement

Resolve Port Number Binding for User Requests in Log Messages

Resolve the actual port number bound when a user requests any available port from the operating system to show it in the log message. #25569 (bnaecker).
ClickHouse now resolves and logs the actual port number assigned by the operating system when a user requests any available port.

Why it matters

This feature addresses the issue of not knowing which exact port was bound when using dynamic port assignment (i.e., requesting any available port). It improves transparency and debugging by showing the real, resolved port number in the log messages.

How to use it

This behavior is enabled automatically when you configure the server or services to request an available port (usually by specifying port 0). The actual assigned port will be resolved and displayed in the logs without additional user action.