Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Problem to connect a (non in-memory) database #8

Open
erikkaplun opened this issue Dec 27, 2019 · 3 comments
Open

Problem to connect a (non in-memory) database #8

erikkaplun opened this issue Dec 27, 2019 · 3 comments

Comments

@erikkaplun
Copy link

erikkaplun commented Dec 27, 2019

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

@mikroskeem
Copy link

mikroskeem commented Dec 27, 2019

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)

@erikkaplun
Copy link
Author

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
Copy link
Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants