<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Hiveserver2 HA using haproxy load balancing in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/82456#M33345</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/27833"&gt;@VijayM&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The openssl debug information indicates that the client makes a connection to a server but the server does not return a certificate.&amp;nbsp; Since a direct connection to HiveServer2 does not have the problem, I conclude that your haproxy is still using termination even though your configuration snippet would indicate otherwise.&amp;nbsp; Based on what you have provided it appears:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. your connection to port 10001 is using TLS termination at the haproxy&lt;/P&gt;&lt;P&gt;2. the server certificate is not valid so no TLS handshake can be performed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically, the configuration you show cannot be the one that is being used for haproxy that is running and listening on port 10001 so perhaps it was not restarted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;openssl s_client&lt;/STRONG&gt; will return the following error if the port it connects to is not listening on TLS:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;139972358285128:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:769:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since you are seeing:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SSL routines:ssl23_write:ssl handshake failure:s23_lib.c:177&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;That indicates there was an actual problem on the server side.&amp;nbsp; The server in this case must be your haproxy.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So, I think it would be good to list the full haproxy configuration file and also make sure that it really did restart since your last change.&amp;nbsp; I used your config file and pass-through TLS worked perfectly to my HS2 servers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I think we must be fighting an haproxy config/restart issue since the frontend/backend you showed last worked for me. I actually copied and pasted your config and changed the hostnames only.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Nov 2018 17:27:39 GMT</pubDate>
    <dc:creator>bgooley</dc:creator>
    <dc:date>2018-11-16T17:27:39Z</dc:date>
    <item>
      <title>Hiveserver2 HA using haproxy load balancing</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/80813#M33330</link>
      <description>&lt;P&gt;Hello Team,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have CDH 5.15 cluster running and have kerberos and TLS enabled for all services in the cluster.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We would like to enable for Hiveserver2 using haproxy load balancer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have enable HA for hivemetastore using below link. 2 instance of hive metastore is up and running.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;A href="https://www.cloudera.com/documentation/enterprise/5-15-x/topics/admin_ha_hivemetastore.html" target="_blank"&gt;https://www.cloudera.com/documentation/enterprise/5-15-x/topics/admin_ha_hivemetastore.html&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Refering below link for hiveserver2 ha.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;A href="https://www.cloudera.com/documentation/enterprise/5-15-x/topics/admin_ha_hiveserver2.html" target="_blank"&gt;https://www.cloudera.com/documentation/enterprise/5-15-x/topics/admin_ha_hiveserver2.html&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;haproxy, 1 instance of hive metastore, 1 instance of hiveserver2 installed on same node.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;beeline throws below error.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;beeline&amp;gt; !connect jdbc:hive2://abc:10001/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=xxxxx;principal=hive/aabc@REALM&lt;BR /&gt;Connecting to jdbc:hive2://abc:10001/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=xxxxx;principal=hive/aabc@REALM&lt;BR /&gt;Unknown HS2 problem when communicating with Thrift server.&lt;BR /&gt;Error: Could not open client transport with JDBC Uri: jdbc:hive2://abc:10001/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=xxxxxx;principal=hive/aabc@REALM: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake (state=08S01,code=0)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below snap for haproxy config&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;# This is the setup for HS2. beeline client connect to load_balancer_host:10001.&lt;BR /&gt;# HAProxy will balance connections among the list of servers listed below.&lt;BR /&gt;listen hiveserver2 :10001&lt;BR /&gt;mode tcp&lt;BR /&gt;option tcplog&lt;BR /&gt;balance source&lt;BR /&gt;server hiveserver2_1 abc:10000&lt;BR /&gt;server hiveserver2_2 xyz:10000&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kindly suggest?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Vijay M&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 13:47:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/80813#M33330</guid>
      <dc:creator>VijayM</dc:creator>
      <dc:date>2022-09-16T13:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: Hiveserver2 HA using haproxy load balancing</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/80846#M33331</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/27833"&gt;@VijayM&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We see by the following error that the failure occurred during the TLS handshake:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake (state=08S01,code=0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this case, it is probably that the server did not understand the connection sent to it.&amp;nbsp; In order to debug further, you can examine the logs of your HAProxy and also the HiveServer2 instance that you connected to.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would also suggest testing without the HAProxy (connect directly with beeline to each of the HS2 instances and see if you can connect.&amp;nbsp; This will help isolate whether to look more closely at HiveServer2 or the HAProxy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you know&amp;nbsp;&lt;STRONG&gt;tcpdump&lt;/STRONG&gt;, it is perfect for debugging TLS handshake problems since it lets you see all the handshake communication.&amp;nbsp;&amp;nbsp;Wireshark can decode the packets and display the handshake nicely. If that is not something you know well, let's hit the logs first.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Oct 2018 17:03:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/80846#M33331</guid>
      <dc:creator>bgooley</dc:creator>
      <dc:date>2018-10-08T17:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: Hiveserver2 HA using haproxy load balancing</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/81008#M33332</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;FONT size="2"&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/27833"&gt;@VijayM&lt;/a&gt;&amp;nbsp;wrote:&lt;/FONT&gt;&lt;BR /&gt;&lt;P&gt;&lt;FONT size="2"&gt;Hello Team,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;We have CDH 5.15 cluster running and have kerberos and TLS enabled for all services in the cluster.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;We would like to enable for Hiveserver2 using haproxy load balancer.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;We have enable HA for hivemetastore using below link. 2 instance of hive metastore is up and running.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;&lt;A href="https://www.cloudera.com/documentation/enterprise/5-15-x/topics/admin_ha_hivemetastore.html" target="_blank"&gt;https://www.cloudera.com/documentation/enterprise/5-15-x/topics/admin_ha_hivemetastore.html&lt;/A&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;Refering below link for hiveserver2 ha.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;&lt;A href="https://www.cloudera.com/documentation/enterprise/5-15-x/topics/admin_ha_hiveserver2.html" target="_blank"&gt;https://www.cloudera.com/documentation/enterprise/5-15-x/topics/admin_ha_hiveserver2.html&lt;/A&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;haproxy, 1 instance of hive metastore, 1 instance of hiveserver2 installed &lt;A href="https://www.krogerfeedback.us" target="_self"&gt;krogerfeedback&lt;/A&gt; on same node.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;beeline throws below error.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;beeline&amp;gt; !connect jdbc:hive2://abc:10001/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=xxxxx;principal=hive/aabc@REALM&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;Connecting to jdbc:hive2://abc:10001/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=xxxxx;principal=hive/aabc@REALM&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;Unknown HS2 problem when communicating with Thrift server.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;Error: Could not open client transport with JDBC Uri: jdbc:hive2://abc:10001/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=xxxxxx;principal=hive/aabc@REALM: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake (state=08S01,code=0)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Below snap for haproxy config&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;# This is the setup for HS2. beeline client connect to load_balancer_host:10001.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;# HAProxy will balance connections among the list of servers listed below.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;listen hiveserver2 :10001&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;mode tcp&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;option tcplog&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;balance source&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;server hiveserver2_1 abc:10000&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;server hiveserver2_2 xyz:10000&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Kindly suggest?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;- Vijay M&lt;/FONT&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;This is getting really&amp;nbsp;complicated for me, please help!&lt;/P&gt;</description>
      <pubDate>Thu, 11 Oct 2018 07:38:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/81008#M33332</guid>
      <dc:creator>Rebecca784</dc:creator>
      <dc:date>2018-10-11T07:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: Hiveserver2 HA using haproxy load balancing</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/81144#M33333</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/4054"&gt;@bgooley&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have TLS enabled hiveserver2 with 2 instance running on 2 different hosts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;haproxy installed and configured on same server where 1 hive instance running.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly confirm below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. DO i need to define TLS cert anywhere in haproxy config, If yes any documentation for it?&lt;/P&gt;&lt;P&gt;2. Does haproxy also needs to be configured with TLS?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any documentation for installing and conifuring load balancer for TLS enabled hiveserver2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- VIjay Mishra&lt;/P&gt;</description>
      <pubDate>Tue, 16 Oct 2018 15:35:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/81144#M33333</guid>
      <dc:creator>VijayM</dc:creator>
      <dc:date>2018-10-16T15:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: Hiveserver2 HA using haproxy load balancing</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/81194#M33334</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/27833"&gt;@VijayM&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you are using&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;TLS passthrough&lt;/STRONG&gt;, then you don't need to configure certificates fo HAProxy as the TLS handshake is done with the HS2 servers themselves.&amp;nbsp; This does add some extra work for you, though, as it means that you need to be sure that the hostname(s) in the HS2 server certificates match the name of your HAProxy host.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This can be done in a few ways, such as issuing a server certificate that contains SubjectAltName value equal to the HAProxy host's fully-qualified domain name or you could use a wildcard that matches the domain.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you are using TLS termination where the client will do the TLS handshake with HAProxy and then can either do TLS or non-TLS connections to backend servers.&amp;nbsp; In this case, HAProxy will decrypt the incoming request and then re-encrypt it if your HS2 servers are listening on TLS ports.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In that case, you&amp;nbsp;&lt;STRONG&gt;do&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;have to specify a server certificate for HAProxy's frontend&amp;nbsp;&lt;STRONG&gt;and&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;you need to use a trust store to trust the signer of the HS2 certificates.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is information out there, but this page (dispite a few mistakes) is pretty good talking about each:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://serversforhackers.com/c/using-ssl-certificates-with-haproxy" target="_blank"&gt;https://serversforhackers.com/c/using-ssl-certificates-with-haproxy&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;An example of pass-through is one I'm using on my server:&lt;BR /&gt;&lt;BR /&gt;frontend hiveserver2_front&lt;BR /&gt;bind *:10015 ssl crt /etc/cdep-ssl-conf/CA_STANDARD/cert_key.pem&lt;BR /&gt;mode tcp&lt;BR /&gt;option tcplog&lt;BR /&gt;default_backend hiveserver2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;backend hiveserver2&lt;BR /&gt;balance source&lt;BR /&gt;mode tcp&lt;BR /&gt;server hiveserver2_1 tls12-1.example.com:10000 ssl ca-file /etc/cdep-ssl-conf/CA_STANDARD/truststore.pem&lt;BR /&gt;server hiveserver2_2 tls12-4.example.com:10000 ssl ca-file /etc/cdep-ssl-conf/CA_STANDARD/truststore.pem&lt;BR /&gt;server hiveserver2_3 tls12-2.&lt;SPAN&gt;example.com&lt;/SPAN&gt;:10000 ssl ca-file /etc/cdep-ssl-conf/CA_STANDARD/truststore.pem&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE:&amp;nbsp; in the above, I have&amp;nbsp;&lt;STRONG&gt;mode tcp&lt;/STRONG&gt; set which means I'm using passthrough (no http header evaluation and therefore no need to decrypt)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since I have server and truststore files configured, though, I could switch to&amp;nbsp;&lt;STRONG&gt;mode http&lt;/STRONG&gt; and do termination at the HAProxy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm no HAProxy expert, but I am pretty sure the above should help you.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2018 18:04:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/81194#M33334</guid>
      <dc:creator>bgooley</dc:creator>
      <dc:date>2018-10-17T18:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: Hiveserver2 HA using haproxy load balancing</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/81772#M33335</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/4054"&gt;@bgooley&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was engaged in some other projects so unable to reply on it. Started working on it today.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When iam connecting both hiveserver2 instance without haproxy, removed the load balance entry from hive confiugration.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to connect to both hiveserver2 instance from beeline.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have hiveserver2 TLS enable using CA signed certificates. and Hiveserver2 certificates are in Java format i.e. .jks(keystore.jks and truststore.jks).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my haproxy configuration at bind line i am giving keystore.jks entry and for backend entry i am giving truststore.jks entry for both server.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly confirm is it correct or suggest?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- VIjay M&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 11:35:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/81772#M33335</guid>
      <dc:creator>VijayM</dc:creator>
      <dc:date>2018-11-01T11:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: Hiveserver2 HA using haproxy load balancing</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/82009#M33336</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/27833"&gt;@VijayM&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Without seeing the configuration you have, it is hard to say what is correct.&amp;nbsp; Perhaps you can share and we can see if there is something obvois. I would strongly suggest looking at the HAProxy logs an the HiveServer2 logs when the problem happens to look for any TLS errors or related messages.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2018 23:27:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/82009#M33336</guid>
      <dc:creator>bgooley</dc:creator>
      <dc:date>2018-11-06T23:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: Hiveserver2 HA using haproxy load balancing</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/82031#M33337</link>
      <description>&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/4054"&gt;@bgooley&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;Haproxy log doesn't shows anything and even Hiveserver2 logs.&lt;BR /&gt;&lt;BR /&gt;Will send you configuration post Monday as I am on leave.&lt;BR /&gt;&lt;BR /&gt;- Vijay M&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Nov 2018 04:12:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/82031#M33337</guid>
      <dc:creator>VijayM</dc:creator>
      <dc:date>2018-11-07T04:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: Hiveserver2 HA using haproxy load balancing</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/82262#M33338</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/4054"&gt;@bgooley&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below find details of certificates which i have on cluster.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;below certificate is from root CA&lt;/P&gt;&lt;P&gt;-rwxr-xr-x. 1 cloudera-scm cloudera-scm 8152 Oct&amp;nbsp; 5 10:36 cacerts.pem&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below certificate are keystore and trustore used by Hive service TLS enabled.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-rwxr-xr-x. 1 cloudera-scm cloudera-scm 9624 Oct 5 10:38 cloudera_keystore.jks&lt;BR /&gt;-rwxr-xr-x. 1 cloudera-scm cloudera-scm 4048 Oct 5 10:39 cloudera_truststore.jks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below find configuration of haproxy&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#---------------------------------------------------------------------&lt;BR /&gt;# main frontend which proxys to the backends&lt;BR /&gt;#---------------------------------------------------------------------&lt;BR /&gt;frontend hiveserver2_front&lt;BR /&gt;bind *:443&lt;BR /&gt;option tcplog&lt;BR /&gt;mode tcp&lt;BR /&gt;default_backend hiveserver2&lt;/P&gt;&lt;P&gt;# This is the setup for HS2. beeline client connect to load_balancer_host:10001.&lt;BR /&gt;# HAProxy will balance connections among the list of servers listed below.&lt;BR /&gt;backend hiveserver2&lt;BR /&gt;mode tcp&lt;BR /&gt;balance source&lt;BR /&gt;option ssl-hello-chk&lt;BR /&gt;server hiveserver2_1 abc:10000 check&lt;BR /&gt;server hiveserver2_2 xyz:10000 check&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--- hive server2 configuration from cloudera manager configured with below property&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;HiveServer2 Load Balancer&amp;nbsp; &amp;nbsp; &amp;nbsp; abc:443&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1. Kindly confirm does in above property do i have to add https&amp;nbsp; or http?&amp;nbsp; Is it require?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. Kindly review the configuration and let me know if anything more details require?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3. one of hiveserver2 instance and haproxy services configured on same server i.e. abc, Is it an issue?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Kindly suggest?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- Vijay M&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Nov 2018 08:45:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/82262#M33338</guid>
      <dc:creator>VijayM</dc:creator>
      <dc:date>2018-11-13T08:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: Hiveserver2 HA using haproxy load balancing</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/82329#M33339</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/27833"&gt;@VijayM&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Based on your original message and your configuration, I think the HAProxy bind port is the issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;bind *:443&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But you are trying to connect via TLS to port 10001&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Maybe try:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;bind *:10001&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Then restart HAProxy.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hope it is that simple.&amp;nbsp; If that doesn't work, let us know and we can use openssl s_client to observe the handshake to see what happens.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2018 20:37:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/82329#M33339</guid>
      <dc:creator>bgooley</dc:creator>
      <dc:date>2018-11-14T20:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: Hiveserver2 HA using haproxy load balancing</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/82350#M33340</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/4054"&gt;@bgooley&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Same issue with port 10001 or port 443.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below snap confirms haproxy started and running on port 10001.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[root@abc ~]# ps -ef | grep -i haproxy&lt;BR /&gt;root 2620129 1 0 06:19 ? 00:00:00 /usr/sbin/haproxy-systemd-wrapper -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid&lt;BR /&gt;haproxy 2620130 2620129 0 06:19 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -Ds&lt;BR /&gt;haproxy 2620131 2620130 0 06:19 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -Ds&lt;BR /&gt;&lt;BR /&gt;[root@abc ~]# netstat -tunlp | grep 10001&lt;BR /&gt;tcp 0 0 0.0.0.0:10001 0.0.0.0:* LISTEN 2620131/haproxy&lt;BR /&gt;[root@abc ~]#&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below are 2 scenarios which i tried and explained. Kindly check and suggest to fix.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Case1:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When i removed haproxy load balancer porperty from hive configuration and trying to connect individual haproxy services through beeline. i am able to connect. Below snap for the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;beeline&amp;gt; !connect jdbc:hive2://abc:10000/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=*****;principal=hive/_HOST@REALM&lt;BR /&gt;Connecting to jdbc:hive2://abc:10000/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=*****;principal=hive/_HOST@REALM&lt;BR /&gt;Connected to: Apache Hive (version 1.1.0-cdh5.15.1)&lt;BR /&gt;Driver: Hive JDBC (version 1.1.0-cdh5.15.1)&lt;BR /&gt;Transaction isolation: TRANSACTION_REPEATABLE_READ&lt;BR /&gt;0: jdbc:hive2://a301-8883-0447.gdzd.ubs.net:1&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;beeline&amp;gt; !connect jdbc:hive2://xyz:10000/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=*****;principal=hive/_HOST@REALM&lt;BR /&gt;scan complete in 2ms&lt;BR /&gt;Connecting to jdbc:hive2://xyz:10000/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=*****;principal=hive/_HOST@BDS-DR.UBS.COM&lt;BR /&gt;Connected to: Apache Hive (version 1.1.0-cdh5.15.1)&lt;BR /&gt;Driver: Hive JDBC (version 1.1.0-cdh5.15.1)&lt;BR /&gt;Transaction isolation: TRANSACTION_REPEATABLE_READ&lt;BR /&gt;0: jdbc:hive2://a301-8883-2675.gdzd.ubs.net:1&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Case2:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With haproxy load balancer property in hive configuration with port 10001 configured in haproxy configuration its not working and throws error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;beeline&amp;gt; !connect jdbc:hive2://abc:10001/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=*****;principal=hive/_HOST@REALM&lt;BR /&gt;Connecting to jdbc:hive2://abc:10001/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=Cldkeystore1;principal=hive/_HOST@BDS-DR.UBS.COM&lt;BR /&gt;Unknown HS2 problem when communicating with Thrift server.&lt;BR /&gt;Error: Could not open client transport with JDBC Uri: jdbc:hive2://abc:10001/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=*****;principal=hive/_HOST@REALM: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake (state=08S01,code=0)&lt;BR /&gt;beeline&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No logs of both hiveserver2 instance and haproxy gets updated for above error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;with above scnario when i am trying to connect individual hiveserver2 instances i am able to connect to hiveserver2 instance on haproxy running but unable to connect to other hiveserver2 instance and gets TLS error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below snap for both.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--&amp;nbsp; Successfully able to connect to hiveserrver2 where haproxy also running.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;beeline&amp;gt; !connect jdbc:hive2://abc:10000/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=*****;principal=hive/_HOST@REALM&lt;BR /&gt;Connecting to jdbc:hive2://abc:10000/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=*****;principal=hive/_HOST@REALM&lt;BR /&gt;Connected to: Apache Hive (version 1.1.0-cdh5.15.1)&lt;BR /&gt;Driver: Hive JDBC (version 1.1.0-cdh5.15.1)&lt;BR /&gt;Transaction isolation: TRANSACTION_REPEATABLE_READ&lt;BR /&gt;0: jdbc:hive2://a301-8883-0447.gdzd.ubs.net:1&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--- Unable to connect to other hiveserver2 instance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;beeline&amp;gt; !connect jdbc:hive2://xyz:10000/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=*****;principal=hive/_HOST@REALM&lt;BR /&gt;scan complete in 2ms&lt;BR /&gt;Connecting to jdbc:hive2://xyz:10000/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=*****;principal=hive/_HOST@REALM&lt;BR /&gt;Unknown HS2 problem when communicating with Thrift server.&lt;BR /&gt;Error: Could not open client transport with JDBC Uri: jdbc:hive2://xyz:10000/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=*****;principal=hive/_HOST@REALM: Peer indicated failure: GSS initiate failed (state=08S01,code=0)&lt;BR /&gt;beeline&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hiveserver2 log shows below error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2018-11-15 06:46:08,217 ERROR org.apache.thrift.transport.TSaslTransport: [HiveServer2-Handler-Pool: Thread-40]: SASL negotiation failure&lt;BR /&gt;javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: Failure unspecified at GSS-API level (Mechanism level: Checksum failed)]&lt;BR /&gt;at com.sun.security.sasl.gsskerb.GssKrb5Server.evaluateResponse(GssKrb5Server.java:199)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Caused by: GSSException: Failure unspecified at GSS-API level (Mechanism level: Checksum failed)&lt;BR /&gt;at sun.security.jgss.krb5.Krb5Context.acceptSecContext(Krb5Context.java:856)&lt;BR /&gt;at sun.security.jgss.GSSContextImpl.acceptSecContext(GSSContextImpl.java:342)&lt;BR /&gt;at sun.security.jgss.GSSContextImpl.acceptSecContext(GSSContextImpl.java:285)&lt;BR /&gt;at com.sun.security.sasl.gsskerb.GssKrb5Server.evaluateResponse(GssKrb5Server.java:167)&lt;BR /&gt;... 14 more&lt;BR /&gt;Caused by: KrbException: Checksum failed&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2018-11-15 06:46:08,220 ERROR org.apache.thrift.server.TThreadPoolServer: [HiveServer2-Handler-Pool: Thread-40]: Error occurred during processing of message.&lt;BR /&gt;java.lang.RuntimeException: org.apache.thrift.transport.TTransportException: GSS initiate failed&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Caused by: org.apache.thrift.transport.TTransportException: GSS initiate failed&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Vijay M&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 05:54:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/82350#M33340</guid>
      <dc:creator>VijayM</dc:creator>
      <dc:date>2018-11-15T05:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: Hiveserver2 HA using haproxy load balancing</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/82353#M33341</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/4054"&gt;@bgooley&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also if i configure haproxy using below configuration its does not starts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;frontend hiveserver2_front&lt;BR /&gt;bind *:10001 ssl crt /app/bds/security/x509/cmserver.pem&lt;BR /&gt;option tcplog&lt;BR /&gt;mode tcp&lt;BR /&gt;default_backend hiveserver2&lt;/P&gt;&lt;P&gt;# This is the setup for HS2. beeline client connect to load_balancer_host:10001.&lt;BR /&gt;# HAProxy will balance connections among the list of servers listed below.&lt;BR /&gt;backend hiveserver2&lt;BR /&gt;mode tcp&lt;BR /&gt;balance source&lt;BR /&gt;option ssl-hello-chk&lt;BR /&gt;server hiveserver2_1 abc:10000&lt;BR /&gt;server hiveserver2_2 xyz:10000&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;below ask for passhphrase, not sure why&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[root@abc conf]# /usr/sbin/haproxy -c -f /etc/haproxy/haproxy.cfg&lt;BR /&gt;Enter PEM pass phrase:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When i entered the password/passphrase it gives invalid configuration file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[root@abc conf]# /usr/sbin/haproxy -c -f /etc/haproxy/haproxy.cfg&lt;BR /&gt;Enter PEM pass phrase:&lt;BR /&gt;[WARNING] 318/081440 (2708462) : Setting tune.ssl.default-dh-param to 1024 by default, if your workload permits it you should set it to at least 2048. Please set a value &amp;gt;= 1024 to make this warning disappear.&lt;BR /&gt;Configuration file is valid&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly suggest what wrong i m doing ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Vijay M&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 07:15:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/82353#M33341</guid>
      <dc:creator>VijayM</dc:creator>
      <dc:date>2018-11-15T07:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: Hiveserver2 HA using haproxy load balancing</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/82371#M33342</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/27833"&gt;@VijayM&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The configuration you are using is not correct as it is a mix of pass-through and termination.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can remove everything from ssl onward in line:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;bind *:10001 ssl crt /app/bds/security/x509/cmserver.pem&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;so it becomes:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;bind *:10001&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I looked back at my first post and it appears I made a mistake when pasting and forgot to remove the "ssl" part from my pass-through example.&amp;nbsp; Sorry for the confusion.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;NOTE&lt;/STRONG&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If you are doing TLS termination, then being prompted for the key password is expected if you have a key file that is password protected.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;NOTE2&lt;/STRONG&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In order to get rid of that WARNING if you want to use termination, add&amp;nbsp;&lt;STRONG&gt;tune.ssl.default-dh-param 2048&amp;nbsp;&lt;/STRONG&gt;to the "global" section of your haproxy.cfg and restart.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In ordre to debug&amp;nbsp;the &lt;STRONG&gt;javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake (state=08S01,code=0) issue&amp;nbsp;&lt;/STRONG&gt;we really need to see why the handshake is being terminated.&amp;nbsp; If the log of haproxy and both hiveserver2 servers don't show any TLS messages at the time of the failure, then the next best thing is to do a packet capture on port host where the beeline is run and also on the HiveServer2 server.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Since the TLS handshake is done in the clear, a packet capture can be opened in WireShark where the handshake will be evident.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For example:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1 - runon the beeline host:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;# tcpdump -i any -w ~/beeline.pcap port 10001&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2 - run on the HiveServer2 host (shut down one so that the load balancer must choose one and you know which):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;# tcpdump -i any -w ~/hs2.pcap port 10000&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3 - run the beeline command so that it fails&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;4 - Ctrl-c both tcpdumps&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;5 - open the pcap files in Wireshark.&amp;nbsp; You may need to use "decode as..." to decode the 10001 and 10000 ports as SSL/TLS in order to see the TLS handshake.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If you are unfamiliar with packet capture/wireshark, then try this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;# openssl s_client -connect &amp;lt;load_balancer_host&amp;gt;:10001 -msg -debug&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This will have openssl client print out the handshake process via the load balancer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 16:44:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/82371#M33342</guid>
      <dc:creator>bgooley</dc:creator>
      <dc:date>2018-11-15T16:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Hiveserver2 HA using haproxy load balancing</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/82378#M33343</link>
      <description>Hello bgooley,&lt;BR /&gt;&lt;BR /&gt;Sure, let me try what u suggested.&lt;BR /&gt;&lt;BR /&gt;I would like to use Ssl pass through in haproxy config.&lt;BR /&gt;&lt;BR /&gt;Kindly provide exact configuration needs to define in haproxy config.&lt;BR /&gt;&lt;BR /&gt;- Vijay M&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Nov 2018 18:11:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/82378#M33343</guid>
      <dc:creator>VijayM</dc:creator>
      <dc:date>2018-11-15T18:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: Hiveserver2 HA using haproxy load balancing</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/82439#M33344</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/4054"&gt;@bgooley&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly find below updated hzproxy configuration.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;frontend hiveserver2_front&lt;BR /&gt;bind *:10001&lt;BR /&gt;option tcplog&lt;BR /&gt;mode tcp&lt;BR /&gt;default_backend hiveserver2&lt;/P&gt;&lt;P&gt;# This is the setup for HS2. beeline client connect to load_balancer_host:10001.&lt;BR /&gt;# HAProxy will balance connections among the list of servers listed below.&lt;BR /&gt;backend hiveserver2&lt;BR /&gt;mode tcp&lt;BR /&gt;balance source&lt;BR /&gt;#option ssl-hello-chk&lt;BR /&gt;server hiveserver2_1 abc:10000&lt;BR /&gt;server hiveserver2_2 xyz:10000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Updated hiveserver2 configuration with hive load balancer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;HiveServer2 Load Balancer&amp;nbsp; -&amp;nbsp;&amp;nbsp;abc:10001&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Tried to connect through beeline but it still gives the same TLS error.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;beeline&amp;gt; !connect jdbc:hive2://abc:10001/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=*****;principal=hive/_HOST@REALM&lt;BR /&gt;scan complete in 2ms&lt;BR /&gt;Connecting to jdbc:hive2://abc:10001/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=*****;principal=hive/_HOST@REALM&lt;BR /&gt;Unknown HS2 problem when communicating with Thrift server.&lt;BR /&gt;Error: Could not open client transport with JDBC Uri: jdbc:hive2://abc:10001/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=*****;principal=hive/_HOST@REALM: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake (state=08S01,code=0)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Tried to test TLS connectivity with openssl command which you suggested. below snap&amp;nbsp; for the same. Kindly check and suggest.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[root@abc ~]# openssl s_client -connect abc:10001 -msg -debug&lt;BR /&gt;CONNECTED(00000003)&lt;BR /&gt;write to 0x14e0e00 [0x14f73b0] (289 bytes =&amp;gt; 289 (0x121))&lt;BR /&gt;0000 - 16 03 01 01 1c 01 00 01-18 03 03 f2 83 c8 e8 a0 ................&lt;BR /&gt;0010 - 24 eb da e4 31 75 05 76-62 91 34 b1 4b cc ce 21 $...1u.vb.4.K..!&lt;BR /&gt;0020 - 15 99 d7 cc 76 93 78 7d-5e bb 8f 00 00 ac c0 30 ....v.x}^......0&lt;BR /&gt;0030 - c0 2c c0 28 c0 24 c0 14-c0 0a 00 a5 00 a3 00 a1 .,.(.$..........&lt;BR /&gt;0040 - 00 9f 00 6b 00 6a 00 69-00 68 00 39 00 38 00 37 ...k.j.i.h.9.8.7&lt;BR /&gt;0050 - 00 36 00 88 00 87 00 86-00 85 c0 32 c0 2e c0 2a .6.........2...*&lt;BR /&gt;0060 - c0 26 c0 0f c0 05 00 9d-00 3d 00 35 00 84 c0 2f .&amp;amp;.......=.5.../&lt;BR /&gt;0070 - c0 2b c0 27 c0 23 c0 13-c0 09 00 a4 00 a2 00 a0 .+.'.#..........&lt;BR /&gt;0080 - 00 9e 00 67 00 40 00 3f-00 3e 00 33 00 32 00 31 ...g.@.?.&amp;gt;.3.2.1&lt;BR /&gt;0090 - 00 30 00 9a 00 99 00 98-00 97 00 45 00 44 00 43 .0.........E.D.C&lt;BR /&gt;00a0 - 00 42 c0 31 c0 2d c0 29-c0 25 c0 0e c0 04 00 9c .B.1.-.).%......&lt;BR /&gt;00b0 - 00 3c 00 2f 00 96 00 41-c0 12 c0 08 00 16 00 13 .&amp;lt;./...A........&lt;BR /&gt;00c0 - 00 10 00 0d c0 0d c0 03-00 0a 00 07 c0 11 c0 07 ................&lt;BR /&gt;00d0 - c0 0c c0 02 00 05 00 04-00 ff 01 00 00 43 00 0b .............C..&lt;BR /&gt;00e0 - 00 04 03 00 01 02 00 0a-00 0a 00 08 00 17 00 19 ................&lt;BR /&gt;00f0 - 00 18 00 16 00 23 00 00-00 0d 00 20 00 1e 06 01 .....#..... ....&lt;BR /&gt;0100 - 06 02 06 03 05 01 05 02-05 03 04 01 04 02 04 03 ................&lt;BR /&gt;0110 - 03 01 03 02 03 03 02 01-02 02 02 03 00 0f 00 01 ................&lt;BR /&gt;0120 - 01 .&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; TLS 1.2 [length 0005]&lt;BR /&gt;16 03 01 01 1c&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; TLS 1.2 Handshake [length 011c], ClientHello&lt;BR /&gt;01 00 01 18 03 03 f2 83 c8 e8 a0 24 eb da e4 31&lt;BR /&gt;75 05 76 62 91 34 b1 4b cc ce 21 15 99 d7 cc 76&lt;BR /&gt;93 78 7d 5e bb 8f 00 00 ac c0 30 c0 2c c0 28 c0&lt;BR /&gt;24 c0 14 c0 0a 00 a5 00 a3 00 a1 00 9f 00 6b 00&lt;BR /&gt;6a 00 69 00 68 00 39 00 38 00 37 00 36 00 88 00&lt;BR /&gt;87 00 86 00 85 c0 32 c0 2e c0 2a c0 26 c0 0f c0&lt;BR /&gt;05 00 9d 00 3d 00 35 00 84 c0 2f c0 2b c0 27 c0&lt;BR /&gt;23 c0 13 c0 09 00 a4 00 a2 00 a0 00 9e 00 67 00&lt;BR /&gt;40 00 3f 00 3e 00 33 00 32 00 31 00 30 00 9a 00&lt;BR /&gt;99 00 98 00 97 00 45 00 44 00 43 00 42 c0 31 c0&lt;BR /&gt;2d c0 29 c0 25 c0 0e c0 04 00 9c 00 3c 00 2f 00&lt;BR /&gt;96 00 41 c0 12 c0 08 00 16 00 13 00 10 00 0d c0&lt;BR /&gt;0d c0 03 00 0a 00 07 c0 11 c0 07 c0 0c c0 02 00&lt;BR /&gt;05 00 04 00 ff 01 00 00 43 00 0b 00 04 03 00 01&lt;BR /&gt;02 00 0a 00 0a 00 08 00 17 00 19 00 18 00 16 00&lt;BR /&gt;23 00 00 00 0d 00 20 00 1e 06 01 06 02 06 03 05&lt;BR /&gt;01 05 02 05 03 04 01 04 02 04 03 03 01 03 02 03&lt;BR /&gt;03 02 01 02 02 02 03 00 0f 00 01 01&lt;BR /&gt;read from 0x14e0e00 [0x14fc910] (7 bytes =&amp;gt; 0 (0x0))&lt;BR /&gt;140683941742480:error:140790E5:SSL routines:ssl23_write:ssl handshake failure:s23_lib.c:177:&lt;BR /&gt;---&lt;BR /&gt;no peer certificate available&lt;BR /&gt;---&lt;BR /&gt;No client certificate CA names sent&lt;BR /&gt;---&lt;BR /&gt;SSL handshake has read 0 bytes and written 289 bytes&lt;BR /&gt;---&lt;BR /&gt;New, (NONE), Cipher is (NONE)&lt;BR /&gt;Secure Renegotiation IS NOT supported&lt;BR /&gt;Compression: NONE&lt;BR /&gt;Expansion: NONE&lt;BR /&gt;No ALPN negotiated&lt;BR /&gt;SSL-Session:&lt;BR /&gt;Protocol : TLSv1.2&lt;BR /&gt;Cipher : 0000&lt;BR /&gt;Session-ID:&lt;BR /&gt;Session-ID-ctx:&lt;BR /&gt;Master-Key:&lt;BR /&gt;Key-Arg : None&lt;BR /&gt;Krb5 Principal: None&lt;BR /&gt;PSK identity: None&lt;BR /&gt;PSK identity hint: None&lt;BR /&gt;Start Time: 1542369743&lt;BR /&gt;Timeout : 300 (sec)&lt;BR /&gt;Verify return code: 0 (ok)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Tried to shutdown 1 of hiveserver2 instance and tested with beeline but still same issue.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hiveserver2 TLS certificates are in JKS format.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Kindly suggest.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- Vijay M&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Nov 2018 12:14:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/82439#M33344</guid>
      <dc:creator>VijayM</dc:creator>
      <dc:date>2018-11-16T12:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: Hiveserver2 HA using haproxy load balancing</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/82456#M33345</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/27833"&gt;@VijayM&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The openssl debug information indicates that the client makes a connection to a server but the server does not return a certificate.&amp;nbsp; Since a direct connection to HiveServer2 does not have the problem, I conclude that your haproxy is still using termination even though your configuration snippet would indicate otherwise.&amp;nbsp; Based on what you have provided it appears:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. your connection to port 10001 is using TLS termination at the haproxy&lt;/P&gt;&lt;P&gt;2. the server certificate is not valid so no TLS handshake can be performed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically, the configuration you show cannot be the one that is being used for haproxy that is running and listening on port 10001 so perhaps it was not restarted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;openssl s_client&lt;/STRONG&gt; will return the following error if the port it connects to is not listening on TLS:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;139972358285128:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:769:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since you are seeing:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SSL routines:ssl23_write:ssl handshake failure:s23_lib.c:177&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;That indicates there was an actual problem on the server side.&amp;nbsp; The server in this case must be your haproxy.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So, I think it would be good to list the full haproxy configuration file and also make sure that it really did restart since your last change.&amp;nbsp; I used your config file and pass-through TLS worked perfectly to my HS2 servers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I think we must be fighting an haproxy config/restart issue since the frontend/backend you showed last worked for me. I actually copied and pasted your config and changed the hostnames only.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Nov 2018 17:27:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/82456#M33345</guid>
      <dc:creator>bgooley</dc:creator>
      <dc:date>2018-11-16T17:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Hiveserver2 HA using haproxy load balancing</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/82459#M33346</link>
      <description>Hello bgooley,&lt;BR /&gt;&lt;BR /&gt;I will going to office on Tuesday now, will do the troubleshooting on that&lt;BR /&gt;day and if still the same issue can provide you full haproxy config file.&lt;BR /&gt;&lt;BR /&gt;If u can provide ur full haproxy config file then I will compare and will&lt;BR /&gt;correct the things.&lt;BR /&gt;&lt;BR /&gt;- Vijay M&lt;BR /&gt;</description>
      <pubDate>Fri, 16 Nov 2018 17:42:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/82459#M33346</guid>
      <dc:creator>VijayM</dc:creator>
      <dc:date>2018-11-16T17:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: Hiveserver2 HA using haproxy load balancing</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/82463#M33347</link>
      <description>&lt;P&gt;&lt;FONT face="courier new,courier"&gt;global&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;log 127.0.0.1 local2&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;pidfile /var/run/haproxy.pid&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;maxconn 4000&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;user haproxy&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;group haproxy&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;daemon&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;stats socket /tmp/haproxy&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;tune.ssl.default-dh-param 2048&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;defaults&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;mode http&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;log global&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;option httplog&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;option dontlognull&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;option forwardfor except 127.0.0.0/8&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;option redispatch&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;retries 3&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;timeout http-request 10s&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;timeout queue 1m&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;timeout connect 10s&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;timeout client 10m&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;timeout server 10m&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;timeout check 10s&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;maxconn 3000&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;listen admin&lt;BR /&gt;&amp;nbsp; &amp;nbsp;bind *:8000&lt;BR /&gt;&amp;nbsp; &amp;nbsp;stats enable&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;frontend hiveserver2_front&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;bind *:10001&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;option tcplog&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;mode tcp&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;default_backend hiveserver2&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;backend hiveserver2&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;mode tcp&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;balance source&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;server hs2_1 host1.example.com:10000&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;server hs2_2 host2.example.com:10000&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Nov 2018 18:03:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/82463#M33347</guid>
      <dc:creator>bgooley</dc:creator>
      <dc:date>2018-11-16T18:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: Hiveserver2 HA using haproxy load balancing</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/82550#M33348</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/4054"&gt;@bgooley&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have updated haproxy configuration as you provided. Below snap for the same.&lt;/P&gt;&lt;P&gt;global&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;log 127.0.0.1 local2&lt;/P&gt;&lt;P&gt;pidfile /var/run/haproxy.pid&lt;BR /&gt;maxconn 4000&lt;BR /&gt;user haproxy&lt;BR /&gt;group haproxy&lt;BR /&gt;daemon&lt;BR /&gt;# stats socket /tmp/haproxy&lt;BR /&gt;# tune.ssl.default-dh-param 2048&lt;/P&gt;&lt;P&gt;defaults&lt;BR /&gt;mode http&lt;BR /&gt;log global&lt;BR /&gt;option httplog&lt;BR /&gt;option dontlognull&lt;BR /&gt;# option forwardfor except 127.0.0.0/8&lt;BR /&gt;option redispatch&lt;BR /&gt;retries 3&lt;BR /&gt;timeout http-request 10s&lt;BR /&gt;timeout queue 1m&lt;BR /&gt;timeout connect 10s&lt;BR /&gt;timeout client 10m&lt;BR /&gt;timeout server 10m&lt;BR /&gt;timeout check 10s&lt;BR /&gt;maxconn 3000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;listen admin&lt;BR /&gt;bind *:8000&lt;BR /&gt;stats enable&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;frontend hiveserver2_front&lt;BR /&gt;bind *:10001&lt;BR /&gt;option tcplog&lt;BR /&gt;mode tcp&lt;BR /&gt;default_backend hiveserver2&lt;/P&gt;&lt;P&gt;backend hiveserver2&lt;BR /&gt;mode tcp&lt;BR /&gt;balance source&lt;BR /&gt;server hs2_1 abc:10000&lt;BR /&gt;server hs2_2 xyz:10000&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;restarted haproxy and it started with current timestamp. Check and verified.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Below find configuration info&lt;/P&gt;&lt;P&gt;haproxy service and 1st hiveserver instance running on server : abc&lt;BR /&gt;2nd hiveserver instance running on server : xyz&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Scenario 1:&lt;/P&gt;&lt;P&gt;Both hiveserver2 instance up and running.&lt;BR /&gt;Connecting from beeline from server abc, throws below error.&lt;/P&gt;&lt;P&gt;beeline&amp;gt; !connect jdbc:hive2://abc:10001/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=*****;principal=hive/_HOST@REALM&lt;BR /&gt;Connecting to jdbc:hive2://abc:10001/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=*****;principal=hive/_HOST@REALM&lt;BR /&gt;Unknown HS2 problem when communicating with Thrift server.&lt;BR /&gt;Error: Could not open client transport with JDBC Uri: jdbc:hive2://abc:10001/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=*****;principal=hive/_HOST@BDS-DR.UBS.COM: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative DNS name matching abc found. (state=08S01,code=0)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Connecting from beeline from server xyz is successful, Below snap for the same.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;beeline&amp;gt; !connect jdbc:hive2://abc:10001/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=*****;principal=hive/_HOST@REALM&lt;BR /&gt;scan complete in 2ms&lt;BR /&gt;Connecting to jdbc:hive2://abc:10001/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=Cldkeystore1;principal=hive/_HOST@REALM&lt;BR /&gt;Connected to: Apache Hive (version 1.1.0-cdh5.15.1)&lt;BR /&gt;Driver: Hive JDBC (version 1.1.0-cdh5.15.1)&lt;BR /&gt;Transaction isolation: TRANSACTION_REPEATABLE_READ&lt;BR /&gt;0: jdbc:hive2://abc:1&amp;gt; show databases;&lt;BR /&gt;Unexpected end of file when reading from HS2 server. The root cause might be too many concurrent connections. Please ask the administrator to check the number of active connections, and adjust hive.server2.thrift.max.worker.threads if applicable.&lt;BR /&gt;Error: org.apache.thrift.transport.TTransportException (state=08S01,code=0)&lt;BR /&gt;0: jdbc:hive2://abc:1&amp;gt; !connect jdbc:hive2://abc:10001/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=*****;principal=hive/_HOST@REALM&lt;BR /&gt;Connecting to jdbc:hive2://abc:10001/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=*****;principal=hive/_HOST@REALM&lt;BR /&gt;Connected to: Apache Hive (version 1.1.0-cdh5.15.1)&lt;BR /&gt;Driver: Hive JDBC (version 1.1.0-cdh5.15.1)&lt;BR /&gt;Transaction isolation: TRANSACTION_REPEATABLE_READ&lt;BR /&gt;1: jdbc:hive2://abc:1&amp;gt; show databases;&lt;BR /&gt;INFO : Compiling command(queryId=hive_20181119073535_1c5b4e65-5007-4629-99e6-ab45f32c4896): show databases&lt;BR /&gt;INFO : Semantic Analysis Completed&lt;BR /&gt;INFO : Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:database_name, type:string, comment:from deserializer)], properties:null)&lt;BR /&gt;INFO : Completed compiling command(queryId=hive_20181119073535_1c5b4e65-5007-4629-99e6-ab45f32c4896); Time taken: 0.757 seconds&lt;BR /&gt;INFO : Executing command(queryId=hive_20181119073535_1c5b4e65-5007-4629-99e6-ab45f32c4896): show databases&lt;BR /&gt;INFO : Starting task [Stage-0:DDL] in serial mode&lt;BR /&gt;INFO : Completed executing command(queryId=hive_20181119073535_1c5b4e65-5007-4629-99e6-ab45f32c4896); Time taken: 0.66 seconds&lt;BR /&gt;INFO : OK&lt;BR /&gt;+----------------+--+&lt;BR /&gt;| database_name |&lt;BR /&gt;+----------------+--+&lt;BR /&gt;| default |&lt;BR /&gt;| test1 |&lt;BR /&gt;| test |&lt;BR /&gt;+----------------+--+&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Scenario 2:&lt;/P&gt;&lt;P&gt;hiveserver2 instance stopped on server xyz&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Connecting from beeline from server abc, throws below error.&lt;/P&gt;&lt;P&gt;beeline&amp;gt; !connect jdbc:hive2://abc:10001/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=*****;principal=hive/_HOST@REALM&lt;BR /&gt;Connecting to jdbc:hive2://abc:10001/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=*****;principal=hive/_HOST@REALM&lt;BR /&gt;Unknown HS2 problem when communicating with Thrift server.&lt;BR /&gt;Error: Could not open client transport with JDBC Uri: jdbc:hive2://abc:10001/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=*****;principal=hive/_HOST@BDS-DR.UBS.COM: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative DNS name matching abc found. (state=08S01,code=0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Connecting from beeline from server xyz is successful, Below snap for the same.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;beeline&amp;gt; !connect jdbc:hive2://abc:10001/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=*****;principal=hive/_HOST@REALM&lt;BR /&gt;scan complete in 2ms&lt;BR /&gt;Connecting to jdbc:hive2://abc:10001/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=Cldkeystore1;principal=hive/_HOST@REALM&lt;BR /&gt;Connected to: Apache Hive (version 1.1.0-cdh5.15.1)&lt;BR /&gt;Driver: Hive JDBC (version 1.1.0-cdh5.15.1)&lt;BR /&gt;Transaction isolation: TRANSACTION_REPEATABLE_READ&lt;BR /&gt;0: jdbc:hive2://abc:1&amp;gt; show databases;&lt;BR /&gt;Unexpected end of file when reading from HS2 server. The root cause might be too many concurrent connections. Please ask the administrator to check the number of active connections, and adjust hive.server2.thrift.max.worker.threads if applicable.&lt;BR /&gt;Error: org.apache.thrift.transport.TTransportException (state=08S01,code=0)&lt;BR /&gt;0: jdbc:hive2://abc:1&amp;gt; !connect jdbc:hive2://abc:10001/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=*****;principal=hive/_HOST@REALM&lt;BR /&gt;Connecting to jdbc:hive2://abc:10001/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=*****;principal=hive/_HOST@REALM&lt;BR /&gt;Connected to: Apache Hive (version 1.1.0-cdh5.15.1)&lt;BR /&gt;Driver: Hive JDBC (version 1.1.0-cdh5.15.1)&lt;BR /&gt;Transaction isolation: TRANSACTION_REPEATABLE_READ&lt;BR /&gt;1: jdbc:hive2://abc:1&amp;gt; show databases;&lt;BR /&gt;INFO : Compiling command(queryId=hive_20181119073535_1c5b4e65-5007-4629-99e6-ab45f32c4896): show databases&lt;BR /&gt;INFO : Semantic Analysis Completed&lt;BR /&gt;INFO : Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:database_name, type:string, comment:from deserializer)], properties:null)&lt;BR /&gt;INFO : Completed compiling command(queryId=hive_20181119073535_1c5b4e65-5007-4629-99e6-ab45f32c4896); Time taken: 0.757 seconds&lt;BR /&gt;INFO : Executing command(queryId=hive_20181119073535_1c5b4e65-5007-4629-99e6-ab45f32c4896): show databases&lt;BR /&gt;INFO : Starting task [Stage-0:DDL] in serial mode&lt;BR /&gt;INFO : Completed executing command(queryId=hive_20181119073535_1c5b4e65-5007-4629-99e6-ab45f32c4896); Time taken: 0.66 seconds&lt;BR /&gt;INFO : OK&lt;BR /&gt;+----------------+--+&lt;BR /&gt;| database_name |&lt;BR /&gt;+----------------+--+&lt;BR /&gt;| default |&lt;BR /&gt;| test1 |&lt;BR /&gt;| test |&lt;BR /&gt;+----------------+--+&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Scenario 3:&lt;/P&gt;&lt;P&gt;hiveserver2 instance stopped on server abc&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Connecting from beeline from server abc, throws below error.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;beeline&amp;gt; !connect jdbc:hive2://abc:10001/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=*****;principal=hive/_HOST@REALM&lt;BR /&gt;Connecting to jdbc:hive2://abc:10001/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=*****;principal=hive/_HOST@REALM&lt;BR /&gt;Unknown HS2 problem when communicating with Thrift server.&lt;BR /&gt;Error: Could not open client transport with JDBC Uri: jdbc:hive2://abc:10001/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=*****;principal=hive/_HOST@BDS-DR.UBS.COM: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative DNS name matching abc found. (state=08S01,code=0)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Connecting from beeline from server xyz is failed, Below snap for the same. Request from haproxy seems not getting forwarded to xyzs server when abc is not available.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;beeline&amp;gt; !connect jdbc:hive2://a301-8883-0447.gdzd.ubs.net:10001/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=Cldkeystore1;principal=hive/_HOST@BDS-DR.UBS.COM&lt;BR /&gt;scan complete in 1ms&lt;BR /&gt;Connecting to jdbc:hive2://a301-8883-0447.gdzd.ubs.net:10001/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=Cldkeystore1;principal=hive/_HOST@BDS-DR.UBS.COM&lt;BR /&gt;Unknown HS2 problem when communicating with Thrift server.&lt;BR /&gt;Error: Could not open client transport with JDBC Uri: jdbc:hive2://a301-8883-0447.gdzd.ubs.net:10001/default;ssl=true;sslTrustStore=/app/bds/security/pki/cloudera_truststore.jks;sslTrustPassword=Cldkeystore1;principal=hive/_HOST@BDS-DR.UBS.COM: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake (state=08S01,code=0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly check for all above scenario and suggest.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;- VIjay M&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 06:52:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/82550#M33348</guid>
      <dc:creator>VijayM</dc:creator>
      <dc:date>2018-11-19T06:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: Hiveserver2 HA using haproxy load balancing</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/82552#M33349</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/4054"&gt;@bgooley&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did some more troubleshooting.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Updated alogrithm for load balance to roundrobin from source as mentioned below in haproxy configuration and started to get errors in hiveserver2 logs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;frontend hiveserver2_front&lt;BR /&gt;bind *:10001&lt;BR /&gt;option tcplog&lt;BR /&gt;mode tcp&lt;BR /&gt;default_backend hiveserver2&lt;/P&gt;&lt;P&gt;backend hiveserver2&lt;BR /&gt;mode tcp&lt;BR /&gt;balance roundrobin&lt;BR /&gt;server hs2_1 a301-8883-0447.gdzd.ubs.net:10000 check&lt;BR /&gt;server hs2_2 a301-8883-2675.gdzd.ubs.net:10000 check&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When tried to connect from beeline from any server my 2nd connection always to server xyz and connection getting failed and hiveserver2 logs of xyz server throws below error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2018-11-19 08:48:05,964 ERROR org.apache.thrift.server.TThreadPoolServer: [HiveServer2-Handler-Pool: Thread-44]: Error occurred during processing of message.&lt;BR /&gt;java.lang.RuntimeException: org.apache.thrift.transport.TTransportException: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown&lt;BR /&gt;at org.apache.thrift.transport.TSaslServerTransport$Factory.getTransport(TSaslServerTransport.java:219)&lt;BR /&gt;at org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge$Server$TUGIAssumingTransportFactory$1.run(HadoopThriftAuthBridge.java:794)&lt;BR /&gt;at org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge$Server$TUGIAssumingTransportFactory$1.run(HadoopThriftAuthBridge.java:791)&lt;BR /&gt;at java.security.AccessController.doPrivileged(Native Method)&lt;BR /&gt;at javax.security.auth.Subject.doAs(Subject.java:360)&lt;BR /&gt;at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1904)&lt;BR /&gt;at org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge$Server$TUGIAssumingTransportFactory.getTransport(HadoopThriftAuthBridge.java:791)&lt;BR /&gt;at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:269)&lt;BR /&gt;at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)&lt;BR /&gt;at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)&lt;BR /&gt;at java.lang.Thread.run(Thread.java:748)&lt;BR /&gt;Caused by: org.apache.thrift.transport.TTransportException: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown&lt;BR /&gt;at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:129)&lt;BR /&gt;at org.apache.thrift.transport.TTransport.readAll(TTransport.java:86)&lt;BR /&gt;at org.apache.thrift.transport.TSaslTransport.receiveSaslMessage(TSaslTransport.java:178)&lt;BR /&gt;at org.apache.thrift.transport.TSaslServerTransport.handleSaslStartMessage(TSaslServerTransport.java:125)&lt;BR /&gt;at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:271)&lt;BR /&gt;at org.apache.thrift.transport.TSaslServerTransport.open(TSaslServerTransport.java:41)&lt;BR /&gt;at org.apache.thrift.transport.TSaslServerTransport$Factory.getTransport(TSaslServerTransport.java:216)&lt;BR /&gt;... 10 more&lt;BR /&gt;Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown&lt;BR /&gt;at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)&lt;BR /&gt;at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)&lt;BR /&gt;at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:2033)&lt;BR /&gt;at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1135)&lt;BR /&gt;at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1385)&lt;BR /&gt;at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:938)&lt;BR /&gt;at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)&lt;BR /&gt;at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)&lt;BR /&gt;at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)&lt;BR /&gt;at java.io.BufferedInputStream.read(BufferedInputStream.java:345)&lt;BR /&gt;at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:127)&lt;BR /&gt;... 16 more&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly suggest ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Vijay M&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 07:51:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hiveserver2-HA-using-haproxy-load-balancing/m-p/82552#M33349</guid>
      <dc:creator>VijayM</dc:creator>
      <dc:date>2018-11-19T07:51:07Z</dc:date>
    </item>
  </channel>
</rss>

