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

Addressing 'org.apache.hc.core5.http.ParseException: Invalid protocol version' under JDK 16+ #4827

Merged
merged 2 commits into from
Oct 19, 2022

Conversation

reta
Copy link
Collaborator

@reta reta commented Oct 18, 2022

Signed-off-by: Andriy Redko andriy.redko@aiven.io

Description

When using JDK 16+, the org.apache.hc.core5.http.ParseException: Invalid protocol version is being thrown.

Issues Resolved

N/A

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@reta reta requested a review from a team as a code owner October 18, 2022 18:57
… version' under JDK 16+

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is all the same setTlsDetailsFactory code. Want to refactor the default implementation for TlsStrategy into a helper?

CHANGELOG.md Outdated
@@ -142,6 +142,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Fix decommission status update to non leader nodes ([4800](https://github.com/opensearch-project/OpenSearch/pull/4800))
- Fix recovery path for searchable snapshots ([4813](https://github.com/opensearch-project/OpenSearch/pull/4813))
- Fix bug in AwarenessAttributeDecommissionIT([4822](https://github.com/opensearch-project/OpenSearch/pull/4822))
- Addressing 'org.apache.hc.core5.http.ParseException: Invalid protocol version' under JDK 16+ ([#4827](https://github.com/opensearch-project/OpenSearch/pull/4827))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can just say Fix

@@ -429,6 +433,13 @@ public HttpAsyncClientBuilder customizeHttpClient(
HttpAsyncClientBuilder httpClientBuilder) {
final TlsStrategy tlsStrategy = ClientTlsStrategyBuilder.create()
.setSslContext(sslContext)
// See please https://issues.apache.org/jira/browse/HTTPCLIENT-2219
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: just say "see ..."

@reta
Copy link
Collaborator Author

reta commented Oct 19, 2022

This is all the same setTlsDetailsFactory code. Want to refactor the default implementation for TlsStrategy into a helper?

I don't know to be honest (I don't see much value out of it), that's not the kind of helper one wants to make public (since it is used in a few modules and packages), more like workaround

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
@reta reta added the v3.0.0 Issues and PRs related to version 3.0.0 label Oct 19, 2022
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@andrross andrross merged commit 3af46ae into opensearch-project:main Oct 19, 2022
ashking94 pushed a commit to ashking94/OpenSearch that referenced this pull request Nov 7, 2022
… version' under JDK 16+ (opensearch-project#4827)

* Addressing 'org.apache.hc.core5.http.ParseException: Invalid protocol version' under JDK 16+

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>

* Addressing code review comments

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v3.0.0 Issues and PRs related to version 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants