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;
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;
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.
For me the issue is persistent.
I'm using SAS StudioV which is in SAS Viya deployment.
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;
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)
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.
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.
Ready to level-up your skills? Choose your own adventure.