Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Connection timeout expired while connecting to impala with impala JDBC Driver

avatar
New Contributor

I am using impala2.12.0-cdh5.16.1 and connecting to impala with impala_jdbc_2.6.4.1005. Normally it runs very well, but when I run distcp (which cost the Cluster Network IO and HDFS IO), the java program may throw errors.

[Cloudera][ImpalaJDBCDriver](700100) Connection timeout expired. Details: java.net.ConnectException: Connection timed out.
java.sql.SQLException: [Cloudera][ImpalaJDBCDriver](700100) Connection timeout expired. Details: java.net.ConnectException: Connection timed out.
    at com.cloudera.impala.hivecommon.core.HiveJDBCCommonConnection.handleException(Unknown Source)
    at com.cloudera.impala.jdbc.core.LoginTimeoutConnection.connect(Unknown Source)
    at com.cloudera.impala.jdbc.common.BaseConnectionFactory.doConnect(Unknown Source)
    at com.cloudera.impala.jdbc.common.AbstractDriver.connect(Unknown Source)
    at java.sql.DriverManager.getConnection(DriverManager.java:664)
    at java.sql.DriverManager.getConnection(DriverManager.java:270)

I tried to add DriverManager.setLoginTimeout(120) to the program,but the error still exists. I think it may be happen because the Cluster Network IO is very high and there may be a parameter which can add the value of timeout so the error will disappear.

So, any suggestion about this? Thx.

1 REPLY 1

avatar
Expert Contributor

One specific issue with Impala connection pool timeout error got resolved by increasing in Impala configuration in CM and then restarting Impala daemon:   

fe_service_threads    from 64     =====> increased to 128 as per recommendation below.

------------------------------------------------------------------------------------------------------

Following are the recommended configuration setting for the best performance with Impala. 

https://docs.cloudera.com/best-practices/latest/impala-performance/topics/bp-impala-recommended-conf... 

Set the --fe_service_threads startup option for the Impala daemon (impalad) to 256. This option specifies the maximum number of concurrent client connections allowed. See Startup Options for impalad Daemon for details. 

 

Below are the errors that got resolved by increasing Impala daemon pool size:

---------------------------------------------------------------------------------------------------------

com.streamsets.pipeline.api.StageException: JDBC_06 - Failed to initialize connection pool: com.zaxxer.hikari.pool.PoolInitializationException: Exception during pool initialization: [Cloudera][ImpalaJDBCDriver](700100) Connection timeout expired. Details: None. 

 

SQL Error [3] [S1000]: [Cloudera][ThriftExtension] (3) Error occurred while contacting server: ETIMEDOUT. The connection has been configured to use a SASL mechanism for authentication. This error might be due to the server is not using SASL for authentication.