BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
AhmedAl_Attar
Rhodochrosite | Level 12

I'm having issues with testing/implementing this new Installation/Configuration

Stand-alone SAS 9.4 install On Linux
Client Windows STDIO over SSH!
- SASPy: V3.7.4 - Python: 3.9 (64-bit)

My sascfg_personal.py contains the following settings:

ssh      = {'saspath' : '<SASHomePath>/SASFoundation/9.4/bin/sas_en',
            'ssh'     : 'C:\Windows\System32\OpenSSH\ssh.exe',
            'host'    : 'remote.linux.host', 
            'encoding': 'latin1',
	    'luser'   : '<UserID>',
	    'localhost': '<localHost-IP-Address>',
            'options' : ["-fullstimer"]
            }

When I try to Start a SAS session using

import saspy
sas = saspy.SASsession(cfgname='ssh')

 I can see the SAS session has started on my Remote Linux Box, but then Python gets stuck, and does not give me a prompt to enter any statements after that!!   

 

- Anyone has a working configuration (Windows --> Linux) and willing to share?

- Are there special Firewall settings needed to enable/define to allow bi-directional communication between the two machines?

 

Any help would be greatly appreciated.

Thanks,

Ahmed

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

You need to get that other installation of SAS to work before trying to use it via SASPY.  Open a ticket with SAS support if your local support team cannot fix it.

 

View solution in original post

7 REPLIES 7
Tom
Super User Tom
Super User

What happens if you open a terminal session on remote.linux.host and type the command:

<SASHomePath>/SASFoundation/9.4/bin/sas_en -stdio

Can you then type lines of SAS code and have it execute? Like:

%put hello;
endsas;
AhmedAl_Attar
Rhodochrosite | Level 12

@Tom 

I tested this on a SAS 9.4 M6 Foundation Linux install  

[user@linux ~]$ <SASHome>/SASFoundation/9.4/sas -stdio
%put hello;
endsas;

There was no output feedback! i.e. I didn't see the log, nor the program editor!

Note: This Linux SAS installation was pure SAS Foundation 9.4 install

 

Trying the same command, at a different SAS 9.4 M7 Linux installation - SAS Compute Tier as part of SAS EBI Platform installation, I get this outcome

[user@linux ~]$ /apps/SAS/v9.4/SASHome/SASFoundation/9.4/sas -stdio

NOTE: Copyright (c) 2016 by SAS Institute Inc., Cary, NC, USA. 
NOTE: SAS (r) Proprietary Software 9.4 (TS1M7) 

NOTE: This session is executing on the Linux 3.10.0-1160.36.2.el7.x86_64 (LIN X64) platform.

NOTE: Analytical products:
      
      SAS/STAT 15.2
      SAS/ETS 15.2
      SAS/OR 15.2
      SAS/IML 15.2
      SAS/QC 15.2

NOTE: Additional host information:

 Linux LIN X64 3.10.0-1160.36.2.el7.x86_64 #1 SMP Thu Jul 8 02:53:40 UTC 2021 x86_64 Red Hat Enterprise Linux Server release 7.9 
      (Maipo) 

You are running SAS 9. Some SAS 8 files will be automatically converted 
by the V9 engine; others are incompatible.  Please see 
http://support.sas.com/rnd/migration/planning/platform/64bit.html

PROC MIGRATE will preserve current SAS file attributes and is 
recommended for converting all your SAS libraries from any 
SAS 8 release to SAS 9.  For details and examples, please see
http://support.sas.com/rnd/migration/index.html

This message is contained in the SAS news file, and is presented upon
initialization.  Edit the file "news" in the "misc/base" directory to
display site-specific news and information in the program log.
The command line option "-nonews" will prevent this display.

NOTE: SAS initialization used:
      real time           0.03 seconds
      cpu time            0.03 seconds
      
1    %put hello;

2    %put hello;
hello

3    endsas;

4    endsas;
NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
      real time           10:22.00
      cpu time            0.06 seconds
      
[user@linux ~]$ 

As you can see the outcome of the command is different, I see the log and the program editor.

I'm not sure if it's based on the Maintenance release of SAS 9.4, or the type of installation (Foundation vs. EBI)!?

 

 

sastpw
SAS Employee

Cross posting this here; I think this is the same issue that's posted on the SASPy webinar announcement:

 

Hey, that configuration definition looks like a plausible config. Do you have passwordless ssh configured? If not, it could be that it's hung waiting for a password to by typed in, which is why it needs passwordles (ssh keys). The other thing could be that if you've never ssh'ed to this host before, that it's not in your known_hosts file, so it's prompting you whether you want this host added or not, and is hung on that prompt. If you look at the process (the ssh process on windows), and try running that same command, with the same parameters, from a command prompt, and add -vvv, maybe you'll see what's going on. It's probably a prompt that's got it hung.

 

I don't know why that one deployment doesn't seem to work. Getting the output written to the terminal, like in the second case you posted, is how it works. Been like that for decades, so it's not a maintenance version issue. Are you sure that deployment actually works? Has it had it's setinit expired or something? What happens when you don't add -stdio to it, does it even come up then or what?

 

Thanks,

Tom

AhmedAl_Attar
Rhodochrosite | Level 12

Hi @sastpw 

Yes, I did originally cross post the issue.

Anyways, I believe the problem is in the SAS installation! for whatever reason, if I use -nodms -noterminal options on the SAS 9.4 M6 (SAS Foundation) invocation command from the windows CMD prompt

C:\Windows\System32\OpenSSH\ssh.exe -vvv -t <user>@<remote-linux-server> <SASHome>/SASFoundation/9.4/bin/sas_en -fullstimer -nodms -noterminal -nosyntaxcheck -pagesize MAX 

I can see the log streamed back and I get the 1? prompt from SAS batch, which allows me to submit SAS statements. While Using -nodms -stdio -terminal options, causes the SAS system to hang, and I don't see the log nor the prompt!

 

At this point, I think this requires a call to SAS Tech Support for diagnostic and resolution.

 

BTW: switching to use a SAS Compute installation, works as expected and I can see SAS data sets and returned Pandas output/results.  

 

Thanks,

Ahmed

sastpw
SAS Employee

In the example below, you're missing the -stdio option, which, along with -nodms and -terminal allow saspy to interact with SAS from a programmatic interface. Those options aren't something you'd actually use when trying to interact with it from a terminal session, interactively. But, I can do all of those combinations and it doesn't hang. I did just try M6, as that's the one you say isn't working for you. I didn't see any issue with that either (in case there was some bug or something; but I've run there before). Does it work when you point to the SAS deployment that you showed worked? Was that a different machine, or just a different install? What output did you get w/ the -vvv? 

 

Thanks,

Tom 

Tom
Super User Tom
Super User

You need to get that other installation of SAS to work before trying to use it via SASPY.  Open a ticket with SAS support if your local support team cannot fix it.

 

AhmedAl_Attar
Rhodochrosite | Level 12
Yes, that's exactly what I did. I've opened a SAS tech support ticket to address this issue.
Thanks,
Ahmed

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 7 replies
  • 2254 views
  • 1 like
  • 3 in conversation