You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Chia-Ping Tsai (JIRA)" <ji...@apache.org> on 2018/05/24 10:15:00 UTC
[jira] [Created] (KAFKA-6941) when passing port = 0 to worker, the
advertisedPort still is 0 rather than a random port
Chia-Ping Tsai created KAFKA-6941:
-------------------------------------
Summary: when passing port = 0 to worker, the advertisedPort still is 0 rather than a random port
Key: KAFKA-6941
URL: https://issues.apache.org/jira/browse/KAFKA-6941
Project: Kafka
Issue Type: Bug
Reporter: Chia-Ping Tsai
Assignee: Chia-Ping Tsai
{code:java}
public URI advertisedUrl() {
UriBuilder builder = UriBuilder.fromUri(jettyServer.getURI());
Integer advertisedPort = config.getInt(WorkerConfig.REST_ADVERTISED_PORT_CONFIG);
if (advertisedPort != null)
builder.port(advertisedPort);
else if (serverConnector != null)
builder.port(serverConnector.getPort()); // should call getLocalPort() instead
log.info("Advertised URI: {}", builder.build());
return builder.build();
}{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)