metabase-datomic icon indicating copy to clipboard operation
metabase-datomic copied to clipboard

Problem to connect a (non in-memory) database

Open erikkaplun opened this issue 5 years ago • 3 comments

that's all the information I get from Metabase...

connecting to the same DB from lein repl works fine.

DB URI from host: — datomic:free://localhost:4334/mbrainz-1968-1973 DB URI passed to setup page of Metabase running in docker: — datomic:free://docker.host.internal:4334/mbrainz-1968-1973

12-27 15:37:44 DEBUG middleware.log :: POST /api/setup/validate 400 18 ms (0 DB calls) 
{:message "Unable to connect to database."}

12-27 15:37:44 DEBUG middleware.log :: POST /api/setup/validate 400 19 ms (0 DB calls) 
{:message "Unable to connect to database."}

datomic-free transactor running with default configuration options (local, no username/password).

#7

erikkaplun avatar Dec 27 '19 17:12 erikkaplun

More details on our environment: Datomic runs on OS X host, Metabase runs inside Docker container (which is hosted by Docker.app). Issue doesn't seem to be in the firewall either, same error message pops up even when it is turned off.

Metabase is run using docker run --rm -ti --name metabase -p 3000:3000 lambdaisland/metabase-datomic

We've made sure that

  • Datomic actually listens on 0.0.0.0 so that containers can access them
  • Datomic can be accessed from Clojure (picking favourite lein project which utilizes Datomic and connecting to the remote database works fine)
  • Datomic server runs on Java 8 (doesn't seem to run on newer versions and breaks silently)

mikroskeem avatar Dec 27 '19 17:12 mikroskeem

I also tried with non-dockerized Metabase as per the instructions in the README, to no avail, still receiving the same 2 consecutive uninformative DEBUG messages:

12-27 19:52:15 DEBUG middleware.log :: POST /api/setup/validate 400 2.9 ms (0 DB calls) 
{:message "Unable to connect to database."}

12-27 19:52:15 DEBUG middleware.log :: POST /api/setup/validate 400 2.0 ms (0 DB calls) 
{:message "Unable to connect to database."}

erikkaplun avatar Dec 27 '19 17:12 erikkaplun

Scratch that, with java -jar metabase.jar and the datomic driver appropriately placed, it works. So the issue lies within the dockerized version.

erikkaplun avatar Dec 27 '19 18:12 erikkaplun