<?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: hiveserver 2 zookeeper discovery connection timeout configuration in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hiveserver-2-zookeeper-discovery-connection-timeout/m-p/104475#M37998</link>
    <description>&lt;P&gt;while I could not find configuration to control the timeout, we trouble shooted the issue on why zookeeper was taking more 60secs and it turns that zookeeper was rate limiting the connection. Here is a good article which explains on the concepts.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/articles/51191/understanding-apache-zookeeper-connection-rate-lim.html" target="_blank"&gt;https://community.hortonworks.com/articles/51191/understanding-apache-zookeeper-connection-rate-lim.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;We ended up figuring out the rogue app which was causing the connection leak to ZK.&lt;/P&gt;</description>
    <pubDate>Wed, 17 Aug 2016 13:54:15 GMT</pubDate>
    <dc:creator>sgowda</dc:creator>
    <dc:date>2016-08-17T13:54:15Z</dc:date>
    <item>
      <title>hiveserver 2 zookeeper discovery connection timeout configuration</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hiveserver-2-zookeeper-discovery-connection-timeout/m-p/104474#M37997</link>
      <description>&lt;P&gt;we are running an oozie hive2 action which discovers hiveserver2 via zookeeper. Below is the snippet of hive2 &lt;/P&gt;&lt;PRE&gt;&amp;lt;hive2 xmlns="uri:oozie:hive2-action:0.1"&amp;gt;      &amp;lt;prepare&amp;gt;        &amp;lt;delete path="${WF_OUTPUT_PATH}-${wf:id()}/_query1"/&amp;gt;      &amp;lt;/prepare&amp;gt;      &amp;lt;jdbc-url&amp;gt;jdbc:hive2://zookeeper:2181/table;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2&amp;lt;/jdbc-url&amp;gt;      &amp;lt;password&amp;gt;dummy&amp;lt;/password&amp;gt;      &amp;lt;script&amp;gt;queries/_query1.sql&amp;lt;/script&amp;gt;      &amp;lt;param&amp;gt;outputDir=${WF_OUTPUT_PATH}-${wf:id()}/_query1&amp;lt;/param&amp;gt;      &amp;lt;argument&amp;gt;--hiveconf&amp;lt;/argument&amp;gt;      &amp;lt;argument&amp;gt;tez.queue.name=${HIVE_QUEUE}&amp;lt;/argument&amp;gt;      &amp;lt;argument&amp;gt;--hiveconf&amp;lt;/argument&amp;gt;      &amp;lt;argument&amp;gt;hive.query.name=tpch_query1&amp;lt;/argument&amp;gt;      &amp;lt;argument&amp;gt;-i&amp;lt;/argument&amp;gt;      &amp;lt;argument&amp;gt;testbench.settings&amp;lt;/argument&amp;gt;      &amp;lt;file&amp;gt;testbench.settings&amp;lt;/file&amp;gt;    &amp;lt;/hive2&amp;gt;&lt;/PRE&gt;&lt;P&gt;The MR job which runs the hive query via beeline is failing because of connection timeout to zookeeper.&lt;/P&gt;&lt;PRE&gt;
org.apache.curator.CuratorConnectionLossException: KeeperErrorCode = ConnectionLoss
	at org.apache.curator.ConnectionState.checkTimeouts(ConnectionState.java:198)
	at org.apache.curator.ConnectionState.getZooKeeper(ConnectionState.java:88)
	at org.apache.curator.CuratorZookeeperClient.getZooKeeper(CuratorZookeeperClient.java:115)
	at org.apache.curator.framework.imps.CuratorFrameworkImpl.getZooKeeper(CuratorFrameworkImpl.java:474)
	at org.apache.curator.framework.imps.GetChildrenBuilderImpl$3.call(GetChildrenBuilderImpl.java:214)
	at org.apache.curator.framework.imps.GetChildrenBuilderImpl$3.call(GetChildrenBuilderImpl.java:203)
	at org.apache.curator.RetryLoop.callWithRetry(RetryLoop.java:107)
	at org.apache.curator.framework.imps.GetChildrenBuilderImpl.pathInForeground(GetChildrenBuilderImpl.java:199)
	at org.apache.curator.framework.imps.GetChildrenBuilderImpl.forPath(GetChildrenBuilderImpl.java:191)
	at org.apache.curator.framework.imps.GetChildrenBuilderImpl.forPath(GetChildrenBuilderImpl.java:38)
	at org.apache.hive.jdbc.ZooKeeperHiveClientHelper.configureConnParams(ZooKeeperHiveClientHelper.java:63)
	at org.apache.hive.jdbc.Utils.configureConnParams(Utils.java:509)
	at org.apache.hive.jdbc.Utils.parseURL(Utils.java:429)
	at org.apache.hive.jdbc.HiveConnection.&amp;lt;init&amp;gt;(HiveConnection.java:134)
	at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105)
	at java.sql.DriverManager.getConnection(DriverManager.java:664)
	at java.sql.DriverManager.getConnection(DriverManager.java:208)
	at org.apache.hive.beeline.DatabaseConnection.connect(DatabaseConnection.java:146)
	at org.apache.hive.beeline.DatabaseConnection.getConnection(DatabaseConnection.java:211)
	at org.apache.hive.beeline.Commands.close(Commands.java:1002)
	at org.apache.hive.beeline.Commands.closeall(Commands.java:984)
	at org.apache.hive.beeline.BeeLine.close(BeeLine.java:845)
	at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:792)
	at org.apache.oozie.action.hadoop.Hive2Main.runBeeline(Hive2Main.java:266)
	at org.apache.oozie.action.hadoop.Hive2Main.run(Hive2Main.java:240)
	at org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:51)
	at org.apache.oozie.action.hadoop.Hive2Main.main(Hive2Main.java:58)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:242)
	at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)
	at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:453)
	at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343)
	at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:168)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:422)
	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1724)
	at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:162)




