Database Connection Errors with Amazon Redshift

I’ve tried three different installs of Metabase without success. I currently have two installs up, one via AWS’s quick installation and another using Cloudron.io. Each is able to successfully connect to the Database and see the groups and tables in the SB. However, when I try to look at a table in Metabase an error is given.

The cloudron install’s error is: [Amazon](500310) Invalid operation: permission denied for relation actions; (I believe the permissions are set up correctly on the DB though because using the same user account I can access the table data via other interfaces.)

The AWS install’s error is: Distinct, non-empty sequence of Field clauses

Any assistance would be greatly appreciated. I’m at a dead-end here.

Hi @GregSchwedock
Please post “Diagnostic Info” from Admin > Troubleshooting.
And check Admin > Troubleshooting > Logs for more detailed errors.
The error comes from Redshift (or the driver), so it is most likely incorrect permissions setup.
I’m not sure which “other interfaces” you’re referring to, but I would recommend that you try with dbeaver.io

Diagnostic info for the AWS elastic beanstalk quick install :
{
“browser-info”: {
“language”: “en-US”,
“platform”: “MacIntel”,
“userAgent”: “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36”,
“vendor”: “Google Inc.”
},
“system-info”: {
“file.encoding”: “UTF-8”,
“java.runtime.name”: “OpenJDK Runtime Environment”,
“java.runtime.version”: “11.0.7+10”,
“java.vendor”: “AdoptOpenJDK”,
“java.vendor.url”: “https://adoptopenjdk.net/”,
“java.version”: “11.0.7”,
“java.vm.name”: “OpenJDK 64-Bit Server VM”,
“java.vm.version”: “11.0.7+10”,
“os.name”: “Linux”,
“os.version”: “4.14.181-140.257.amzn2.x86_64”,
“user.language”: “en”,
“user.timezone”: “GMT”
},
“metabase-info”: {
“databases”: [
“redshift”,
“h2”
],
“hosting-env”: “elastic-beanstalk”,
“application-database”: “postgres”,
“application-database-details”: {
“database”: {
“name”: “PostgreSQL”,
“version”: “12.3”
},
“jdbc-driver”: {
“name”: “PostgreSQL JDBC Driver”,
“version”: “42.2.8”
}
},
“run-mode”: “prod”,
“version”: {
“date”: “2020-05-28”,
“tag”: “v0.35.4”,
“branch”: “release-0.35.x”,
“hash”: “b3080fa”
},
“settings”: {
“report-timezone”: null
}
}
}

By “other interfaces” I mean for example command line psql. Thus it doesn’t “seem” to be a permissions issue.

@GregSchwedock Are you using Spectrum external tables? If yes, then that was added in 0.36.x - latest release is 0.37.0.2, so try that. Remember to backup before upgrading.

Diagnostic info for the cloudron install:
{
“browser-info”: {
“language”: “en-US”,
“platform”: “MacIntel”,
“userAgent”: “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36”,
“vendor”: “Google Inc.”
},
“system-info”: {
“file.encoding”: “ANSI_X3.4-1968”,
“java.runtime.name”: “OpenJDK Runtime Environment”,
“java.runtime.version”: “11.0.8+10-post-Ubuntu-0ubuntu118.04.1”,
“java.vendor”: “Ubuntu”,
“java.vendor.url”: “https://ubuntu.com/”,
“java.version”: “11.0.8”,
“java.vm.name”: “OpenJDK 64-Bit Server VM”,
“java.vm.version”: “11.0.8+10-post-Ubuntu-0ubuntu118.04.1”,
“os.name”: “Linux”,
“os.version”: “5.3.0-1023-aws”,
“user.language”: “en”,
“user.timezone”: “Etc/UTC”
},
“metabase-info”: {
“databases”: [
“redshift”,
“h2”
],
“hosting-env”: “unknown”,
“application-database”: “postgres”,
“application-database-details”: {
“database”: {
“name”: “PostgreSQL”,
“version”: “11.9 (Ubuntu 11.9-1.pgdg18.04+1)”
},
“jdbc-driver”: {
“name”: “PostgreSQL JDBC Driver”,
“version”: “42.2.8”
}
},
“run-mode”: “prod”,
“version”: {
“date”: “2020-10-23”,
“tag”: “v0.37.0.1”,
“branch”: “release-x.37.x”,
“hash”: “13dd8f9”
},
“settings”: {
“report-timezone”: null
}
}
}

Thanks @flamber! An upgrade to 37.0.2 appears to have done it!

@GregSchwedock There isn’t any changes between 0.37.0.1 and 0.37.0.2 in regards to Redshift, and I don’t know which instance you were seeing that on, but when you add a database, then it takes some time to sync+scan it first time and until that is done, then it’s not possible to browse the tables of that database.
https://github.com/metabase/metabase/issues/11354 - upvote by clicking :+1: on the first post