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)
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.