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

Comments

Projects
None yet
3 participants
@joschi
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

@jalogisch jalogisch added the triaged label Oct 16, 2017

joschi added a commit that referenced this issue Dec 6, 2017

@wafflebot wafflebot bot added the in progress label Dec 6, 2017

@bernd bernd closed this in #4400 Jan 3, 2018

bernd added a commit that referenced this issue Jan 3, 2018

@wafflebot wafflebot bot removed the in progress label Jan 3, 2018

bernd added a commit that referenced this issue Jan 16, 2018

Upgrade to Jest 2.4.11+jackson (#4400)
Fixes #4232

(cherry picked from commit 4c957a0)

joschi added a commit that referenced this issue Jan 16, 2018

Upgrade to Jest 2.4.11+jackson (#4485)
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