2016-08-16 08:04:21,196 INFO [main] org.apache.zookeeper.ZooKeeper: Initiating client connection, connectString=zookeeper:2181 sessionTimeout=60000 watcher=org.apache.curator.ConnectionState@61d01788
2016-08-16 08:04:21,196 INFO [main-EventThread] org.apache.zookeeper.ClientCnxn: EventThread shut down
2016-08-16 08:04:21,199 INFO [main-SendThread(XXXX:2181)] org.apache.zookeeper.ClientCnxn: Opening socket connection to server XXXXX:2181. Will not attempt to authenticate using SASL (unknown error)
2016-08-16 08:04:21,199 INFO [main-SendThread(XXXX:2181)] org.apache.zookeeper.ClientCnxn: Socket connection established to XXXXX:2181, initiating session
2016-08-16 08:04:21,199 INFO [main-SendThread(XXXX:2181)] org.apache.zookeeper.ClientCnxn: Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
2016-08-16 08:04:21,745 INFO [main] org.apache.zookeeper.ZooKeeper: Session: 0x0 closed
2016-08-16 08:04:21,745 INFO [main-EventThread] org.apache.zookeeper.ClientCnxn: EventThread shut down
&lt;/PRE&gt;&lt;P&gt;Is there any way to increase the timeout ? what would be the configuration for this.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2016 17:24:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hiveserver-2-zookeeper-discovery-connection-timeout/m-p/104474#M37997</guid>
      <dc:creator>sgowda</dc:creator>
      <dc:date>2016-08-16T17:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: hiveserver 2 zookeeper discovery connection timeout configuration</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hiveserver-2-zookeeper-discovery-connection-timeout/m-p/104475#M37998</link>
      <description>&lt;P&gt;while I could not find configuration to control the timeout, we trouble shooted the issue on why zookeeper was taking more 60secs and it turns that zookeeper was rate limiting the connection. Here is a good article which explains on the concepts.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/articles/51191/understanding-apache-zookeeper-connection-rate-lim.html" target="_blank"&gt;https://community.hortonworks.com/articles/51191/understanding-apache-zookeeper-connection-rate-lim.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;We ended up figuring out the rogue app which was causing the connection leak to ZK.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2016 13:54:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hiveserver-2-zookeeper-discovery-connection-timeout/m-p/104475#M37998</guid>
      <dc:creator>sgowda</dc:creator>
      <dc:date>2016-08-17T13:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: hiveserver 2 zookeeper discovery connection timeout configuration</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hiveserver-2-zookeeper-discovery-connection-timeout/m-p/104476#M37999</link>
      <description>&lt;P&gt;Increasing the '&lt;STRONG&gt;tickTime' &lt;/STRONG&gt;value&lt;STRONG&gt; &lt;/STRONG&gt;of&lt;STRONG&gt; &lt;/STRONG&gt;zk helps to reduce ConnectionLoss due to delay/missing of heartbeats, basically it increases the session timeout.&lt;/P&gt;&lt;P&gt;the basic time unit in milliseconds used by ZooKeeper. It is used to do heartbeats and the minimum session timeout will be twice the tickTime.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2016 20:38:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hiveserver-2-zookeeper-discovery-connection-timeout/m-p/104476#M37999</guid>
      <dc:creator>shiremath</dc:creator>
      <dc:date>2016-08-17T20:38:54Z</dc:date>
    </item>
  </channel>
</rss>

