sassoftware / saspy

A Python interface module to the SAS System. It works with Linux, Windows, and Mainframe SAS as well as with SAS in Viya.
https://sassoftware.github.io/saspy
Other
367 stars 149 forks source link

Post SAS upgrade issues reconnecting SASPY #491

Closed esjackso closed 1 year ago

esjackso commented 1 year ago

Tom,

Been using/following SASPY for awhile now but my org recently went through a SAS upgrade (I think from 9.4 M3 to 9.4 M7) on a linux SAS Grid implementation and I can no longer connect using SASPY. Below are my PRE upgrade config and various POST upgrade configs (with values provided by the SAS admin) that I have tried (some out of desperation). Not to state the obvious ... but I have no trouble connecting via SAS Studio or SAS EG and I have JAVA 8+ installed. Any advice on next steps in troubleshooting? Im sure I forgot to include something so let me know if something is missing. Thanks!

what used to work

winiomlinux = {'java' : 'java', 'iomhost' : 'fipsl-sasha.rti.ns', 'iomport' : 8591 }

Error returned: We failed in getConnection The application could not log on to the server "fipsl-sasha.rti.ns:8591". No server is available at that port on that machine.

SAS process has terminated unexpectedly. RC from wait was: 4294967290 SAS Connection failed. No connection established. Double check your settings in sascfg_personal.py file.

#######################################

output from proc iomoperate per saspy doc

winiomlinux_1 = {'java' : 'java', 'iomhost' : ['rtplgrd05.rti.ns', 'rtplgrd06.rti.ns', 'rtplgrd07.rti.ns', 'rtplgrd08.rti.ns'], 'iomport' : 8592, 'appserver' : 'SASApp - Workspace Server', }

Error returned: We failed in getConnection An exception was thrown during the encryption key exchange.

SAS process has terminated unexpectedly. RC from wait was: 4294967290 SAS Connection failed. No connection established. Double check your settings in sascfg_personal.py file.

#######################################

trying to match what used to work and as provided by SAS TEAM

winiomlinux_2 = {'java' : 'java', 'iomhost' : 'fipsl-sasha.rti.ns', 'iomport' : 8592, 'appserver' : 'SASApp - Workspace Server', }

Error returned: We failed in getConnection An exception was thrown while receiving the requirements status from the peer.

SAS process has terminated unexpectedly. RC from wait was: 4294967290 SAS Connection failed. No connection established. Double check your settings in sascfg_personal.py file.

#######################################

connecting without java - still not working

iomcom = { 'iomhost' : 'fipsl-sasha.rti.ns', 'iomport' : 8592, 'provider': 'sas.iomprovider' }

Error returned: com_error: (-2147352567, 'Exception occurred.', (0, 'SASObjectManager', '\r\n\t\r\n\t\tThe object invoked has disconnected from its clients.\r\n\r\n\t\t0x80010108\r\n\t\tesjackson\r\n\t\tfipsl-sasha.rti.ns\r\n\t\t8592\r\n\t\t440196d4-90f0-11d0-9f41-00a024bb830c\r\n\t\tSAS.Workspace.1.0\r\n\t\t15544\r\n\t\tSASApp\r\n\t\r\n', None, 0, -2147213310), None) #######################################

connecting to a single node without java - works

iomcombad = { 'iomhost' : 'rtplgrd08.rti.ns', 'iomport' : 8592, 'provider': 'sas.iomprovider' }

Error returned: NONE THIS WORKED ... BUT DOES NOT CONNECT TO THE GRID MANAGER ... just a single node. #######################################

tomweber-sas commented 1 year ago

Hey, glad you've been using it! I can help you with solving this. First, I wouldn't use COM, but trying it to help diagnose the problem is a good idea; that last one connected so the host/port must be right. The first case (previously worked), fails because that machine or port isn't what's configured by your SAS team, so that's an appropriate error. I don't know the machine names or ports, but is seems like the names and port you have in the config that has the multiple iomhosts is likely right. The error there isn't about not finding the object spawner, or the workspace server port; it seemed to be right. The error is about encryption, so that actually seems like you've got the right hosts/port.

My guess is that you're workspace servers are configured with (probably AES) encryption, and since you were using Java 8, this worked for you with the previous version of SAS. Unfortunately, something in M7 no longer allows Java to support the AES like it did for M6 and before, so the 3 encryption jars are required to be in the classpath; see this doc here. You can either get them from your SAS Admins, if you don't have them already. Just put them in the saspy deployment, per the doc, and that should take care of it. If you can't get them from your folks, or from one of those servers; they are in the SAS install on those machines, I can find a way to get them to you.

Give that a try and see if you're back up and running!

Thanks, Tom

esjackso commented 1 year ago

Thanks Tom!

I saw that in the troubleshooting page "If this error is for AES, then there’s another solution than having to get those 3 jars and add them to the deployment, but only for SAS versions prior to M7. M7 requires the encryption jars. Java 8 (release greater than 151), has the needed support for this in it. So you just need to install the current Java 8 or higher to solve this without needing the jars." And since my Java was 8 update 341 I assumed I didn't need the encryption jars. But it sounds like I do so I will look into finding them and report back if I run into trouble!

tomweber-sas commented 1 year ago

Yes, exactly! I don't know what changed in M7, but it did for the requirement of having the encryption jars in the classpath, like before M7, if you were using java from before 8.151. I believe these 3 jars are available somewhere on our download site (I think I put them out there for this!). Let me try to find the link and you can download them. Unless you have them already or can easily get them from yout SAS admins (or just copy from the SAS install if you can access the machines).

esjackso commented 1 year ago

If they are on the download site that would be easier ... I have not found them yet

tomweber-sas commented 1 year ago

Hey, found it. You can download them from here if that's easier than getting them from your site: https://support.sas.com/downloads/package.htm?pid=2494

esjackso commented 1 year ago

That seemed to do the trick!! THANK YOU!!! I felt like I was going around in circles!!

Eric

tomweber-sas commented 1 year ago

Sweet! Nice close to a Friday!