Code Monkey home page Code Monkey logo

Comments (6)

tomweber-sas avatar tomweber-sas commented on September 17, 2024

Hey, did the error message have the command (you could cut n paste) and run from a shell? That should be right after the 'Attempted to run ...' message. If you can run that from the command prompt, it might give a better error (the OS error about not finding a file). Can't tell from that which file it's talking about.
But, it's probably java. If you can run that manually,it might be more specific about what it can't find.

Also, the "...\core\sasext" at the end of the classpath is for the sspiauth.dll file. I'm not sure having that on the classpath, as opposed to having it assigned in the system PATH environment variable will work (it might, but I haven't tried that before). Do you have that in your system PATH? I'm not thinking that's the file it can't find because I think that would be a different error.

I suspect it's java that it can't find. Can you try specifying the full path to java for the 'java' key in your winlocal definition and see if that solves it? If you just go to a command line and run 'java', you might also see that it doesn't know where to find it?

from sas_kernel.

sterlinm avatar sterlinm commented on September 17, 2024

I'm pretty sure it doesn't know where to find java. I tried taking the command it suggests to run and going to C:\Program Files\SASHome\SASPrivateJavaRuntimeEnvironment\9.4\jre\bin\ and running it from there. When I do that I get this error.

java.net.ConnectException: Connection refused: connect
        at java.net.DualStackPlainSocketImpl.connect0(Native Method)
        at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:579)
        at java.net.Socket.connect(Socket.java:528)
        at java.net.Socket.<init>(Socket.java:425)
        at java.net.Socket.<init>(Socket.java:208)
        at pyiom.saspy2j.main(saspy2j.java:116)
Exception in thread "main" java.lang.NullPointerException
        at pyiom.saspy2j.main(saspy2j.java:123)

You can see in the snippet above that I've tried replacing java with the full path as follows:

winlocal = {'java'      : 'C:\\Program Files\\SASHome\\SASPrivateJavaRuntimeEnvironment\\9.4\\jre\\bin\\java.exe',
            'encoding'  : 'windows-1252',
            'classpath' : cpW}

When I do that the kernel immediately crashes when I try to open the notebook (as opposed to getting that error message when I attempt to run a cell).

You think I should put C:\Program Files\SASHome\SASFoundation\9.4\core\sasext on the system path rather than adding it to the cpW classpath?

from sas_kernel.

sterlinm avatar sterlinm commented on September 17, 2024

I think I've got it working. Ultimately the correct settings were:

cpW  =  "C:\\Program Files\\SASHome\\SASDeploymentManager\\9.4\\products\\deploywiz__94435__prt__xx__sp0__1\\deploywiz\\sas.svc.connection.jar"
cpW += ";C:\\Program Files\\SASHome\\SASDeploymentManager\\9.4\\products\\deploywiz__94435__prt__xx__sp0__1\\deploywiz\\log4j.jar"
cpW += ";C:\\Program Files\\SASHome\\SASDeploymentManager\\9.4\\products\\deploywiz__94435__prt__xx__sp0__1\\deploywiz\\sas.security.sspi.jar"
cpW += ";C:\\Program Files\\SASHome\\SASDeploymentManager\\9.4\\products\\deploywiz__94435__prt__xx__sp0__1\\deploywiz\\sas.core.jar"
cpW += ";C:\\Users\\msterling\\AppData\\Local\\Continuum\\Anaconda3\\envs\\py35\\Lib\\site-packages\\saspy\\java\\saspyiom.jar"

winlocal = {'java'      : 'C:\\Program Files\\SASHome\\SASPrivateJavaRuntimeEnvironment\\9.4\\jre\\bin\\java.exe',
            'encoding'  : 'windows-1252',
            'classpath' : cpW}

Then I needed to add C:\Program Files\SASHome\SASFoundation\9.4\core\sasext to the system path.

Finally, I needed to restart the jupyter notebook server so that it would have the updated PATH variable.

Thanks!

from sas_kernel.

tomweber-sas avatar tomweber-sas commented on September 17, 2024

Ok, yes. It wasn't finding java. So when you ran that command from in the dir where java was, it found it and you got the expected socket error. So that was that problem. And it looks like then setting the PATH for that .dll instead of having it in the classpath was the next problem, which you address by adding it where it was needed.

Great! that all makes sense, and it's working for you now, so that's good.

And, just for other's reference, these cases and others are also documented in the troubleshooting section of the doc. In case anyone runs into problems like this; check out that section too. It also has likely errors that can happen for remote IOM connections too; this was a local connection and there can be some different symptoms if something isn't configured right. And STDIO and SSH have other symptoms too which are different than IOM problem.

Thanks, and glad you're up and running!
Tom

from sas_kernel.

sterlinm avatar sterlinm commented on September 17, 2024

Thanks Tom! Yeah I found that troubleshooting page after following your first piece of feedback and googling the new errors I was getting. I think it took me longer to find it because it was in the saspy documentation rather than the sas_kernel documentation.

It might be helpful to put a link to the troubleshooting section in the installation instructions for the sas_kernel.

Thanks again!

from sas_kernel.

tomweber-sas avatar tomweber-sas commented on September 17, 2024

Hey, that's a great idea. We will do that. Thanks!

from sas_kernel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.