<?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: [Cloudera][HiveJDBCDriver](500593) Communication link failure. Failed to connect to server. Reason: Socket is closed by peer. in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Cloudera-HiveJDBCDriver-500593-Communication-link-failure/m-p/398897#M250332</link>
    <description>&lt;P&gt;I can't confirm that the issue is related to Hive/Client itself or their configuration. I received&amp;nbsp;&lt;SPAN&gt;indirect confirmations that HMS were restarted during my client app was accessing it.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 15 Dec 2024 16:28:21 GMT</pubDate>
    <dc:creator>denysobukhov</dc:creator>
    <dc:date>2024-12-15T16:28:21Z</dc:date>
    <item>
      <title>[Cloudera][HiveJDBCDriver](500593) Communication link failure. Failed to connect to server. Reason: Socket is closed by peer.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Cloudera-HiveJDBCDriver-500593-Communication-link-failure/m-p/393079#M248330</link>
      <description>&lt;P&gt;&lt;SPAN&gt;hi community cloudera,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;i'm experiencing strange hive drive behaviour:&lt;/P&gt;&lt;P&gt;my app consequently performing `select` queries on multiple tables successfully. But at some point it gets an error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT face="andale mono,times"&gt;&lt;SPAN&gt;java.sql.SQLException&lt;/SPAN&gt;&lt;SPAN&gt;: [Cloudera][HiveJDBCDriver](&lt;/SPAN&gt;&lt;SPAN&gt;500593&lt;/SPAN&gt;&lt;SPAN&gt;) Communication link &lt;/SPAN&gt;&lt;SPAN&gt;failure&lt;/SPAN&gt;&lt;SPAN&gt;. Failed to connect to &lt;/SPAN&gt;&lt;SPAN&gt;server&lt;/SPAN&gt;&lt;SPAN&gt;. Reason: Socket is closed by peer. FetchResults for query &lt;/SPAN&gt;&lt;SPAN&gt;"SELECT `iq***"&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;and when the app retries to reconnect (&lt;FONT face="andale mono,times"&gt;because java.sql.Connection.isValid() == false&lt;/FONT&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;it constantly gets&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT face="andale mono,times"&gt;&lt;SPAN&gt;[Cloudera][JDBC](&lt;/SPAN&gt;&lt;SPAN&gt;10060&lt;/SPAN&gt;&lt;SPAN&gt;) Connection has been closed.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="andale mono,times"&gt;&lt;SPAN&gt;java.sql.SQLNonTransientConnectionException&lt;/SPAN&gt;&lt;SPAN&gt;: [Cloudera][JDBC](&lt;/SPAN&gt;&lt;SPAN&gt;10060&lt;/SPAN&gt;&lt;SPAN&gt;) Connection has been closed.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="andale mono,times"&gt;&lt;SPAN&gt;at &lt;/SPAN&gt;&lt;SPAN&gt;com.cloudera.hiveserver2.exceptions.ExceptionConverter.toSQLException&lt;/SPAN&gt;&lt;SPAN&gt;(Unknown Source)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="andale mono,times"&gt;&lt;SPAN&gt;at com.cloudera.hiveserver2.jdbc.common.SConnection.closeConnection(Unknown Source)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="andale mono,times"&gt;&lt;SPAN&gt;at com.cloudera.hiveserver2.jdbc.common.SConnection.abortInternal(Unknown Source)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="andale mono,times"&gt;&lt;SPAN&gt;at com.cloudera.hiveserver2.jdbc.common.SConnection.close(Unknown Source)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Since connection string is&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT face="andale mono,times"&gt;&lt;SPAN&gt;jdbc:hive2://hive2host.loc:10000;AuthMech=3&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;I don't have access to Hive logs, so I can guess only.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;Could it be relates to LDAP server issues? Or it is by some other reason?&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 04 Sep 2024 23:16:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Cloudera-HiveJDBCDriver-500593-Communication-link-failure/m-p/393079#M248330</guid>
      <dc:creator>denysobukhov</dc:creator>
      <dc:date>2024-09-04T23:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: [Cloudera][HiveJDBCDriver](500593) Communication link failure. Failed to connect to server. Reason: Socket is closed by peer.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Cloudera-HiveJDBCDriver-500593-Communication-link-failure/m-p/393088#M248335</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/115860"&gt;@denysobukhov&lt;/a&gt;,&amp;nbsp;Welcome to our community! To help you get the best possible answer, I have tagged in our HIve experts&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/71090"&gt;@asish&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/82698"&gt;@smruti&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/31523"&gt;@tjangid&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/92016"&gt;@ggangadharan&lt;/a&gt;&amp;nbsp;&amp;nbsp;who may be able to assist you further.&lt;BR /&gt;&lt;BR /&gt;Please feel free to provide any additional information or details about your query, and we hope that you will find a satisfactory solution to your question.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 08:25:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Cloudera-HiveJDBCDriver-500593-Communication-link-failure/m-p/393088#M248335</guid>
      <dc:creator>VidyaSargur</dc:creator>
      <dc:date>2024-09-05T08:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: [Cloudera][HiveJDBCDriver](500593) Communication link failure. Failed to connect to server. Reason: Socket is closed by peer.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Cloudera-HiveJDBCDriver-500593-Communication-link-failure/m-p/393097#M248337</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/115860"&gt;@denysobukhov&lt;/a&gt;&amp;nbsp; Is your cluster SSL and LDAP enabled?&lt;/P&gt;&lt;P&gt;Are you able to connect from beeline?&lt;/P&gt;&lt;P&gt;Please review&amp;nbsp;&lt;A href="https://community.cloudera.com/t5/Community-Articles/How-to-Connect-to-Hiveserver2-Using-Cloudera-JDBC-driver/ta-p/376336" target="_blank"&gt;https://community.cloudera.com/t5/Community-Articles/How-to-Connect-to-Hiveserver2-Using-Cloudera-JDBC-driver/ta-p/376336&lt;/A&gt;&amp;nbsp;and change it as per the usage.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 11:27:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Cloudera-HiveJDBCDriver-500593-Communication-link-failure/m-p/393097#M248337</guid>
      <dc:creator>asish</dc:creator>
      <dc:date>2024-09-05T11:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: [Cloudera][HiveJDBCDriver](500593) Communication link failure. Failed to connect to server. Reason: Socket is closed by peer.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Cloudera-HiveJDBCDriver-500593-Communication-link-failure/m-p/393136#M248348</link>
      <description>&lt;P&gt;the query is&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT face="andale mono,times"&gt;&lt;SPAN&gt;SELECT `iqrowkey`, `niu1`, `nif1`, `nombre1`, `niu2`, `nif2`, `nombre2`, `conyuge`, `exconyuge`, `ascendiente`, `descendiente`, `&lt;/SPAN&gt;&lt;SPAN&gt;xd003&lt;/SPAN&gt;&lt;SPAN&gt;`, `xfsinergi`, `&lt;/SPAN&gt;&lt;SPAN&gt;xd001&lt;/SPAN&gt;&lt;SPAN&gt;`, `&lt;/SPAN&gt;&lt;SPAN&gt;xd0011&lt;/SPAN&gt;&lt;SPAN&gt;` FROM `rstg_pro`.`rstg`&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 06 Sep 2024 07:55:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Cloudera-HiveJDBCDriver-500593-Communication-link-failure/m-p/393136#M248348</guid>
      <dc:creator>denysobukhov</dc:creator>
      <dc:date>2024-09-06T07:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: [Cloudera][HiveJDBCDriver](500593) Communication link failure. Failed to connect to server. Reason: Socket is closed by peer.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Cloudera-HiveJDBCDriver-500593-Communication-link-failure/m-p/393147#M248357</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/115860"&gt;@denysobukhov&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Confirm the JDBC version you are trying to connect? Try upgrading to the latest version&amp;nbsp;&lt;A href="https://www.cloudera.com/downloads/connectors/hive/jdbc/2-6-25.html" target="_blank"&gt;https://www.cloudera.com/downloads/connectors/hive/jdbc/2-6-25.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the above didn't help please attach the TRACE level driver logs. Refer&amp;nbsp;&lt;A href="https://docs.cloudera.com/documentation/other/connectors/hive-jdbc/2-6-25/Cloudera-JDBC-Connector-for-Apache-Hive-Install-Guide.pdf" target="_blank"&gt;https://docs.cloudera.com/documentation/other/connectors/hive-jdbc/2-6-25/Cloudera-JDBC-Connector-for-Apache-Hive-Install-Guide.pdf&lt;/A&gt;&amp;nbsp;page# 103.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2024 18:52:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Cloudera-HiveJDBCDriver-500593-Communication-link-failure/m-p/393147#M248357</guid>
      <dc:creator>ajay_riddler</dc:creator>
      <dc:date>2024-09-06T18:52:58Z</dc:date>
    </item>
    <item>
      <title>Re: [Cloudera][HiveJDBCDriver](500593) Communication link failure. Failed to connect to server. Reason: Socket is closed by peer.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Cloudera-HiveJDBCDriver-500593-Communication-link-failure/m-p/393225#M248381</link>
      <description>&lt;P&gt;it's customers server and I don't have access to shell&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 12:49:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Cloudera-HiveJDBCDriver-500593-Communication-link-failure/m-p/393225#M248381</guid>
      <dc:creator>denysobukhov</dc:creator>
      <dc:date>2024-09-09T12:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: [Cloudera][HiveJDBCDriver](500593) Communication link failure. Failed to connect to server. Reason: Socket is closed by peer.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Cloudera-HiveJDBCDriver-500593-Communication-link-failure/m-p/393226#M248382</link>
      <description>&lt;P&gt;i'm using&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;HiveJDBC42 2.6.25.1033&lt;/PRE&gt;&lt;P&gt;i'll try TRACE log level&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 09 Sep 2024 12:52:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Cloudera-HiveJDBCDriver-500593-Communication-link-failure/m-p/393226#M248382</guid>
      <dc:creator>denysobukhov</dc:creator>
      <dc:date>2024-09-09T12:52:23Z</dc:date>
    </item>
    <item>
      <title>Re: [Cloudera][HiveJDBCDriver](500593) Communication link failure. Failed to connect to server. Reason: Socket is closed by peer.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Cloudera-HiveJDBCDriver-500593-Communication-link-failure/m-p/393376#M248430</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/115860"&gt;@denysobukhov&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Based on error stack trace which you have shared looks like the connection is getting closed before fetching the results for the query.&lt;BR /&gt;Is there a delay between submitting the query and then receiving the error? If yes, what is the delay exactly.&lt;BR /&gt;During the time of error appears,have you observe any alerts from HS2 ?&lt;BR /&gt;Are you able to&amp;nbsp; connect to HS2 from beeline without any issue during the time of&amp;nbsp; failure?&lt;BR /&gt;Is hive2host.loc is the loadbalancer URL?&lt;BR /&gt;We might require the JDBC TRACE LOGS and HS2 logs to determine the cause&amp;nbsp; of failure.&lt;BR /&gt;&lt;BR /&gt;Thank You.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2024 13:07:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Cloudera-HiveJDBCDriver-500593-Communication-link-failure/m-p/393376#M248430</guid>
      <dc:creator>Mounika_Reddy</dc:creator>
      <dc:date>2024-09-11T13:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: [Cloudera][HiveJDBCDriver](500593) Communication link failure. Failed to connect to server. Reason: Socket is closed by peer.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Cloudera-HiveJDBCDriver-500593-Communication-link-failure/m-p/398897#M250332</link>
      <description>&lt;P&gt;I can't confirm that the issue is related to Hive/Client itself or their configuration. I received&amp;nbsp;&lt;SPAN&gt;indirect confirmations that HMS were restarted during my client app was accessing it.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Dec 2024 16:28:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Cloudera-HiveJDBCDriver-500593-Communication-link-failure/m-p/398897#M250332</guid>
      <dc:creator>denysobukhov</dc:creator>
      <dc:date>2024-12-15T16:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: [Cloudera][HiveJDBCDriver](500593) Communication link failure. Failed to connect to server. Reason: Socket is closed by peer.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Cloudera-HiveJDBCDriver-500593-Communication-link-failure/m-p/398990#M250356</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/115860"&gt;@denysobukhov&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;If this issue hasn't been resolved I am suspecting the HS2 idle Timeout and Thread pool size. Can you please do the below and share the out come.&lt;BR /&gt;&lt;STRONG&gt;1. Address Server-Side Resource or Timeout Issues&lt;/STRONG&gt;&lt;/P&gt;&lt;H5&gt;&lt;STRONG&gt;Increase HiveServer2 Idle Timeout&lt;/STRONG&gt;&lt;/H5&gt;&lt;P&gt;By default, HiveServer2 may close idle connections after a certain period. Increase this timeout:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Update the &lt;STRONG&gt;HiveServer2 config&lt;/STRONG&gt;:&lt;UL&gt;&lt;LI&gt;hive.server2.idle.session.timeout (default: 600000 ms / 10 minutes).&lt;/LI&gt;&lt;LI&gt;Set it to a larger value, e.g., 3600000 (1 hour).&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;hive.server2.idle.operation.timeout (default: 5 minutes for operations).&lt;/LI&gt;&lt;LI&gt;Increase to match your app's use case. &lt;LI-SPOILER&gt;SET hive.server2.idle.session.timeout=3600000;&lt;BR /&gt;SET hive.server2.idle.operation.timeout=3600000;&lt;/LI-SPOILER&gt;&lt;H5&gt;&lt;STRONG&gt;Adjust Thread Pool Size&lt;/STRONG&gt;&lt;/H5&gt;&lt;UL&gt;&lt;LI&gt;If HiveServer2 runs out of threads to handle requests, it can drop connections:&lt;UL&gt;&lt;LI&gt;Increase hive.server2.threads to a higher value in HiveServer2 configurations.&lt;/LI&gt;&lt;LI&gt;Restart HiveServer2 after changes.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;First check the default&amp;nbsp;&lt;SPAN&gt;hive.server2.thrift.max.worker.threads&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;LI-SPOILER&gt;&lt;PRE&gt;jstack -l &amp;lt;HiveServere2_ProccessId&amp;gt; | grep  ".Thread.Stat" | wc -l&lt;/PRE&gt;&lt;/LI-SPOILER&gt;Happy hadooping&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;/UL&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;&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;&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;&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;</description>
      <pubDate>Tue, 17 Dec 2024 18:31:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Cloudera-HiveJDBCDriver-500593-Communication-link-failure/m-p/398990#M250356</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2024-12-17T18:31:41Z</dc:date>
    </item>
  </channel>
</rss>

