BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
pkm_edu
Quartz | Level 8

I used the code snippets from https://github.com/sassoftware/saspy/issues/518#issuecomment-1402644864.

My _authinfo: oda user ******i@****** password ***************

import saspy
sas_session = saspy.SASsession()
sas_session
Using SAS Config named: oda
We failed in getConnection
The application could not log on to the server "odaws04-usw2.oda.sas.com: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.

sascfg_personal.py.

SAS_config_names=['oda']
oda = {'java' : 'C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe',
#US Home Region 1
'iomhost' : ['odaws01-usw2.oda.sas.com','odaws02-usw2.oda.sas.com','odaws03-usw2.oda.sas.com','odaws04-usw2.oda.sas.com'],
'iomport' : 8591,
'authkey' : 'oda',
'encoding' : 'utf-8'
}

Issue: The above code snippets do not work in my office laptop (shown below), although they work fine in my personal laptop.

Any help with a resolution of the issue would be greatly appreciated.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
sastpw
SAS Employee

That's a different issue. Your error is:

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

And that's a problem with needing the encryption jars in your saspy deployment, which is a new requirement for ODA since they upgraded to 9.4M7. See the documentation here: https://sassoftware.github.io/saspy/configuration.html#attn-as-of-saspy-version-3-3-3-the-classpath-...

 

View solution in original post

10 REPLIES 10
HarrySnart
SAS Employee

Hi @pkm_edu , if the connection works on your personal laptop but not corporate device its likely to be due to a VPN/network issue in your corporate network. You may need to raise this with your internal IT team to get the SAS environmnet added to the safe domains. Thanks, Harry

pkm_edu
Quartz | Level 8

Thanks, Harry. What server address shall I give to the IT Team to check?  SAS ODA works fine from this office computer.

sastpw
SAS Employee

The error message shows it tried each of the 4 nodes but couldn't connect. In the doc, it shows there is a second US region with 2 different servers. Have you tried those? I'm assuming the US region is the correct one for you? https://support.sas.com/ondemand/saspy.html

 

#US Home Region 1
'iomhost' : ['odaws01-usw2.oda.sas.com','odaws02-usw2.oda.sas.com','odaws03-usw2.oda.sas.com','odaws04-usw2.oda.sas.com'],
#US Home Region 2
#'iomhost' : ['odaws01-usw2-2.oda.sas.com','odaws02-usw2-2.oda.sas.com'],

 

Also note that ODA recently upgraded to SAS 9.4M7, and that release requires the 3 encryption jars in the IOM Client, which SASPy uses to communicate with SAS workspace servers. So you'll need to add those to the saspy deployment. The instructions for that are here: https://sassoftware.github.io/saspy/configuration.html#attn-as-of-saspy-version-3-3-3-the-classpath-...

 

Hopefully that's all you need, but let me know.

 

Thanks,

Tom

pkm_edu
Quartz | Level 8

I have revised sascfg_personal.py with the iomhost for Region 2 as suggested by sastpw. I am still getting the connection error.

SAS_config_names=['oda']
oda = {'java' : 'C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe',
#US Home Region 2
'iomhost' : ['odaws01-usw2-2.oda.sas.com','odaws02-usw2-2.oda.sas.com'],
'iomport' : 8591,
'authkey' : 'oda',
'encoding' : 'utf-8'
}

  The three encryption jars were already in the IOM client.

C:\Users\pradip.muhuri\Anaconda3\Lib\site-packages\saspy\java\iomclient\sas.rutil.jar
C:\Users\pradip.muhuri\Anaconda3\Lib\site-packages\saspy\java\iomclient\sas.rutil.nls.jar
C:\Users\pradip.muhuri\Anaconda3\Lib\site-packages\saspy\java\iomclient\sastpj.rutil.jar
Using SAS Config named: oda
We failed in getConnection
The application could not log on to the server "odaws02-usw2-2.oda.sas.com: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.

 

gouris_98
Calcite | Level 5

tried sascfg_personal.py file with below content  once with Region 1 and second time with Region 2 

