Could not connect to pg_dwh, check your JDBC connection information and credentials

I’m trying out Dremio Cloud and connecting to Posgres Database. I get the error Could not connect to pg_dwh, check your JDBC connection information and credentials. I know the credentials are correct because on able to connect using Dremio Software and PGAdmin from my local computer. I just want to know if am doing something wrong or it’s a bug/limitation in Dremio Cloud.

Thank you very much in advance for your help

Hi there!

Welcome to the Dremio Cloud community!

Have you looked over our docs page here for Postgres to see if there was anything you may have missed?


Yea that is what I used as a guide and followed everything. But it’s still not working


I’ve reached out to you over DM for more details to troubleshoot this issue. Looking forward to your response.


Hello Dan,
Thanks for sharing the requested information. I looked into the logs for your project ID and could see the below error messages:

message: "Exception while creating source."
stack_trace: "com.dremio.common.exceptions.UserException: Could not connect to pg_dwh, check your JDBC connection information and credentials
.Caused by: java.util.concurrent.ExecutionException: Preview engine unavailable
	at java.util.concurrent.CompletableFuture.reportGet(
	at java.util.concurrent.CompletableFuture.get(
	at com.dremio.exec.catalog.ManagedStoragePlugin.replacePlugin(
	at com.dremio.exec.catalog.ManagedStoragePlugin.createOrUpdateSource(
	... 76 common frames omitted
Caused by: Preview engine unavailable
	at com.dremio.exec.catalog.ManagedStoragePlugin.setLocals(
	at com.dremio.exec.catalog.ManagedStoragePlugin.lambda$newStartSupplier$2(
	at com.dremio.exec.catalog.ManagedStoragePlugin.lambda$nameSupplier$4(
	at java.util.concurrent.CompletableFuture$
	at java.util.concurrent.ThreadPoolExecutor.runWorker(
	at java.util.concurrent.ThreadPoolExecutor$
	... 1 common frames omitted

This error indicates that your Dremio Cloud preview engine is not enabled due to which you are facing issues while adding source.

In order to resolve this issue, please keep the Preview engine enabled while adding the postgress database source.

To enable to the preview engine, you can follow below steps:

  1. On the Project Settings page, click Engines in the sidebar menu. The list of engines in this project are displayed.
  2. Enable the engine by using the toggle in the Enabled column.
  3. Confirm that you want to enable the engine.

For more details on managing engines in Dremio Cloud, please refer to this document - Dremio

Hope this information helps. Let me know if the issue still persists.


Hi Gupta,
Thanks for the reply. However I’m still getting the same error. The preview engine was already enabled. I even added the following line to the Engine Routing to preview

query_type() IN ('JDBC', 'ODBC', 'UI Run', 'Flight')

Below is the screen shot of showing my enabled Preview enable.

Thanks again for your help so far




Thanks for being so patient as we looked into this issue for you. Upon further investigation of your organization, it looks like your preview engine is failing to scale up, hence the source add failure. We are seeing an error regarding your subnet being invalid/not existing.

Here is how to navigate to the error in the Dremio Cloud UI:

  1. Navigate to Settings → Project Settings → Engines
  2. Select the “preview” engine
  3. Select the “events” tab
  4. Under Description on the far right, hovering over the “Scaling Failed…” message shows this error

Scaling Failed. com.dremio.daas.ems.common.CloudNonRetriableException: The subnet ID ‘subnet-…’ does not exist (Service: Ec2, Status Code: 400, Request ID: …, Extended Request ID: null)

Can you double check your VPC environment in AWS and then try again? We have guidelines for subnets here: Dremio


Thank you very much. I was suspecting something wrong causing my engine not to start

Hi Dan,

No problem!

Once your engines are up and running, you can set your engine min replicas to “0” and disable your engines when not in use to save costs on the AWS side. They will incur EC2 costs even if there are no queries running so be sure to disable them when not in use!

Feel free to reach out if you need any additional help.