SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

Getting error while testing Athena JDBC/ODBC bridge connectivity as suggested by JBailey

Reply
Occasional Contributor
Posts: 5

Getting error while testing Athena JDBC/ODBC bridge connectivity as suggested by JBailey

[ Edited ]

Hi JBailey

 

MY TASK : Configure SAS Application to access AWS S3 bucket by using Athena jdbc/odbc driver     

 

Tried below ways : 

Step -1 : Athena ODBC driver -- Failed ( SAS Says currently no plug-in available  )

Step -2 : Athena JDBC driver -- Failed ( Proxy connectivity issue -- as we are connecting through proxy server )

 

Note: by using AWS CLI we successfully connected to AWS S3 bucket. 

 

Finally :

as you suggested Contacted progress.com for ODBC to JDBC bridges. installed the software while testing the connection getting below error

 

Please help me to resolve this connectivity issue, and let me know if you need more information on this.

Our Environment details :

SAS Version : SAS 9.4 M3 

Linux : RHEL 6.7

 

ERROR MESSAGE : 

 

log4j:WARN No appenders could be found for logger (com.simba.athena.amazonaws.AmazonWebServiceClient).

log4j:WARN Please initialize the log4j system properly.

log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

java.sql.SQLException: [Simba][AthenaJDBC](100071) An error has been thrown from the AWS Athena client. The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.

        at com.simba.athena.athena.api.AJClient.checkAndThrowException(Unknown Source)

        at com.simba.athena.athena.api.AJClient.executeQuery(Unknown Source)

        at com.simba.athena.athena.api.AJClient.checkAthenaConnection(Unknown Source)

        at com.simba.athena.athena.api.AJClient.<init>(Unknown Source)

        at com.simba.athena.athena.core.AJConnection.connect(Unknown Source)

        at com.simba.athena.jdbc.common.BaseConnectionFactory.doConnect(Unknown Source)

        at com.simba.athena.jdbc.common.AbstractDriver.connect(Unknown Source)

        at java.sql.DriverManager.getConnection(DriverManager.java:664)

        at java.sql.DriverManager.getConnection(DriverManager.java:247)

        at oajava.passjdbc.jdbcutil.connect(jdbcutil.java:35)

Caused by: com.simba.athena.support.exceptions.GeneralException: [Simba][AthenaJDBC](100071) An error has been thrown from the AWS Athena client. The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.

        ... 10 more

Caused by: com.simba.athena.amazonaws.services.athena.model.AmazonAthenaException: The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details. (Service: AmazonAthena; Status Code: 400; Error Code: InvalidSignatureException; Request ID: fd368828-5cdc-11e8-b635-2b0a69392482)

        at com.simba.athena.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1639)

        at com.simba.athena.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1304)

        at com.simba.athena.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1056)

        at com.simba.athena.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:743)

        at com.simba.athena.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:717)

        at com.simba.athena.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:699)

        at com.simba.athena.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:667)

        at com.simba.athena.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:649)

        at com.simba.athena.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:513)

        at com.simba.athena.amazonaws.services.athena.AmazonAthenaClient.doInvoke(AmazonAthenaClient.java:802)

        at com.simba.athena.amazonaws.services.athena.AmazonAthenaClient.invoke(AmazonAthenaClient.java:778)

        at com.simba.athena.amazonaws.services.athena.AmazonAthenaClient.executeStartQueryExecution(AmazonAthenaClient.java:684)

        at com.simba.athena.amazonaws.services.athena.AmazonAthenaClient.startQueryExecution(AmazonAthenaClient.java:660)

        at com.simba.athena.athena.api.AJClient.executeQuery(Unknown Source)

        at com.simba.athena.athena.api.AJClient.checkAthenaConnection(Unknown Source)

        at com.simba.athena.athena.api.AJClient.<init>(Unknown Source)

        at com.simba.athena.athena.core.AJConnection.connect(Unknown Source)

        at com.simba.athena.jdbc.common.BaseConnectionFactory.doConnect(Unknown Source)

        at com.simba.athena.jdbc.common.AbstractDriver.connect(Unknown Source)

        at java.sql.DriverManager.getConnection(DriverManager.java:664)

        at java.sql.DriverManager.getConnection(DriverManager.java:247)

        at oajava.passjdbc.jdbcutil.connect(jdbcutil.java:35)

        at oajava.passjdbc.dbpassjdbc.ipConnect(dbpassjdbc.java:311)

SQLSTATE = IM002

NATIVE ERROR = 10101

MSG = [DataDirect][ODBC OpenAccess SDK driver][OpenAccess SDK SQL Engine]java.sql.SQLException: [Simba][AthenaJDBC](100071) An error has been thrown from the AWS Athena client. The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.[10101]

SAS Employee
Posts: 272

Re: Getting error while testing Athena JDBC/ODBC bridge connectivity as suggested by JBailey

Posted in reply to srinivask

Hi @srinivask

 

It looks like a problem with the AWS credentials. Are you sure they are up-to-date?

 

Best wishes,
Jeff

 

 

Occasional Contributor
Posts: 5

Re: Getting error while testing Athena JDBC/ODBC bridge connectivity

Hi Jeff , 

 

Thanks for your response.

 

yes , the credential we are using working fine. tested  through AWS CLI we are able to connect s3 bucket and list the objects.

 

Currently getting below error :

 

SQLSTATE = HY000
NATIVE ERROR = 100211
MSG = [DataDirect][ODBC OpenAccess SDK driver][OpenAccess SDK SQL Engine][JDBC Driver][Simba][AthenaJDBC](100211) Missing credentials error: Either UID/PWD or AwsCredentialsProviderClass must be provided.

SAS Employee
Posts: 272

Re: Getting error while testing Athena JDBC/ODBC bridge connectivity

[ Edited ]
Posted in reply to srinivask

Hi @srinivask,

 

The error message looks like the driver can't find the credentials. Are your credentials stored in ~/.aws/credentials directory? If so, can you share the environment variables that are stored in the credentials directory. Not the values - variable names only.

 

This doc (page 32) may help: https://s3.amazonaws.com/athena-downloads/drivers/ODBC/Simba+Athena+ODBC+Install+and+Configuration+G...

 

Then again, there may be something on the DataDirect ODBC -> JDBC bridge happening.

 

Best wishes,
Jeff

 

Occasional Contributor
Posts: 5

Re: Getting error while testing Athena JDBC/ODBC bridge connectivity

Hi Jeff,

 

attributes under ---   ~/.aws/credentials

 

[default]
aws_access_key_id = xxxxxxxxxxxxxx
aws_secret_access_key = xxxxxxxxxxxxx

SAS Employee
Posts: 272

Re: Getting error while testing Athena JDBC/ODBC bridge connectivity

Posted in reply to srinivask

Hi @srinivask

 

Were you able to get this to work?

Ask a Question
Discussion stats
  • 5 replies
  • 191 views
  • 0 likes
  • 2 in conversation