BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
stalasani
Fluorite | Level 6
ERROR: The connection to the data source driver failed.
ERROR: General error java.util.concurrent.TimeoutException
ERROR: Function failed.
ERROR: The action stopped due to errors.
cas mySession sessopts=(caslib=casuser timeout=1800 locale="en_US");

caslib hdlib datasource=(srctype="hadoop", dataTransferMode="serial", username="{username}", password="{password}"
uri="jdbc:hive2://{hostname}:2181,{hostname}:2181,{hostname}:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2;ssl=true;",
hadoopjarpath="/sas_mirror/hadoopfiles/lib", 
hadoopconfigdir="/sas_mirror/hadoopfiles/conf", 
schema="default");

proc casutil; 
list files incaslib="hdlib";
run;
1 ACCEPTED SOLUTION

Accepted Solutions
stalasani
Fluorite | Level 6

removing the uri option from the code resolved the issue.

cas mySession sessopts=(caslib=casuser timeout=1800 locale="en_US");

caslib hdlib datasource=(srctype="hadoop", dataTransferMode="serial", username="{username}", password="{password}"
hadoopjarpath="/sas_mirror/hadoopfiles/lib", 
hadoopconfigdir="/sas_mirror/hadoopfiles/conf", 
schema="default");

proc casutil; 
list files incaslib="hdlib";
run;

View solution in original post

4 REPLIES 4
Patrick
Opal | Level 21

A similar error which I'm getting in SAS 9.4 occurs if SAS is not able to establish a connection due to an unresponsive Hadoop cluster (meaning: It only happens sometimes).

ERROR: Error trying to establish connection: java.util.concurrent.TimeoutException
ERROR: Error in the LIBNAME statement.

You could try to increase the value for timeout if your version of SAS lets you do this.

http://support.sas.com/kb/62/643.html 

stalasani
Fluorite | Level 6

For me the issue is persistent.

I'm using SAS StudioV which is in SAS Viya deployment.  

stalasani
Fluorite | Level 6

removing the uri option from the code resolved the issue.

cas mySession sessopts=(caslib=casuser timeout=1800 locale="en_US");

caslib hdlib datasource=(srctype="hadoop", dataTransferMode="serial", username="{username}", password="{password}"
hadoopjarpath="/sas_mirror/hadoopfiles/lib", 
hadoopconfigdir="/sas_mirror/hadoopfiles/conf", 
schema="default");

proc casutil; 
list files incaslib="hdlib";
run;
stalasani
Fluorite | Level 6

The solution was provided by SAS Technical support.

We should be able to surface the zookeeper configuration from your xml files if you remove the uri= option and continue to not have a server= as well.  For example, the working caslib statement for our internal zookeeper cluster is just:

caslib hdlib

 datasource=(srctype="hadoop", dataTransferMode="serial", username="hive",

 hadoopjarpath="/opt/sas/hadoop/lib",

 hadoopconfigdir="/opt/sas/hadoop/conf",

 schema="hidetail");

 

If a similar caslib statement still times out for you then you may want to add the login_time= option with a value of 60.(the default is 30 for hadoop)

 

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 3073 views
  • 0 likes
  • 2 in conversation