3

I can not initialize the metabase setup, as I am getting error when connecting metabase to h2 db.

I did so far as below

1.Downloaded metabase.jar from here

2.From cmd prompt i executed java -jar metabase.jar

I am getting Below error

 04-25 12:03:07 INFO metabase.core :: Setting up and migrating Metabase DB. Please sit tight, this may take a minute...
04-25 12:03:07 INFO metabase.db :: Verifying h2 Database Connection ...
04-25 12:03:12 ERROR metabase.driver :: Failed to connect to database: Timed out after 5000 milliseconds.
java.lang.AssertionError: Assert failed: Unable to connect to Metabase h2 DB.
(binding [*allow-potentailly-unsafe-connections* true] (require (quote metabase.driver)) ((resolve (quote metabase.drive
r/can-connect-with-details?)) engine details))
        at metabase.db$verify_db_connection.invokeStatic(db.clj:320)
        at metabase.db$verify_db_connection.invoke(db.clj:313)
        at metabase.db$verify_db_connection.invokeStatic(db.clj:316)
        at metabase.db$verify_db_connection.invoke(db.clj:313)
        at metabase.db$setup_db_BANG_.invokeStatic(db.clj:368)
        at metabase.db$setup_db_BANG_.doInvoke(db.clj:362)
        at clojure.lang.RestFn.invoke(RestFn.java:421)
        at metabase.core$init_BANG_.invokeStatic(core.clj:102)
        at metabase.core$init_BANG_.invoke(core.clj:81)
        at metabase.core$start_normally.invokeStatic(core.clj:186)
        at metabase.core$start_normally.invoke(core.clj:180)
        at metabase.core$_main.invokeStatic(core.clj:278)
        at metabase.core$_main.doInvoke(core.clj:273)
        at clojure.lang.RestFn.invoke(RestFn.java:397)
        at clojure.lang.AFn.applyToHelper(AFn.java:152)
        at clojure.lang.RestFn.applyTo(RestFn.java:132)
        at metabase.core.main(Unknown Source)
04-25 12:03:12 ERROR metabase.core :: Metabase Initialization FAILED:  Assert failed: Unable to connect to Metabase h2 D
B.
(binding [*allow-potentailly-unsafe-connections* true] (require (quote metabase.driver)) ((resolve (quote metabase.drive
r/can-connect-with-details?)) engine details))
04-25 12:03:12 INFO metabase.core :: Metabase Shutting Down ...
04-25 12:03:12 INFO metabase.core :: Metabase Shutdown COMPLETE

Initially I didn't get an error. I did everything in metabase. After 2 days, when I tried the same, I am getting this error. Even after deleting everything and tried from start again and also with admin permisions. Nothing worked same error.

Supraj V
  • 967
  • 1
  • 10
  • 19

4 Answers4

0

Try Opening command prompt with admin credentials and run the below command

java -jar metabase.jar
Arjun R
  • 16
  • 6
0

this is because of your antivirus protects your system to get data from outside. please check firewalls are on. once you turn off. it will work. I have spent almost 2 days to solve this problem

Nasreen Ustad
  • 1,564
  • 1
  • 19
  • 24
0

I fixed this issue that I faced while upgrading from 0.44.6 to 0.46.6.4

what I did to fix it first I took backup from the old metabase.db.mv.db file

sudo systemctl stop metabase 
sudo mv metabase.db.mv.db metabase-old.db.mv.db
sudo mv metabase.jar metabase.jar.old
sudo curl -O https://downloads.metabase.com/v0.46.6.4/metabase.jar
sudo chown -R metabase:metabase /opt/metabase
sudo chmod -R 755 /opt/metabase
sudo cp  metabase-old.db.mv.db metabase.db.mv.db
sudo rm metabase.db.v1-backup.mv.db 
sudo systemctl start metabase
drpl
  • 141
  • 1
  • 4
-1

Try with root login: "sudo su - ". I faced the same issue and realised that I wasn't logged in as root user.

tgolisch
  • 6,549
  • 3
  • 24
  • 42