You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/04/12 02:52:13 UTC

[GitHub] [pulsar] liudezhi2098 opened a new pull request, #15129: [Authenticate] optimization getHostName correct when use broker ip in Kerberos authentication

liudezhi2098 opened a new pull request, #15129:
URL: https://github.com/apache/pulsar/pull/15129

   ### Motivation
   When use broker ip in Kerberos authentication, will result in an error,Expected to be correct broker hostname.
   
   `sh pulsar-client --url pulsar://10.3.0.8:6650 produce`
   `org.apache.pulsar.client.impl.auth.PulsarSaslClient - Using JAAS/SASL/GSSAPI auth to connect to server Principal broker/10.3.0.8`
   `Kerberos principal  broker/hostname@PULSAR.COM`
   
   ### Modifications
   chang `InetSocketAddresscreateUnresolved` to 
   `new InetSocketAddress(hostUri.getHost(), hostUri.getPort())`
   
   
   ### Does this pull request potentially affect one of the following parts:
   
   *If `yes` was chosen, please highlight the changes*
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API: (no)
     - The schema: (no )
     - The default values of configurations: (no)
     - The wire protocol: (no)
     - The rest endpoints: (no)
     - The admin cli options: ( no)
     - Anything that affects deployment: (no)
   ### Documentation
   
   Check the box below or label this PR directly.
   
   Need to update docs? 
   
   - [X] `no-need-doc` 
   
    


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] liudezhi2098 commented on pull request #15129: [Authenticate] optimization getHostName correct when use broker ip in Kerberos authentication

Posted by GitBox <gi...@apache.org>.
liudezhi2098 commented on PR #15129:
URL: https://github.com/apache/pulsar/pull/15129#issuecomment-1144392259

   /pulsarbot run-failure-checks


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] github-actions[bot] commented on pull request #15129: [Authenticate] optimization getHostName correct when use broker ip in Kerberos authentication

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15129:
URL: https://github.com/apache/pulsar/pull/15129#issuecomment-1172997212

   The pr had no activity for 30 days, mark with Stale label.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] github-actions[bot] commented on pull request #15129: [fix][broker] optimization getHostName correct when use broker ip in Kerberos authentication

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15129:
URL: https://github.com/apache/pulsar/pull/15129#issuecomment-1345249482

   @liudezhi2098 Please add the following content to your PR description and select a checkbox:
   ```
   - [ ] `doc` <!-- Your PR contains doc changes -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
   - [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   ```


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] liudezhi2098 closed pull request #15129: [fix][broker] optimization getHostName correct when use broker ip in Kerberos authentication

Posted by GitBox <gi...@apache.org>.
liudezhi2098 closed pull request #15129: [fix][broker] optimization getHostName correct when use broker ip in Kerberos authentication
URL: https://github.com/apache/pulsar/pull/15129


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun commented on a diff in pull request #15129: [fix][broker] optimization getHostName correct when use broker ip in Kerberos authentication

Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #15129:
URL: https://github.com/apache/pulsar/pull/15129#discussion_r1045077665


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/PulsarServiceNameResolver.java:
##########
@@ -91,7 +91,7 @@ public void updateServiceUrl(String serviceUrl) throws InvalidServiceURL {
             String hostUrl = uri.getServiceScheme() + "://" + host;
             try {
                 URI hostUri = new URI(hostUrl);
-                addresses.add(InetSocketAddress.createUnresolved(hostUri.getHost(), hostUri.getPort()));
+                addresses.add(new InetSocketAddress(hostUri.getHost(), hostUri.getPort()));

Review Comment:
   See also https://github.com/tisonkun/pulsar/actions/runs/3655290019/jobs/6176485589



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] liudezhi2098 commented on pull request #15129: [Authenticate] optimization getHostName correct when use broker ip in Kerberos authentication

Posted by GitBox <gi...@apache.org>.
liudezhi2098 commented on PR #15129:
URL: https://github.com/apache/pulsar/pull/15129#issuecomment-1096501364

   @codelipenghui @jiazhai PTAL


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] liudezhi2098 commented on pull request #15129: [Authenticate] optimization getHostName correct when use broker ip in Kerberos authentication

Posted by GitBox <gi...@apache.org>.
liudezhi2098 commented on PR #15129:
URL: https://github.com/apache/pulsar/pull/15129#issuecomment-1098957166

   /pulsarbot run-failure-checks


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] github-actions[bot] commented on pull request #15129: [Authenticate] optimization getHostName correct when use broker ip in Kerberos authentication

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15129:
URL: https://github.com/apache/pulsar/pull/15129#issuecomment-1127140342

   The pr had no activity for 30 days, mark with Stale label.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun commented on a diff in pull request #15129: [fix][broker] optimization getHostName correct when use broker ip in Kerberos authentication

Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #15129:
URL: https://github.com/apache/pulsar/pull/15129#discussion_r1045077665


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/PulsarServiceNameResolver.java:
##########
@@ -91,7 +91,7 @@ public void updateServiceUrl(String serviceUrl) throws InvalidServiceURL {
             String hostUrl = uri.getServiceScheme() + "://" + host;
             try {
                 URI hostUri = new URI(hostUrl);
-                addresses.add(InetSocketAddress.createUnresolved(hostUri.getHost(), hostUri.getPort()));
+                addresses.add(new InetSocketAddress(hostUri.getHost(), hostUri.getPort()));

Review Comment:
   See also https://github.com/tisonkun/pulsar/actions/runs/3655290020



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] jiazhai commented on pull request #15129: [Authenticate] optimization getHostName correct when use broker ip in Kerberos authentication

Posted by GitBox <gi...@apache.org>.
jiazhai commented on PR #15129:
URL: https://github.com/apache/pulsar/pull/15129#issuecomment-1097453543

   Thanks, @liudezhi2098 for the help. Why this change will fix this issue? Would you please help provide more information in the PR description? such as the reason behind the original issue, and the mechanism behind this fix. So it would be better for the community to understand this issue.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] liudezhi2098 commented on pull request #15129: [Authenticate] optimization getHostName correct when use broker ip in Kerberos authentication

Posted by GitBox <gi...@apache.org>.
liudezhi2098 commented on PR #15129:
URL: https://github.com/apache/pulsar/pull/15129#issuecomment-1096141041

   /pulsarbot run-failure-checks


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] liudezhi2098 commented on pull request #15129: [Authenticate] optimization getHostName correct when use broker ip in Kerberos authentication

Posted by GitBox <gi...@apache.org>.
liudezhi2098 commented on PR #15129:
URL: https://github.com/apache/pulsar/pull/15129#issuecomment-1100062876

   /pulsarbot rerun-failure-checks


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] liudezhi2098 commented on pull request #15129: [Authenticate] optimization getHostName correct when use broker ip in Kerberos authentication

Posted by GitBox <gi...@apache.org>.
liudezhi2098 commented on PR #15129:
URL: https://github.com/apache/pulsar/pull/15129#issuecomment-1097457422

   > Thanks, @liudezhi2098 for the help. Why this change will fix this issue? Would you please help provide more information in the PR description? such as the reason behind the original issue, and the mechanism behind this fix. So it would be better for the community to understand this issue.
   OK
   


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] liudezhi2098 commented on pull request #15129: [Authenticate] optimization getHostName correct when use broker ip in Kerberos authentication

Posted by GitBox <gi...@apache.org>.
liudezhi2098 commented on PR #15129:
URL: https://github.com/apache/pulsar/pull/15129#issuecomment-1138006113

   /pulsarbot run-failure-checks


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun commented on a diff in pull request #15129: [fix][broker] optimization getHostName correct when use broker ip in Kerberos authentication

Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #15129:
URL: https://github.com/apache/pulsar/pull/15129#discussion_r1045077312


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/PulsarServiceNameResolver.java:
##########
@@ -91,7 +91,7 @@ public void updateServiceUrl(String serviceUrl) throws InvalidServiceURL {
             String hostUrl = uri.getServiceScheme() + "://" + host;
             try {
                 URI hostUri = new URI(hostUrl);
-                addresses.add(InetSocketAddress.createUnresolved(hostUri.getHost(), hostUri.getPort()));
+                addresses.add(new InetSocketAddress(hostUri.getHost(), hostUri.getPort()));

Review Comment:
   This change can fail a number of tests. Please take a look.



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org