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)

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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