<?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: hive + many hive process was open on namenode machine and take a lot memory in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/hive-many-hive-process-was-open-on-namenode-machine-and-take/m-p/180180#M142426</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you see that there are many "beeline" processes are being created by ambari or ambari-qa user then it might be the Hive Alert checker scripts which might be leaving opened Beeline connections ... which might be causing the issue.&lt;/P&gt;&lt;P&gt;Please see the script [1]&lt;/P&gt;&lt;P&gt;On Ambari Server host&lt;/P&gt;&lt;PRE&gt;/var/lib/ambari-server/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_thrift_port.py&lt;/PRE&gt;&lt;P&gt;On Agent hosts&lt;/P&gt;&lt;PRE&gt;/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_thrift_port.py&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;May be for some time you can try disabling the "HiveServer 2 Process" Alert from Ambari UI  and then kill those beeling process manually using command line to see if it fixes the issue.&lt;/P&gt;&lt;P&gt;Ideally there were some old issues reported like that but those were already supposed to be fixed  ambari 2.5.0 onwards like:    &lt;A href="https://issues.apache.org/jira/browse/AMBARI-18286" target="_blank"&gt;https://issues.apache.org/jira/browse/AMBARI-18286&lt;/A&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;[1] &lt;A href="https://github.com/apache/ambari/blob/release-2.6.1/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_thrift_port.py#L275" target="_blank"&gt;https://github.com/apache/ambari/blob/release-2.6.1/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_thrift_port.py#L275&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 09 Jul 2018 14:00:27 GMT</pubDate>
    <dc:creator>jsensharma</dc:creator>
    <dc:date>2018-07-09T14:00:27Z</dc:date>
    <item>
      <title>hive + many hive process was open on namenode machine and take a lot memory</title>
      <link>https://community.cloudera.com/t5/Support-Questions/hive-many-hive-process-was-open-on-namenode-machine-and-take/m-p/180177#M142423</link>
      <description>&lt;P&gt;we have ambari cluster version 2.6.0.x&lt;/P&gt;&lt;P&gt;we noitce that free memory on master01 machine is 0 ,&lt;/P&gt;&lt;P&gt;and that because many of the following process ( from  ps -ef | grep java )&lt;/P&gt;&lt;PRE&gt;ambari-+ 65369 65322  0 Jul06 ?        00:01:52 /usr/jdk64/jdk1.8.0_112/bin/java -Xmx1024m -Dhdp.version=2.6.0.3-8 -Djava.net.preferIPv4Stack=true -Dhdvar/log/hadoop/ambari-qa -Dhadoop.log.file=hadoop.log -Dhadoop.home.dir=/usr/hdp/2.6.0.3-8/hadoop -Dhadoop.id.str=ambari-qa -Dhadoop.root.logger=INFO,c.6.0.3-8/hadoop/lib/native/Linux-amd64-64:/usr/hdp/2.6.0.3-8/hadoop/lib/native -Dhadoop.policy.file=hadoop-policy.xml -Djava.net.preferIPv4Stack=true -.config.file=/usr/hdp/2.6.0.3-8/hive/conf/parquet-logging.properties -Dlog4j.configuration=beeline-log4j.properties -Dhadoop.security.logger=INFO,NullA/usr/hdp/2.6.0.3-8/hive/lib/hive-beeline-1.2.1000.2.6.0.3-8.jar org.apache.hive.beeline.BeeLine -u jdbc:hive2://master01.sys748.com:10000/;transportMo&lt;/PRE&gt;&lt;P&gt;any idea why all this process ( around 350 process was opened ? ) , and take all memory on master01 machine&lt;/P&gt;&lt;PRE&gt;[root@master01 ~]# ps -ef | grep java | wc -l
359


other way to show the process :

 ps -ef |   sed 's/-D[^ ]*//g;s/-X[^ ]*//g;s#^.*/bin/java##g;s/[^ ]*.jar//g;s/^[ ]*//g' |more



ambari-+ 50648 50646  0 Jul06 ?        00:00:00 -bash -c export  PATH='/usr/sbin:/sbin:/usr/lib/ambari-server/*:/usr/sbin:/sbin:/usr/lib/ambari-server/
*:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/var/lib/ambari-agent:/var/lib/ambari-agent:/bin/:/usr/bin/:/usr/lib/hive/bin
/:/usr/sbin/' ; ! beeline -u 'jdbc:hive2://master01.sys748.com:10000/;transportMode=binary'  -e '' 2&amp;gt;&amp;amp;1| awk '{print}'|grep -i -e 'Connection refused'
 -e 'Invalid URL'



