PavelZeger opened a new pull request, #22492:
URL: https://github.com/apache/kafka/pull/22492

   The Connect REST server supports a separate `admin.listeners` endpoint and 
handles three cases: 
   
   1. unset (admin resources inherit the regular listeners), 
   2. empty (admin resources disabled), 
   3. distinct value (admin resources get their own connector). 
   
   It did not handle the case where `admin.listeners` shares a host and port 
with listeners: `createConnectors()` builds a second Jetty connector on the 
same socket, which fails to bind at startup with an opaque "address already in 
use" error and no hint that admin.listeners is the cause. The code carried two 
TODOs acknowledging that it assumed the two were different.
   
   Validate the configuration in `createConnectors()` before any connector is 
built, and throw a `ConfigException` when an admin.listeners entry shares a 
host and port with a listeners entry. The message directs the user to leave 
admin.listeners unset to serve the admin endpoints on the regular
   listeners. Overlap detection treats wildcard hosts (0.0.0.0, ::) as binding 
all interfaces and ignores ephemeral port 0, which resolves to a distinct port 
per connector.
   
   Also document the distinctness requirement on the `admin.listeners` config 
and remove the two stale TODOs.
   
   Added unit tests covering exact overlap, wildcard overlap, distinct 
host:port, and ephemeral port 0. 
   No KIP required: this only tightens validation of a configuration that 
already failed at startup.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to