[
https://issues.apache.org/jira/browse/KAFKA-2392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Manikumar resolved KAFKA-2392.
------------------------------
Resolution: Fixed
Kafka supports port 0 for unit tests. As mentioned in the previous comment,
Curator's TestingServer to run an in-memory Zookeeper,
> Kafka Server does not accept 0 as a port
> ----------------------------------------
>
> Key: KAFKA-2392
> URL: https://issues.apache.org/jira/browse/KAFKA-2392
> Project: Kafka
> Issue Type: Bug
> Components: config
> Affects Versions: 0.8.2.1
> Reporter: Buğra Gedik
> Priority: Minor
>
> I want to specify 0 as a port number for Zookeeper as well as Kafka Server.
> For instance server.properties configuration file has a 'port' property, but
> does not accept 0 as a value. Similarly, zookeeper.properties has a
> 'clientPort' property, but does not accept 0 as a value.
> I want 0 to specify that the port will be selected automatically (OS
> assigned). In my use case, I want to run Zookeeper with an automatically
> picked port, and use that port to create a Kafka Server configuration file,
> that specifies the Kafka Server port as 0 as well. I parse the output from
> the servers to figure out the actual ports used. All this is needed for a
> testing environment.
> Not supporting automatically selected ports makes it difficult to run Kafka
> server as part of our tests.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)