current position:Home>hive | o.a.thrift. transport. TTransportException: java. net. SocketTimeoutException: Read timed out

hive | o.a.thrift. transport. TTransportException: java. net. SocketTimeoutException: Read timed out

2022-01-27 03:01:13 CSDN Q & A

The phenomenon and background of the problem

hive on spark
flink Use... In tasks JDBC Connect hive, Data warehousing , Every time the program runs for about a few hours, it will report an error ,hiveserver2 stop it , I don't know what caused the problem , No related logs found .

insert sql sentence

Operation results and error reporting contents
java.sql.SQLException: org.apache.thrift.transport.TTransportException: java.net.SocketTimeoutException: Read timed out    at org.apache.hive.jdbc.HiveStatement.runAsyncOnServer(HiveStatement.java:334) ~[hive-jdbc-3.1.2.jar:3.1.2]    at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:265) ~[hive-jdbc-3.1.2.jar:3.1.2]    at org.apache.hive.jdbc.HiveStatement.executeUpdate(HiveStatement.java:511) ~[hive-jdbc-3.1.2.jar:3.1.2]    at org.apache.hive.jdbc.HivePreparedStatement.executeUpdate(HivePreparedStatement.java:122) ~[hive-jdbc-3.1.2.jar:3.1.2]    at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61) ~[HikariCP-java7-2.4.12.jar:?]    at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java) 



Refer to the answer 1:

[HIVE-22196] Socket timeouts happen when other drivers set DriverManager.loginTimeout - ASF JIRA
Used in the program Hutool Of Db Tool class
Use hive Called when the setLoginTimeout, Method below , Whether the problem can be completely solved still needs to be verified

private static void setLoginTimeout(String groupName) {        if (DbGroupEnum.HIVE.getName().equals(groupName)) {            PooledDataSource.getDataSource(groupName).setLoginTimeout(30000);        }    }

New problems :https://ask.csdn.net/questions/7605535?spm=1001.2014.3001.5505




Refer to the answer 2:

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.
https://en.cdmana.com/2022/01/202201270301108802.html

Random recommended