- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
[Cloudera][HiveJDBCDriver](500593) Communication link failure. Failed to connect to server. Reason: Socket is closed by peer.
- Labels:
-
Apache Hive
Created 09-04-2024 04:16 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi community cloudera,
i'm experiencing strange hive drive behaviour:
my app consequently performing `select` queries on multiple tables successfully. But at some point it gets an error:
Created 09-05-2024 01:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@denysobukhov, Welcome to our community! To help you get the best possible answer, I have tagged in our HIve experts @asish @smruti @tjangid @ggangadharan who may be able to assist you further.
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.
Regards,
Vidya Sargur,Community Manager
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:
Created 09-06-2024 12:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
the query is
Created 09-05-2024 04:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi @denysobukhov Is your cluster SSL and LDAP enabled?
Are you able to connect from beeline?
Please review https://community.cloudera.com/t5/Community-Articles/How-to-Connect-to-Hiveserver2-Using-Cloudera-JD... and change it as per the usage.
Created 09-09-2024 05:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
it's customers server and I don't have access to shell
Created 09-06-2024 11:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Confirm the JDBC version you are trying to connect? Try upgrading to the latest version https://www.cloudera.com/downloads/connectors/hive/jdbc/2-6-25.html
If the above didn't help please attach the TRACE level driver logs. Refer https://docs.cloudera.com/documentation/other/connectors/hive-jdbc/2-6-25/Cloudera-JDBC-Connector-fo... page# 103.
Created 09-09-2024 05:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i'm using
HiveJDBC42 2.6.25.1033
i'll try TRACE log level
Created 09-11-2024 06:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@denysobukhov
Based on error stack trace which you have shared looks like the connection is getting closed before fetching the results for the query.
Is there a delay between submitting the query and then receiving the error? If yes, what is the delay exactly.
During the time of error appears,have you observe any alerts from HS2 ?
Are you able to connect to HS2 from beeline without any issue during the time of failure?
Is hive2host.loc is the loadbalancer URL?
We might require the JDBC TRACE LOGS and HS2 logs to determine the cause of failure.
Thank You.
Created 12-15-2024 08:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can't confirm that the issue is related to Hive/Client itself or their configuration. I received indirect confirmations that HMS were restarted during my client app was accessing it.
Created 12-17-2024 10:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@denysobukhov
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.
1. Address Server-Side Resource or Timeout Issues
Increase HiveServer2 Idle Timeout
By default, HiveServer2 may close idle connections after a certain period. Increase this timeout:
- Update the HiveServer2 config:
- hive.server2.idle.session.timeout (default: 600000 ms / 10 minutes).
- Set it to a larger value, e.g., 3600000 (1 hour).
- hive.server2.idle.operation.timeout (default: 5 minutes for operations).
- Increase to match your app's use case. SpoilerSET hive.server2.idle.session.timeout=3600000;
SET hive.server2.idle.operation.timeout=3600000;Adjust Thread Pool Size
- If HiveServer2 runs out of threads to handle requests, it can drop connections:
- Increase hive.server2.threads to a higher value in HiveServer2 configurations.
- Restart HiveServer2 after changes.
SpoilerHappy hadoopingjstack -l <HiveServere2_ProccessId> | grep ".Thread.Stat" | wc -l
- If HiveServer2 runs out of threads to handle requests, it can drop connections:
