'Where to find the hostname and port to SAS hosted servers for SWAT

I just made an OnDemand for Academics account to use sas on Python and I couldn't find my hostname and port to create a connection to the CAS server.

I tried to use this, but I get an error:

conn = swat.CAS('odaws01-euw1.oda.sas.com', 5570)

ERROR: The TCP/IP tcpSockConnect support routine failed with error 10060 (The connection has timed out.). ERROR: Failed to connect to host 'odaws01-euw1.oda.sas.com', port 5570.



Solution 1:[1]

Assuming the CAS server is available for connections over the internet, you can find out the options for the server and port from the following SAS code run on the server (in SAS StudioV):

proc options group=cas;
run;

That will show the cashost and carport options values. You could also look those up directly.

These are also visible as macro variables in a StudioV session, if you run

%put _all_;

It is possible that the CAS server is not exposed to the internet, though, for ODA. The micro services server is often segregated from the CAS server in larger SAS Via installations, and the CAS server might only accept connections over 5570 (or any other port) from the micro services servers (or from servers on the datacenter's network).

It does seem like for some demos this is restricted, and for others it is not restricted; see this post on SAS Communities for more details. You might consider asking about SAS ODA directly there (in the forum for ODA topics); they may be able to help you.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Joe