I don't know much about the port-forwarding software you mention, but you can try the 8591 connection with another tool that I built called SasHarness, which is an example of a Microsoft .NET application connecting via SAS Integration Technologies. You can get the tool (source and binaries) on my GitHub repository.
Thank you, I'll review.
Chris,
I have both ports forwarded now - 8561 and 8591.
Tested by SAS Integration Technologies Configuration and shows success:
Congratulations! You have successfully established a connection with the SAS server. The details of the SAS server are below.
SAS Server Definition Information:
Machine DNS Name: localhost
Prog ID: SAS.Workspace.1.0
Class Identifier: 440196D4-90F0-11D0-9F41-00A024BB830C
Protocol: IOM Bridge
Encryption Level: Credentials
Encryption Algorithm(s): SASProprietary
Port: 8591
Service: sasobjspawn
But when I open EG it seems to connect but when I click on the SASapp to see the directory of files on the server, I get these errors:
Exception Details:
----------------------------------------
Exception type: SAS.EG.SDS.SDSException
Message: Could not establish a connection to the server on the requested machine. Verify that the server has been started and that the host and port of the server match the client's connection information.
Source: SAS.EG.SDS.Model
Target Site: SASWorkspace
Stack Trace:
at SAS.EG.SDS.Model.Server.SASWorkspace()
at SAS.EG.SDS.Views.View.DoPopulate(DisplayOperation& op)
Inner Exception Details:
----------------------------------------
Exception type: SAS.EC.Directory.Model.SDSException
Message: Could not establish a connection to the server on the requested machine. Verify that the server has been started and that the host and port of the server match the client's connection information.
Source: EC.Directory
Target Site: Connect
Inner Exception Details:
----------------------------------------
Exception type: System.Runtime.InteropServices.COMException
Message: Could not establish a connection to the server on the requested machine. Verify that the server has been started and that the host and port of the server match the client's connection information.
Source: SASObjectManager
Target Site: CreateObjectByLogicalNameAndLogins
Stack Trace:
at SASObjectManager.ObjectFactoryMulti2Class.CreateObjectByLogicalNameAndLogins(String Name, Boolean synchronous, Object pIOMI, String LogicalName, LoginDef pOMRLoginDef, LoginDef pSASLoginDef, String nameValuePairs)
at SAS.EC.Directory.Model.Server.Connect(ConnectionInfo connInfo)
What else does Enterprise Guide need to successfully connect?
Forwarded 8581 as well - still, the same error.
I'm not familiar with the port forwarding mechanism, but if ITConfig works, then EG *should* work as well. Do you have access to PowerShell?
You could try saving this script into a PS1 file and then running (pass your host name in as an argument).
if ($args.Count -eq 1) { $host = $args[0] } else { Write-Host "EXAMPLE Usage: CheckServerHealth.ps1 <host-name or IP address>" Exit -1 } $ports = @{ 8561 = "SAS Metadata Server" 8591 = "SAS Workspace Server" 8581 = "SAS Object Spawner Operator" 8571 = "SAS Object Spawner Load Balancing" 5451 = "SAS OLAP Server" 8701 = "SAS Logical Pooled Workspace Server" 8601 = "SAS Logical Stored Process Server" 7551 = "SAS/Connect Spawner" 8551 = "SAS/Share Server" 5091 = "SAS Remote Services Registry" 22031 = "SAS Framework Data Server" 8080 = "SAS Web Application Server" } foreach ($port in $ports.Keys) { $tcp = New-Object System.Net.Sockets.TcpClient try { $tcp.Connect($host,$port) Write-Host "SUCCESS: Connection to " $ports.Item($port) " on port " $port } catch { Write-Host "FAIL: Unable to connect to " $ports.Item($port) " on port " $port Write-Host " " $_.Exception.Message } }
It sounds like SSH tunneling is being used where an SSH connection is made to a SAS server (or another machine within the SAS servers network) and the SSH client opens ports on the workstation and forwards traffic to designated ports in the server network. This can be tricky because the SAS servers will return hostnames for the client to connect to and so those hostnames will have to be redirected to the localhost interface for the client to use the SSH tunnels. I had tried this with mixed success with SAS in the past and ended up switching to using a VPN instead.
However for the use case you mentioned (SAS EG connects to the metadata server on tunnelled port 8561 and then to the object spawner on tunnelled port 8591) I was able to get it to succeed (although if you turn on EG logging you may see failures to connect on other ports such as 7980).
The process I followed, with the SSH server, SAS metadata server and SAS object spawner all running on the same server machine, was:
This all worked for me so I am wondering if perhaps there is something amiss with either your local hostname redirections or tunnel configurations. Can you post details on your server topology, how you have edited the workstation hosts file and how you setup the SSH tunnels.
Also which version of SAS and EG are you using. My test above was with SAS 9.4 M0 and SAS EG 7.1.
Cheers
Paul
Resolved.
Thanks, Paul. My IT guys understood your instructions.
What we had to do was to forward three ports: 8561 (inbound/outbound), 8581, 8591
Then add this line to the "hosts" file on my local machine
C:\Windows\System32\Drivers\etc\
127.0.0.1 MYSASSERVER MYSASSERVER.MYDOMAIN.COM
EG access works fine now!
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.