Troubleshoot your Connection
  • 08 Aug 2023
  • 4 Minutes to read
  • Dark
    Light

Troubleshoot your Connection

  • Dark
    Light

Article Summary

Overview

As a Preset Admin, one of your first steps will be connecting a database to Preset so that team members can easily access data and build visualizations. Although we have made the database connection process as intuitive as possible, there are times when an error or misconfiguration may appear.

To help facilitate your success with Preset, we encourage you to read through the best practices and common connection scenarios described below.


Best Practices

Check #1: Database running?

Confirm that the database is publicly addressable and is currently up and running.

Check #2: Database supported?

Ensure that your database is supported by Preset. You can view a list of supported databases here.

Check #3: Have all connection details?

Preset can connect to a wide variety of databases, many of which require different types of information in order to make a connection. For example, Google Sheets requires a URL with specific sharing settings, Amazon Redshift requires a host and port, and nearly all databases can be connected to Preset via a SQLAlchemy URI.

Before trying to connect, we recommend that you take some time to read through the relevant connection walkthrough article in order to familiarize yourself with database-specific connection details.

Connection Walkthrough Articles

If you'd like to view the SQLAlchemy URI connection strings for all supported databases, please view the Connection Strings external-link_10x10 table for detailed information.


Common Errors

Timeout Errors

A timeout error may occur if you have not properly configured your firewall/network. Preset Cloud currently runs on four regions with the IPs listed below, and those need to be allowlisted so Preset can access your data.

Before starting, please take a moment to allowlist the IPs below based on the region that you're deployed in.

us-west-2 (us1a)us-east-1 (us2a)eu-north-1 (eu5a)ap-northeast-1 (ap1a)
35.161.45.1144.193.153.19613.48.95.335.74.159.67
54.244.23.8552.70.123.5213.51.212.16535.75.171.157
52.32.136.3454.83.88.9316.170.49.2452.193.196.211

If you are not sure where your Preset workspace is located, you can refer to the URL on your browser when accessing Preset. It should look like this: https://xxxxxxxx.us2a.app.preset.io/superset..., where us2a means it is in us-east-1.

Access is Denied

Is the username and password correct? Verify that the login credentials are accurate.

You may be required to enter a username and password when connecting your database to Preset. When entering connection details, please take note of the required Username and Password fields, such as the ones below from the PostgreSQL → Preset connection process:

DB_Username_and_Password2

Alternatively, the user credentials may be included in a SQLAlchemy URI string, such as this one used for a Dremio → Preset connection:

Dremio_Credentials

Some databases may require that access is granted on a per server basis. Check your database manual on how to grant SELECT permissions on your database.

Database Not Found or Cannot Connect

Not found?

If the database cannot be found, then your database or account name may be incorrect.

Cannot connect?

Verify that your host and port names are correct during configuration.

Always take note of the Host, Port, and Database Name (or Account) fields, such as the ones below used when configuring a MySQL → Preset connection.

MySQL_Host-Port-DB_Name

Tip: Dynamic Form Validation

  • Host field: Note that Preset dynamically verifies the name entered in the Host field to ensure it can be resolved, so please wait a moment after entering the host name to ensure name resolution.
  • Port field: Likewise, Preset validates the specified port number to ensure that it can be accessed. After entering a value, please wait a moment while Preset validates the entry.

Remember that some databases require additional information in order to connect, so pay attention to required fields while ensuring accuracy. For example, connections to a Snowflake database require Warehouse and Role fields.

Snowflake_Warehouse_Role

A note on authentication...

Some databases require extra steps in order to gather all of the required authentication details necessary to create a connection.

For example, connecting to a Databricks database requires the creation of an access token while Google BigQuery requires a JSON authentication key generated in the Google Cloud Platform Console.

Remember, if you don't find the answers you need in one of our walkthrough articles, please submit a support ticket for assistance.

SSL Connection is required

If you're having difficulty establishing a connection to your Redshift databse, try to add adding sslmode=verify-ca to the ADDITIONAL PARAMETERS field or toggling on SSL in case the database requires an SSL connection.
image.png


Connection Error Messages

Via dynamic form

When adding a database via the dynamic form, you will receive in-app error messages when an incorrect host is entered:

Error_Host_Name

...or an invalid port is entered:

Error_Port_is_Closed

Via SQLAlchemy URI

If connecting to a database using a SQLAlchemy URI, then any returned error messages will appear in the lower right corner of your screen.

Some of the more common errors for PostgreSQL and Snowflake connections include:

Incorrect database name

PostgreSQL
Error_PostgreSQL_Incorrect_DB_Name2

Snowflake
Error_Snowflake_Incorrect_DB_Name

Incorrect username

PostgreSQL
Error_PostgreSQL_Incorrect_Username

Snowflake
Error_Snowflake_Incorrect_Username

Incorrect password

PostgreSQL
Error_PostgreSQL_Incorrect_Password

Snowflake
Error_Snowflake_Incorrect_Password

Incorrect username and password

PostgreSQL
Error_PostgreSQL_Incorrect_Username_and_Password

Snowflake
Error_Snowflake_Incorrect_Username_and_Password

Incorrect warehouse and role (Snowflake)

Warehouse
Error_Snowflake_Incorrect_Warehouse

Role
Error_Snowflake_Incorrect_Role


Preset Issue Codes

If there is an issue when connecting your database, you will more than likely receive an issue code. Please feel free to view a list of all Preset Issue Codes for your reference — this information may also come in handy in the event that you need to discuss a connection issue with Preset Support.


What if I Need Help?

If you're still encountering issues when connecting your database to Preset, please let us know via a Support Ticket so that we can get you up & running as quickly as possible!


Was this article helpful?