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

ClassCastException when connecting to ES over HTTPS #4232

Closed
joschi opened this issue Oct 11, 2017 · 0 comments
Closed

ClassCastException when connecting to ES over HTTPS #4232

joschi opened this issue Oct 11, 2017 · 0 comments
Assignees

Comments

@joschi
Copy link
Contributor

joschi commented Oct 11, 2017

If the certificate used for Elasticsearch contains an ASN.1 DER encoded subjectAltName attribute, Apache HttpClient 4.5.3 fails to verify the hostname with the following error message:

2017-10-10T17:04:14.131-05:00 ERROR [IndexRotationThread] Uncaught exception in periodical
java.lang.ClassCastException: [B cannot be cast to java.lang.String
        at org.apache.http.conn.ssl.DefaultHostnameVerifier.getSubjectAltNames(DefaultHostnameVerifier.java:309) ~[graylog.jar:?]
        at org.apache.http.conn.ssl.DefaultHostnameVerifier.verify(DefaultHostnameVerifier.java:112) ~[graylog.jar:?]
        [...]
        at io.searchbox.client.http.JestHttpClient.executeRequest(JestHttpClient.java:147) ~[graylog.jar:?]
        at io.searchbox.client.http.JestHttpClient.execute(JestHttpClient.java:77) ~[graylog.jar:?]
        at org.graylog2.indexer.cluster.jest.JestUtils.execute(JestUtils.java:47) ~[graylog.jar:?]
        at org.graylog2.indexer.cluster.jest.JestUtils.execute(JestUtils.java:63) ~[graylog.jar:?]
        at org.graylog2.indexer.cluster.Cluster.isConnected(Cluster.java:169) ~[graylog.jar:?]
        [...]

References:

@joschi joschi added the bug label Oct 11, 2017
joschi pushed a commit that referenced this issue Dec 6, 2017
@ghost ghost assigned joschi Dec 6, 2017
@ghost ghost added the in progress label Dec 6, 2017
bernd pushed a commit that referenced this issue Jan 3, 2018
@ghost ghost removed the in progress label Jan 3, 2018
bernd pushed a commit that referenced this issue Jan 16, 2018
Fixes #4232

(cherry picked from commit 4c957a0)
@ghost ghost assigned bernd Jan 16, 2018
joschi pushed a commit that referenced this issue Jan 16, 2018
Fixes #4232
Refs #4400
(cherry picked from commit 4c957a0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants