Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The pulsar-admin doesn't set SNI properly when tlsEnableHostnameVerification is false #16416

Closed
fantapsody opened this issue Jul 6, 2022 · 3 comments · Fixed by #17543
Closed
Labels
Stale type/bug The PR fixed a bug or issue reported a bug

Comments

@fantapsody
Copy link
Contributor

Describe the bug
The async-http-client used in pulsar-admin doesn't set SNI properly when tlsEnableHostnameVerification is false, see https://github.com/AsyncHttpClient/async-http-client/blob/master/client/src/main/java/org/asynchttpclient/netty/ssl/DefaultSslEngineFactory.java#L65. This will fail https requests that rely on SNI routing, like a pulsar cluster deployed behind an istio gateway.

The behavior was introduced in the PR #15824 since the async-http-client doesn't split the flag for SNI header and hostname verification. @michaeljmarshall

To Reproduce

Set tlsEnableHostnameVerification to false in the client.conf, and use pulsar-admin to operate a pulsar cluster behind the istio gateway.

Expected behavior

The pulsar-admin should set the SNI header properly.

Screenshots
N/A

Desktop (please complete the following information):

  • OS: MAC OS X

Additional context

@michaeljmarshall
Copy link
Member

@fantapsody - can you please provide the stack trace for the error you're seeing?

@fantapsody
Copy link
Contributor Author

@michaeljmarshall The admin command doesn't give too much useful information:

./bin/pulsar-admin --admin-url https://$HOST --auth-params $TOKEN --auth-plugin org.apache.pulsar.client.impl.auth.AuthenticationToken tenants list
null

Reason: java.util.concurrent.CompletionException: org.apache.pulsar.client.admin.internal.http.AsyncHttpConnector$RetryException: Could not complete the operation. Number of retries has been exhausted. Failed reason: https://xxx:443

@github-actions
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants