Skip to content

cannot connect to redshift from superset ui when using iam authentication #123

Closed
@mdeshmu

Description

@mdeshmu

Driver version

Redshift Python Driver 2.0.908

Redshift version

1.0.37493

Client Operating System

Linux-4.14.281-212.502.amzn2.x86_64-x86_64-with-glibc2.2.5

Python version

3.8.12

Problem description

I am trying to connect to redshift via redshift_connector using passwordless IAM Authentication.
It works fine when i directly login to ecs container where superset is hosted and create/execute the cursor but When i try to create a database connection from super ui then I am getting ConnectionRefusedError.

  1. Expected behaviour:
    Should be able to connect and query to Redshift from Superset UI

  2. Actual behaviour:
    Not able to connect to Redshift from Superset UI but can connect from the container where Superset container is running.

  3. Error message/stack trace:
    ERROR: (redshift_connector.error.InterfaceError) ('communication error', ConnectionRefusedError(111, 'Connection refused'))
    (Background on this error at: http://sqlalche.me/e/13/rvf5)

  4. Any other details that can be helpful:
    SQL Alchemy URL: redshift+redshift_connector:///<databasename>
    ENGINE PARAMETERS:

{
  "connect_args":
  {
  "ssl":"True",
  "region":"us-east-1",
  "iam":"True",
  "cluster_identifier":"<clusteridentifier>",
  "db_user":"<databaseuser>"
  }
}

I can telnet over 5439 to the redshift from ecs container as well as my local system.

Python Driver trace logs

driver-cursor

Reproduction code

please see in the comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions