Can't view tables [work around found]

  "browser-info": {
    "language": "en-GB",
    "platform": "Win32",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36",
    "vendor": "Google Inc."
  "system-info": {
    "": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.3+7",
    "java.vendor": "AdoptOpenJDK",
    "java.vendor.url": "",
    "java.version": "11.0.3",
    "": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.3+7",
    "": "Linux",
    "os.version": "4.9.184-linuxkit",
    "user.language": "en",
    "user.timezone": "GMT"
  "metabase-info": {
    "databases": [
    "hosting-env": "unknown",
    "application-database": "h2",
    "run-mode": "prod",
    "version": {
      "date": "2019-11-19",
      "tag": "v0.33.6",
      "branch": "release-0.33.x",
      "hash": "be1e0e1"
    "settings": {
      "report-timezone": null

I am running metabase in a docker container on Windows 10 to connect to a PostgreSQL with an SSH tunnel. docker run -d -p 3000:3000 --name metabase metabase/metabase

I am able to run SQL queries and get a return of data although after a while I get a connection failed message and I have to save the Database connection settings without making changes to get the SSH tunnel to work again.

I also have the full list of tables but when I try and view a table or ask a question I get the error: Distinct, non-empty sequence of Field clauses

How would I go about solving this?

I think the associated logs are:

[68965bc5-dabe-4e26-b2c3-908b7b1fd57e] 2019-12-03T12:34:10+00:00 DEBUG metabase.middleware.log GET /api/table/12/query_metadata 200 2.9 ms (8 DB calls) Jetty threads: 4/50 (3 idle, 0 queued) (79 total active threads) Queries in flight: 0
[68965bc5-dabe-4e26-b2c3-908b7b1fd57e] 2019-12-03T12:34:10+00:00 DEBUG metabase.middleware.log GET /api/table/12/fks 200 2.1 ms (4 DB calls) Jetty threads: 5/50 (3 idle, 1 queued) (79 total active threads) Queries in flight: 0
[68965bc5-dabe-4e26-b2c3-908b7b1fd57e] 2019-12-03T12:34:10+00:00 WARN metabase.query-processor.middleware.process-userland-query Query failure {:status :failed,
:class clojure.lang.ExceptionInfo,
:error "Distinct, non-empty sequence of Field clauses",
("--> query_processor.middleware.add_implicit_clauses$fn__35061$sorted_implicit_fields_for_table__35066.invoke(add_implicit_clauses.clj:47)"
{:type "query",
:query {:source-table 12},
:parameters [],
:async? true,
:middleware {:add-default-userland-constraints? true, :userland-query? true},
{:executed-by 1,
:context :ad-hoc,
:card-id nil,
:nested? false,
:query-hash [30, -85, -85, 41, 18, 114, 45, -77, 73, -73, 1, -115, -34, 41, -9, 30, 109, -16, 70, -3, -97, 6, 3, -123, 81, -57, -38, 110, -51, 43, 99, 89]},
:constraints {:max-results 10000, :max-results-bare-rows 2000}},
:preprocessed nil,
:native nil,
:ex-data {:type :schema.core/error, :value (), :error (named (not ("Non-empty" a-clojure.lang.LazySeq)) "Distinct, non-empty sequence of Field clauses")}}

Hi @mdodhia
There’s something strange going on, when connecting over SSH. If possible, try to manually create the SSH tunnel instead of using the Metabase configuration option. You’re likely seeing this issue: - upvote by clicking :+1: on the first post

1 Like

Thanks for the reply, I’ll give that a try and report back

I’m now able to see the table data.

For those with this problem or similar problems in the future I just wanted to write down my steps.

I currently use Bitvise SSH client on Windows to connect to my SSH tunnel.

I committed the metabase container with: docker commit metabase metabase2 .

I then ran a new container exposing an extra port for the database connection: docker run -p 3000:3000 -p 5432:5432 -td metabase2

When putting in the IP address of the database instead of localhost I used host.docker.internal

Everything seems to be working which means the problem is most likely metabase’s SSH tunnel implementation. Now I just need to work out the best way of creating the SSH tunnel without using Bitvise.

1 Like