Support Questions

Find answers, ask questions, and share your expertise

SAS connection issue with hive2




A client is facing issue while trying to connect with the Hive... they have hourly, daily and weekly jobs that loading data to HDFS. 


As per their comment that few of the jobs can connect but mostly failed due to below issue. Below is the error that comes in the SAS job logs???


ERROR: java.util.concurrent.TimeoutException
Could not open connection to jdbc:hive2://XXXX:10000/ston. Check your Hive server status and also set option
SUBPROTOCOL= appropriately. Set SUBPROTOCOL=hive2 if you are running HiveServer2. Set SUBPROTOCOL=hive if you are running



As per SAS engineers, tThe error likely indicates a shortage of connections are available.  These values are the default ones that affect the number of connections:







SAS uses 2 connections when connecting to Hive.  One primary connection and a secondary utility connection.  Both connections remain until a Libname connection is cleared.  The "hive.server2.thrift.max.worker.threads" property controls the number of connections which can be active at any one time...



Can anyone help me in this how we can resolve the issue, is there is any effect on changing the default values

 of hive.server2.thrift.max.worker.threads?





New Contributor

Check this out: 


I have clients facing similar issue, I have raised with SAS Platform team to check if that hot fix can be applied.

It hints that if login/connection time taken is > 30 secs, it fails with that error. Hence, it is intermittent. Also, the max hiverserver2 threads is well beyond 500. (limit isnt reached)