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

While connecting to the SAS via JDBC driver, we are getting below error:

 

com.sas.rio.MVASQLException: Unable to establish connection. An exception was thrown during the encryption key exchange.

"java.io.EOFException: null
    at com.sas.net.crypto.jce.JceCipher$BasePhase.recv(JceCipher.java:636) ~[APP.jar:?]
    at com.sas.net.crypto.jce.JceCipher$SizePhase.transmit(JceCipher.java:691) ~[APP.jar:?]
    at com.sas.net.crypto.jce.JceCipher.keyExchange(JceCipher.java:81) ~[APP.jar:?]
    at com.sas.iom.orb.brg.Engine.handleStatus(Engine.java:5014) ~[APP.jar:?]
    at com.sas.iom.orb.brg.Engine0200.flowSendReqs(Engine0200.java:188) ~[APP.jar:?]
    at com.sas.iom.orb.brg.Engine.flow(Engine.java:720) ~[APP.jar:?]
    at com.sas.iom.orb.brg.Engine.initClient(Engine.java:681) ~[APP.jar:?]
    at com.sas.iom.orb.brg.ORBImpl.uri_to_object(ORBImpl.java:114) ~[APP.jar:?]
    at com.sas.services.connection.ClusterEnvelope.createObject(ClusterEnvelope.java:395) ~[APP.jar:?]
    at com.sas.services.connection.ClusterEnvelope.getConnection(ClusterEnvelope.java:87) ~[APP.jar:?]
    at com.sas.services.connection.AggregationKernel.doGetConnection(AggregationKernel.java:242) ~[APP.jar:?]
    at com.sas.services.connection.ConnectionFactoryKernel.getConnection(ConnectionFactoryKernel.java:325) ~[APP.jar:?]
    at com.sas.services.connection.ConnectionFactoryShell.getConnection(ConnectionFactoryShell.java:69) ~[APP.jar:?]
    at com.sas.services.connection.ConnectionFactoryShell.getConnection(ConnectionFactoryShell.java:51) ~[APP.jar:?]
    at com.sas.rio.RIOUtil.getWorkspace(RIOUtil.java:1881) ~[APP.jar:?]
    at com.sas.rio.RIOUtil.<init>(RIOUtil.java:304) ~[APP.jar:?]
    at com.sas.rio.MVAConnection.<init>(MVAConnection.java:254) ~[APP.jar:?]
    at com.sas.rio.MVADriver.connect(MVADriver.java:280)

 

Additional info:

  • JDBC driver version 94280
  • SAS version 9.4
  • SAS is setup using AES 64-bit encryption
  • JDBC URI format: "sasiom://<hostname_or_ip>:<port>?libref=<library_name>'/<library_location>'"

 

Can you please let us know what could be the issue here?

 

1 ACCEPTED SOLUTION

Accepted Solutions
gwootton
SAS Super FREQ
Correct, this would be done on the client side not the server side.

The file sas.rutil.nls.jar I don't think actually contains any classes, just additional language support. The sas.rutil.jar and sastpj.rutil.jar contain java classes.

You can check in the software depot under products/securejava__* to see if all the JAR files are there. I think they'd only make it to the JAR repository if they were installed from the depot.
--
Greg Wootton | Principal Systems Technical Support Engineer

View solution in original post

6 REPLIES 6
gwootton
SAS Super FREQ
Are there any other messages indicating the details of the exception being encountered? Does the behavior change if you use JDBC driver version 94290?
https://support.sas.com/downloads/package.htm?pid=2620
--
Greg Wootton | Principal Systems Technical Support Engineer
a_alation
Calcite | Level 5
We are unable to test that our internally as our license has expired.

But we are seeking help on this since, we got to know from one of our customer that with AES encryption the above mentioned driver is not working.
r_alation
Calcite | Level 5

@gwootton After upgrading to JDBC driver 94290, we are getting similar error:

 

"message":"An exception was thrown during the encryption key exchange.","name":"com.sas.services.connection.FatalConnectionFactoryException","cause":{"commonElementCount":16,"localizedMessage":"An exception was thrown during the encryption key exchange.","message":"An exception was thrown during the encryption key exchange.","name":"org.omg.CORBA.COMM_FAILURE","cause":{"commonElementCount":16,"name":"java.io.EOFException","extendedStackTrace":"java.io.EOFException: null
    at com.sas.net.crypto.jce.JceCipher$BasePhase.recv(JceCipher.java:636) ~[APP.jar:?]
    at com.sas.net.crypto.jce.JceCipher$SizePhase.transmit(JceCipher.java:691) ~[APP.jar:?]
    at com.sas.net.crypto.jce.JceCipher.keyExchange(JceCipher.java:81) ~[APP.jar:?]
    at com.sas.iom.orb.brg.Engine.handleStatus(Engine.java:5015) ~[APP.jar:?]
    at com.sas.iom.orb.brg.Engine0200.flowSendReqs(Engine0200.java:188) ~[APP.jar:?]
    at com.sas.iom.orb.brg.Engine.flow(Engine.java:721) ~[APP.jar:?]
    at com.sas.iom.orb.brg.Engine.initClient(Engine.java:682) ~[APP.jar:?]
    at com.sas.iom.orb.brg.ORBImpl.uri_to_object(ORBImpl.java:114) ~[APP.jar:?]
    at com.sas.services.connection.ClusterEnvelope.createObject(ClusterEnvelope.java:395) ~[APP.jar:?]
    at com.sas.services.connection.ClusterEnvelope.getConnection(ClusterEnvelope.java:87) ~[APP.jar:?]
    at com.sas.services.connection.AggregationKernel.doGetConnection(AggregationKernel.java:242) ~[APP.jar:?]
    at com.sas.services.connection.ConnectionFactoryKernel.getConnection(ConnectionFactoryKernel.java:325) ~[APP.jar:?]
    at com.sas.services.connection.ConnectionFactoryShell.getConnection(ConnectionFactoryShell.java:69) ~[APP.jar:?]
    at com.sas.services.connection.ConnectionFactoryShell.getConnection(ConnectionFactoryShell.java:51) ~[APP.jar:?]
    at com.sas.rio.RIOUtil.getWorkspace(RIOUtil.java:1882) ~[APP.jar:?]
    at com.sas.rio.RIOUtil.<init>(RIOUtil.java:305) ~[APP.jar:?]
    at com.sas.rio.MVAConnection.<init>(MVAConnection.java:256) ~[APP.jar:?]
    at com.sas.rio.MVADriver.connect(MVADriver.java:289) ~[APP.jar:?]
    at com.mycom.jdbcSasConnection.createConnectionWithUsernamePasswordAuth(SasConnection.java:95) ~[APP.jar:?]
    at com.mycom.jdbcSasConnection.connect(SasConnection.java:68) ~[APP.jar:?]
    at com.mycom.datasource.SasDatasource.validate(SasDatasource.java:153) ~[APP.jar:?]\n"},"extendedStackTrace":"org.omg.CORBA.COMM_FAILURE: An exception was thrown during the encryption key exchange.
    at com.sas.iom.orb.brg.Engine.handleStatus(Engine.java:5023) ~[APP.jar:?]
    at com.sas.iom.orb.brg.Engine0200.flowSendReqs(Engine0200.java:188) ~[APP.jar:?]
    at com.sas.iom.orb.brg.Engine.flow(Engine.java:721) ~[APP.jar:?]
    at com.sas.iom.orb.brg.Engine.initClient(Engine.java:682) ~[APP.jar:?]
    at com.sas.iom.orb.brg.ORBImpl.uri_to_object(ORBImpl.java:114) ~[APP.jar:?]
    at com.sas.services.connection.ClusterEnvelope.createObject(ClusterEnvelope.java:395) ~[APP.jar:?]
    at com.sas.services.connection.ClusterEnvelope.getConnection(ClusterEnvelope.java:87) ~[APP.jar:?]
    at com.sas.services.connection.AggregationKernel.doGetConnection(AggregationKernel.java:242) ~[APP.jar:?]
    at com.sas.services.connection.ConnectionFactoryKernel.getConnection(ConnectionFactoryKernel.java:325) ~[APP.jar:?]
    at com.sas.services.connection.ConnectionFactoryShell.getConnection(ConnectionFactoryShell.java:69) ~[APP.jar:?]
    at com.sas.services.connection.ConnectionFactoryShell.getConnection(ConnectionFactoryShell.java:51) ~[APP.jar:?]
    at com.sas.rio.RIOUtil.getWorkspace(RIOUtil.java:1882) ~[APP.jar:?]
    at com.sas.rio.RIOUtil.<init>(RIOUtil.java:305) ~[APP.jar:?]
    at com.sas.rio.MVAConnection.<init>(MVAConnection.java:256) ~[APP.jar:?]
    at com.sas.rio.MVADriver.connect(MVADriver.java:289) ~[APP.jar:?]
    at com.mycom.jdbcSasConnection.createConnectionWithUsernamePasswordAuth(SasConnection.java:95) ~[APP.jar:?]
    at com.mycom.jdbcSasConnection.connect(SasConnection.java:68) ~[APP.jar:?]
    at com.mycom.datasource.SasDatasource.validate(SasDatasource.java:153) ~[APP.jar:?]\nCaused by: java.io.EOFException
gwootton
SAS Super FREQ
Does your classpath include the SAS/SECURE JAR files (sas.rutil.jar sas.rutil.nls.jar sastpj.rutil.jar)
--
Greg Wootton | Principal Systems Technical Support Engineer
r_alation
Calcite | Level 5

We have put those JARs in classpath in the client(where we are using JDBC driver), but we were getting a different error, I have asked customer to provide logs to know the exact error.

Meanwhile, can you please let us know if we need to put these 3 JARs in client only(the app which is using JDBC driver)? We observed that, customer's IT team was unable to locate these 3 JARs in SAS deployment "/<sas_home>/SASVersionedJarRepository/eclipse/plugins/", they found only "sas.rutil.nls.jar" file. Should the deployment must contain these 3 JARs? (Customer is on SAS 9.4)

gwootton
SAS Super FREQ
Correct, this would be done on the client side not the server side.

The file sas.rutil.nls.jar I don't think actually contains any classes, just additional language support. The sas.rutil.jar and sastpj.rutil.jar contain java classes.

You can check in the software depot under products/securejava__* to see if all the JAR files are there. I think they'd only make it to the JAR repository if they were installed from the depot.
--
Greg Wootton | Principal Systems Technical Support Engineer

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 1011 views
  • 0 likes
  • 3 in conversation