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 2018/02/14 22:22:21 UTC

[GitHub] rdhabalia opened a new pull request #1239: add httpcore dep required by httpclient in hostname-verification

rdhabalia opened a new pull request #1239: add httpcore dep required by httpclient in hostname-verification
URL: https://github.com/apache/incubator-pulsar/pull/1239
 
 
   ### Motivation
   
   - when a broker's tls certificate present, httpclient's DefaultHostnameVerifier requires httpcore dependencies to use `org.apache.http.util.Args` class.
   
   ```
   11:12:33.486 [pulsar-discovery-io-2-3] WARN  o.a.p.p.server.DirectProxyHandler    - [[id: 0x300e8efa, L:/10.213.246.124:6651 - R:/10.215.134.167:51374]] [[id: 0x2b69265f, L:/10.213.246.124:48686 - R:perbs
   java.lang.NoClassDefFoundError: org/apache/http/util/Args
           at org.apache.http.conn.ssl.SubjectName.<init>(SubjectName.java:48) ~[httpclient-4.5.5.jar:4.5.5]
           at org.apache.http.conn.ssl.DefaultHostnameVerifier.getSubjectAltNames(DefaultHostnameVerifier.java:310) ~[httpclient-4.5.5.jar:4.5.5]
           at org.apache.http.conn.ssl.DefaultHostnameVerifier.verify(DefaultHostnameVerifier.java:112) ~[httpclient-4.5.5.jar:4.5.5]
           at org.apache.http.conn.ssl.DefaultHostnameVerifier.verify(DefaultHostnameVerifier.java:99) ~[httpclient-4.5.5.jar:4.5.5]
           at 
   ```
   - Also `DefaultHostnameVerifier` requires all classes of commons-logging.
   
   ### Modifications
   add httpcore dependencies into client/proxy where hostname verification happens.
   
   ### Result
   
   It fixes `java.lang.NoClassDefFoundError: org/apache/http/util/Args` while hostname verification.
   Note: I will cherry-pick in 1.22 branch as well.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services