Troubleshoot your Connection
  • 26 Jul 2022
  • 4 Minutes to read
  • Contributors
  • Dark
    Light

Troubleshoot your Connection

  • Dark
    Light

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 us-east-1 eu-north-1 ap-northeast-1
35.161.45.11 44.193.153.196 13.48.95.3 35.74.159.67
54.244.23.85 52.70.123.52 13.51.212.165 35.75.171.157
52.32.136.34 54.83.88.93 16.170.49.24 52.193.196.211

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.


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?