tagomoris / presto-client-node

Distributed query engine Presto client library for node.js
MIT License
125 stars 57 forks source link

v. 0.6.0 issues connecting to Presto Starbust 302-E.11-AWS #30

Closed cnantoninor closed 5 years ago

cnantoninor commented 5 years ago

We are trying to access Presto Starbust version 302-E.11-AWS. Using the same credentials with presto-cli-302 we are able to access but with presto-client we are getting the following error:

{
  message: 'Access Denied: Cannot select from table copilot_api.ad_content',
  errorCode: 4,
  errorName: 'PERMISSION_DENIED',
  errorType: 'USER_ERROR',
  failureInfo: {
    type: 'io.prestosql.spi.security.AccessDeniedException',
    message: 'Access Denied: Cannot select from table copilot_api.ad_content',
    suppressed: [],
    stack: [
      'io.prestosql.spi.security.AccessDeniedException.denySelectTable(AccessDeniedException.java:176)',
      'io.prestosql.spi.security.AccessDeniedException.denySelectTable(AccessDeniedException.java:171)',
      'io.prestosql.plugin.hive.security.SqlStandardAccessControl.checkCanSelectFromColumns(SqlStandardAccessControl.java:204)',
      'io.prestosql.plugin.base.security.ForwardingConnectorAccessControl.checkCanSelectFromColumns(ForwardingConnectorAccessControl.java:153)',
      'io.prestosql.plugin.hive.security.PartitionsAwareAccessControl.checkCanSelectFromColumns(PartitionsAwareAccessControl.java:141)',
      'io.prestosql.security.AccessControlManager.lambda$checkCanSelectFromColumns$66(AccessControlManager.java:617)',
      'io.prestosql.security.AccessControlManager.authorizationCheck(AccessControlManager.java:802)',
      'io.prestosql.security.AccessControlManager.checkCanSelectFromColumns(AccessControlManager.java:617)',
      'io.prestosql.sql.analyzer.Analyzer.lambda$null$0(Analyzer.java:81)',
      'java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)',
      'io.prestosql.sql.analyzer.Analyzer.lambda$analyze$1(Analyzer.java:80)',
      'java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)',
      'io.prestosql.sql.analyzer.Analyzer.analyze(Analyzer.java:79)',
      'io.prestosql.sql.analyzer.Analyzer.analyze(Analyzer.java:68)',
      'io.prestosql.execution.SqlQueryExecution.<init>(SqlQueryExecution.java:211)',
      'io.prestosql.execution.SqlQueryExecution.<init>(SqlQueryExecution.java:98)',
      'io.prestosql.execution.SqlQueryExecution$SqlQueryExecutionFactory.createQueryExecution(SqlQueryExecution.java:761)',
      'io.prestosql.execution.SqlQueryManager.createQueryInternal(SqlQueryManager.java:361)',
      'io.prestosql.execution.SqlQueryManager.lambda$createQuery$4(SqlQueryManager.java:303)',
      'io.prestosql.$gen.Presto_302_e_11_aws____20190802_153802_1.run(Unknown Source)',
      'java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)',
      'java.util.concurrent.FutureTask.run(FutureTask.java:266)',
      'java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)',
      'java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)',
      'java.lang.Thread.run(Thread.java:748)'
    ]
  }

Can you please specify what version of Presto is supported by presto-client 0.6.0?

tagomoris commented 5 years ago

We don't track compatibility for Presto versions. And I have no idea about the versions of Starburst Presto... Can you confirm presto-client v0.6.0 works with latest (or your target version) Presto or not?

cnantoninor commented 5 years ago

Got it @tagomoris . v0.6.0 seems to not work with v. 302 (https://prestosql.io/docs/current/release/release-302.html)

cnantoninor commented 5 years ago

Actually this turned out to not be an issue on presto-client side but on permissions. v.0.6.0 works fine with Presto v.302, sorry for the false-positive @tagomoris .

tagomoris commented 5 years ago

@cnantoninor I see. Thank you for confirmation!