BookmarkSubscribeRSS Feed
MaliShariat
Calcite | Level 5

Hi

We are using SAS(9.4) in remote linux server and we need to connect the SAS app to the databricks. I've installed saspy in the cluster.

the config setting is here

config = '''
SAS_config_names=['l****ty']
loyalty = {'java' : '/usr/bin/java',
'iomhost' : 'lnzlwl*****.lnzl.co.nz',
'iomport' : 18**2,
'authkey' : 'l****ty',
'encoding' : 'latin1'
}
'''

I got this error:

The application could not log on to the server "lnzl********.lnzl.co.nz:18**2". The machine name is not valid.

I am sure about the host and port since I copied from SAS app

Screenshot 2023-09-08 at 4.36.18 PM.png

Please advise

Thanks

7 REPLIES 7
SASKiwi
Opal | Level 21

What SAS/ACCESS product are you using to connect to Databricks? SAS/ACCESS to Databricks / ODBC / JDBC? Have you configured the ACCESS product to work with Databricks?

MaliShariat
Calcite | Level 5

I am using saspy package to do this connection and do this setting, set the config as above and then run this command:

sas = saspy.SASsession()

got this error:

Using SAS Config named: loyalty
We failed in getConnection
The application could not log on to the server "lnzlwlgs****01.lnzl.co.nz:18592". The machine name is not valid.

SAS process has terminated unexpectedly. Pid State= (1780, 64000)
SAS Connection failed. No connection established. Double check your settings in sascfg_personal.py file.
LinusH
Tourmaline | Level 20

The only trouble shooting advice I can give is try to ping the server from the instance this configuration file is being used.

Other than that, try SAS tech support.

 

It feels like a SAS/ACCESS to ODBC would be easier to setup. But maybe you prefer working with notebooks, even if it's SAS code (or I may misunderstood how this is working)?

Data never sleeps
MaliShariat
Calcite | Level 5

Yes, we need to connect to SAS by notebook.
I've tried to change my configuration and used IP address of server, the type of error is changed, before it said the machine name is incorrect now it said the port is incorrect, could you help me to find how I can find SAS is using which port?

 

config = '''
SAS_config_names=['loyalty']
loyalty = {'java' : '/usr/bin/java',
'autoexec'  : 'options filesystem=hfs;',
'iomhost'   : '192.168.**.176',
'iomport'   : 8591,
'authkey'   : 'loyalty',
'appserver' : 'lnzlwlgs****01.lnzl.co.nz'
}
'''
SASKiwi
Opal | Level 21

AFAIK, SASPy provides an interface between Python and SAS. When you run Python code in SASPy it is converted into SAS code that runs in your SAS installation. I don't see how this could possibly work with Databricks unless you had a SAS product (like SAS/ACCESS) able to do this, unless I'm completely misunderstanding what's possible.

sastpw
SAS Employee
hosts and ports are defined in metadata. You can see what they are using SMC, or via proc iomoperate:
https://sassoftware.github.io/saspy/advanced-topics.html#using-proc-iomoperate-to-find-object-spawne...
sastpw
SAS Employee

Did you figure out your host and port? Also, you had the `appserver` key in your posted config, with an invalid value. It's not clear you need that, but specifying it with an invalid value will cause a problem. Not seeing the actual errors or output from what you're trying doesn't help. Can you show the code you're submitting and all of the output? Do you still need help with this? Or did you get it working?

Tom

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 752 views
  • 0 likes
  • 4 in conversation