SAS_config_names=['oda']
oda = {'java' : 'C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath\\java.exe',
#US Home Region 1
#'iomhost' : ['odamid-usw2-2.oda.sas.com','odaws01-usw2.oda.sas.com','odaws02-usw2.oda.sas.com','odaws03-usw2.oda.sas.com','odaws04-usw2.oda.sas.com'],
#'iomhost' : ['odamid-usw2-2.oda.sas.com'],
#US Home Region 2
'iomhost' : ['odaws01-usw2-2.oda.sas.com','odaws02-usw2-2.oda.sas.com'],
#European Home Region 1
#'iomhost' : ['odaws01-euw1.oda.sas.com','odaws02-euw1.oda.sas.com'],
#Asia Pacific Home Region 1
#'iomhost' : ['odaws01-apse1.oda.sas.com','odaws02-apse1.oda.sas.com'],
#Asia Pacific Home Region 2
#'iomhost' : ['odaws01-apse1-2.oda.sas.com','odaws02-apse1-2.oda.sas.com'],
'iomport' : 8591,
'authkey' : 'oda',
'encoding' : 'utf-8'

in _authinfo file i have contents : 

oda user *****n.*******@gmail.com password ***********

when i run 

sas = saspy.SASsession()

gettin error 

Using SAS Config named: oda
We failed in getConnection
The application could not log on to the server "odaws04-usw2.oda.sas.com:8591". The load balancing object spawner timed out.

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.

Attempted to run program C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe with the following parameters:['C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath\\java.exe', '-classpath', 'C:\\Users\\Owner\\miniconda3\\lib\\site-packages\\saspy\\java\\saspyiom.jar;C:\\Users\\Owner\\miniconda3\\lib\\site-packages\\saspy\\java\\iomclient\\log4j-1.2-api-2.12.4.jar;C:\\Users\\Owner\\miniconda3\\lib\\site-packages\\saspy\\java\\iomclient\\log4j-api-2.12.4.jar;C:\\Users\\Owner\\miniconda3\\lib\\site-packages\\saspy\\java\\iomclient\\log4j-core-2.12.4.jar;C:\\Users\\Owner\\miniconda3\\lib\\site-packages\\saspy\\java\\iomclient\\sas.security.sspi.jar;C:\\Users\\Owner\\miniconda3\\lib\\site-packages\\saspy\\java\\iomclient\\sas.core.jar;C:\\Users\\Owner\\miniconda3\\lib\\site-packages\\saspy\\java\\iomclient\\sas.svc.connection.jar;C:\\Users\\Owner\\miniconda3\\lib\\site-packages\\saspy\\java\\iomclient\\sas.rutil.jar;C:\\Users\\Owner\\miniconda3\\lib\\site-packages\\saspy\\java\\iomclient\\sas.rutil.nls.jar;C:\\Users\\Owner\\miniconda3\\lib\\site-packages\\saspy\\java\\iomclient\\sastpj.rutil.jar;C:\\Users\\Owner\\miniconda3\\lib\\site-packages\\saspy\\java\\thirdparty\\glassfish-corba-internal-api.jar;C:\\Users\\Owner\\miniconda3\\lib\\site-packages\\saspy\\java\\thirdparty\\glassfish-corba-omgapi.jar;C:\\Users\\Owner\\miniconda3\\lib\\site-packages\\saspy\\java\\thirdparty\\glassfish-corba-orb.jar;C:\\Users\\Owner\\miniconda3\\lib\\site-packages\\saspy\\java\\thirdparty\\pfl-basic.jar;C:\\Users\\Owner\\miniconda3\\lib\\site-packages\\saspy\\java\\thirdparty\\pfl-tf.jar', 'pyiom.saspy2j', '-host', 'localhost', '-stdinport', '51231', '-stdoutport', '51232', '-stderrport', '51233', '-iomhost', 'odamid-usw2-2.oda.sas.com;odaws01-usw2.oda.sas.com;odaws02-usw2.oda.sas.com;odaws03-usw2.oda.sas.com;odaws04-usw2.oda.sas.com', '-iomport', '8591', '-user', '*********.********@****.com', '-lrecl', '1048576', '']

No SAS process attached. SAS process has terminated unexpectedly.
Invalid response from SAS on inital submission. printing the SASLOG as diagnostic

---------------------------------------------------------------------------
SASIOConnectionError                      Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_8728/3770220775.py in <module>
----> 1 sas = saspy.SASsession()

~\miniconda3\lib\site-packages\saspy\sasbase.py in __init__(self, **kwargs)
    606 
    607            if failed:
--> 608               raise SASIOConnectionError(res)
    609 
    610            if self.pyenc is not None:

SASIOConnectionError: Failure establishing SASsession.
 No SAS process attached. SAS process has terminated unexpectedly.
MayurJadhav
Quartz | Level 8

I'm also facing the same issue. Anyone knows the solution? 

 

 

>>> sas_session = saspy.SASsession()
Using SAS Config named: oda
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.

 

sascfg_personal.py

SAS_config_names=['oda']
oda = {'java' : 'C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath\\java.exe',
#US Home Region 1
#'iomhost' : ['odaws01-usw2.oda.sas.com','odaws02-usw2.oda.sas.com','odaws03-usw2.oda.sas.com','odaws04-usw2.oda.sas.com'],
#US Home Region 2
#'iomhost' : ['odaws01-usw2-2.oda.sas.com','odaws02-usw2-2.oda.sas.com'],
#European Home Region 1
#'iomhost' : ['odaws01-euw1.oda.sas.com','odaws02-euw1.oda.sas.com'],
#Asia Pacific Home Region 1
#'iomhost' : ['odaws01-apse1.oda.sas.com','odaws02-apse1.oda.sas.com'],
#Asia Pacific Home Region 2
'iomhost' : ['odaws01-apse1-2.oda.sas.com','odaws02-apse1-2.oda.sas.com'],
'iomport' : 8591,
'authkey' : 'oda',
'encoding' : 'utf-8'
}
Mayur Jadhav
BI Developer. Writer. Creative Educator.

SAS Blog → https://learnsascode.com
YouTube Channel: → https://www.youtube.com/@imayurj
sastpw
SAS Employee

That's a different issue. Your error is:

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

And that's a problem with needing the encryption jars in your saspy deployment, which is a new requirement for ODA since they upgraded to 9.4M7. See the documentation here: https://sassoftware.github.io/saspy/configuration.html#attn-as-of-saspy-version-3-3-3-the-classpath-...

 

MayurJadhav
Quartz | Level 8

Superb! Thanks for the help. 🙂

 

 

>>> import saspy
>>> sas=saspy.SASsession()
Using SAS Config named: oda
SAS Connection established. Subprocess id is 12596

>>>

 

Mayur Jadhav
BI Developer. Writer. Creative Educator.

SAS Blog → https://learnsascode.com
YouTube Channel: → https://www.youtube.com/@imayurj

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 10 replies
  • 3359 views
  • 2 likes
  • 5 in conversation