[jira] [Commented] (KAFKA-6941) when passing port = 0 to worker, the advertisedPort still is 0 rather than a random port

2020-03-17 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/KAFKA-6941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17060735#comment-17060735
 ] 

ASF GitHub Bot commented on KAFKA-6941:
---

chia7712 commented on pull request #5076: KAFKA-6941 when passing port = 0 to 
worker, the advertisedPort still …
URL: https://github.com/apache/kafka/pull/5076
 
 
   
 

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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> 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
>Priority: Major
>
> {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
(v8.3.4#803005)


[jira] [Commented] (KAFKA-6941) when passing port = 0 to worker, the advertisedPort still is 0 rather than a random port

2018-05-30 Thread Chia-Ping Tsai (JIRA)


[ 
https://issues.apache.org/jira/browse/KAFKA-6941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16495330#comment-16495330
 ] 

Chia-Ping Tsai commented on KAFKA-6941:
---

ping for reviews. 

> 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
>Priority: Major
>
> {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)


[jira] [Commented] (KAFKA-6941) when passing port = 0 to worker, the advertisedPort still is 0 rather than a random port

2018-05-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-6941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16490114#comment-16490114
 ] 

ASF GitHub Bot commented on KAFKA-6941:
---

chia7712 opened a new pull request #5076: KAFKA-6941 when passing port = 0 to 
worker, the advertisedPort still …
URL: https://github.com/apache/kafka/pull/5076
 
 
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> 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
>Priority: Major
>
> {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)


[jira] [Commented] (KAFKA-6941) when passing port = 0 to worker, the advertisedPort still is 0 rather than a random port

2018-05-24 Thread Chia-Ping Tsai (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-6941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16488767#comment-16488767
 ] 

Chia-Ping Tsai commented on KAFKA-6941:
---

BTW, the worker id base on the advertisedHost and advertisedPort. However, we 
have to build the worker id before doing the port binding so the worker id 
always is host:0 if the port is assigned to zero. It may cause some troubles 
when invoking many workers in a single JVM. I guess the problem can be resolved 
by making worker id configurable (KAFKA-6931)

> 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
>Priority: Major
>
> {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)


[jira] [Commented] (KAFKA-6941) when passing port = 0 to worker, the advertisedPort still is 0 rather than a random port

2018-05-24 Thread Chia-Ping Tsai (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-6941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16488758#comment-16488758
 ] 

Chia-Ping Tsai commented on KAFKA-6941:
---

I noticed this issue when building the mini connector cluster. After assigning 
the zero port to worker, I try to get the random port through 
RestServer#advertisedUrl. However, it always fail to get a truly random port. 

> 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
>Priority: Major
>
> {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)