massakam opened a new pull request #1346: Make it possible to get namespaces 
owned by broker when TLS is enabled
URL: https://github.com/apache/incubator-pulsar/pull/1346
 
 
   ### Motivation
   
   If TLS is enabled, `pulsar-admin brokers namespaces` command does not work 
properly.
   ```sh
   # port 8080 is used by http
   $ sudo pulsar-admin brokers namespaces --url broker1.example.com:8080 
cluster1
   
   null
   
   Reason: javax.ws.rs.ProcessingException: javax.net.ssl.SSLException: 
Unrecognized SSL message, plaintext connection?
   
   # port 8443 is used by https
   $ sudo pulsar-admin brokers namespaces --url broker1.example.com:8443 
cluster1
   
   null
   
   Reason: javax.ws.rs.ProcessingException: java.net.ProtocolException: Server 
redirected too many  times (20)
   ```
   
   When specifying a broker name whose port is 8080 using `--url` option, the 
redirection URL whose scheme is https and whose port is http is returned. 
Therefore, SSLException seems to occur.
   
   > Location: 
https://broker1.example.com:8080/admin/brokers/cluster1/broker1.example.com:8080/ownedNamespaces
   
   On the other hand, when specifying a broker name whose port is 8443, 
`broker1.example.com` does not process that request. As a consequence, a 
redirection loop occurs.
   
   ### Modifications
   
   Fixed `AdminResource#validateBrokerName()` not to redirect the request if 
the specified broker name is equal to either `webServiceAddress` or 
`webServiceAddressTls`.
   
   ### Result
   
   Even if TLS is enabled, the command will work properly.

----------------------------------------------------------------
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


With regards,
Apache Git Services

Reply via email to