&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Jul 2018 03:09:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/hive-many-hive-process-was-open-on-namenode-machine-and-take/m-p/180177#M142423</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-07-09T03:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: hive + many hive process was open on namenode machine and take a lot memory</title>
      <link>https://community.cloudera.com/t5/Support-Questions/hive-many-hive-process-was-open-on-namenode-machine-and-take/m-p/180178#M142424</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt;! &lt;BR /&gt;Could you share with us the output of these commands? &lt;/P&gt;&lt;PRE&gt;jstack -l &amp;lt;PID_HS2&amp;gt;&lt;BR /&gt;pstree -p hive&lt;/PRE&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jul 2018 11:51:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/hive-many-hive-process-was-open-on-namenode-machine-and-take/m-p/180178#M142424</guid>
      <dc:creator>vmurakami</dc:creator>
      <dc:date>2018-07-09T11:51:07Z</dc:date>
    </item>
    <item>
      <title>Re: hive + many hive process was open on namenode machine and take a lot memory</title>
      <link>https://community.cloudera.com/t5/Support-Questions/hive-many-hive-process-was-open-on-namenode-machine-and-take/m-p/180179#M142425</link>
      <description>&lt;P&gt;not have the jstack command on my linux machine , should I download this cli from redhat repo?&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jul 2018 13:18:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/hive-many-hive-process-was-open-on-namenode-machine-and-take/m-p/180179#M142425</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-07-09T13:18:23Z</dc:date>
    </item>
    <item>
      <title>Re: hive + many hive process was open on namenode machine and take a lot memory</title>
      <link>https://community.cloudera.com/t5/Support-Questions/hive-many-hive-process-was-open-on-namenode-machine-and-take/m-p/180180#M142426</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you see that there are many "beeline" processes are being created by ambari or ambari-qa user then it might be the Hive Alert checker scripts which might be leaving opened Beeline connections ... which might be causing the issue.&lt;/P&gt;&lt;P&gt;Please see the script [1]&lt;/P&gt;&lt;P&gt;On Ambari Server host&lt;/P&gt;&lt;PRE&gt;/var/lib/ambari-server/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_thrift_port.py&lt;/PRE&gt;&lt;P&gt;On Agent hosts&lt;/P&gt;&lt;PRE&gt;/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_thrift_port.py&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;May be for some time you can try disabling the "HiveServer 2 Process" Alert from Ambari UI  and then kill those beeling process manually using command line to see if it fixes the issue.&lt;/P&gt;&lt;P&gt;Ideally there were some old issues reported like that but those were already supposed to be fixed  ambari 2.5.0 onwards like:    &lt;A href="https://issues.apache.org/jira/browse/AMBARI-18286" target="_blank"&gt;https://issues.apache.org/jira/browse/AMBARI-18286&lt;/A&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;[1] &lt;A href="https://github.com/apache/ambari/blob/release-2.6.1/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_thrift_port.py#L275" target="_blank"&gt;https://github.com/apache/ambari/blob/release-2.6.1/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_thrift_port.py#L275&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jul 2018 14:00:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/hive-many-hive-process-was-open-on-namenode-machine-and-take/m-p/180180#M142426</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-07-09T14:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: hive + many hive process was open on namenode machine and take a lot memory</title>
      <link>https://community.cloudera.com/t5/Support-Questions/hive-many-hive-process-was-open-on-namenode-machine-and-take/m-p/180181#M142427</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Additionally please check if there is any issue in connecting to HiveSerevr2 using Beeline manually?    This will give us some idea like how much time does the beeline connection takes.   If it takes more than default hardcoded 30 secodns then please try to increase the timeout  to a higher value like 60 in the same script:&lt;/P&gt;&lt;PRE&gt;# grep 'timeout=30' /var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_thrift_port.py

# grep 'timeout=30' /var/lib/ambari-server/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_thrift_port.py&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jul 2018 14:04:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/hive-many-hive-process-was-open-on-namenode-machine-and-take/m-p/180181#M142427</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-07-09T14:04:04Z</dc:date>
    </item>
  </channel>
</rss>

