hasan
October 18, 2019, 6:04am
5
@flamber
We were using metabase on a single instance and metadata was stored in locally in H2 database.
So we created postgres database and migrated that metadata from H2 database to postgres and it started working with 2 instances now .
Below are some links which I refered.
Configuring the Metabase application database The application database is where Metabase stores information about users, saved questions, dashboards, and any other data needed to run the application. The default settings use an embedded H2 database,...
Hi
I have been trying to migrate from the H2 database to my MySQL database however i get the following error when trying to do so:
Command failed with exception: No matching clause: :h2
Below is the complete log for your reference:
java -jar metabase.jar load-from-h2 /home/metabase/metabase.db
06-07 10:26:13 INFO metabase.util :: Loading Metabase...
06-07 10:26:26 INFO util.encryption :: DB details encryption is DISABLED for this Metabase instance.
06-07 10:26:41 INFO metabase.db :: Verify…
opened 09:38AM - 11 Aug 18 UTC
closed 04:06PM - 20 Aug 18 UTC
Type:Bug
Priority:P1
Operation/
Current metabase version is `0.29.3` and I have downloaded the latest version `0… .30`.
OS: Linux data-aggregator 4.9.0-6-amd64 #1 SMP Debian 4.9.88-1 (2018-04-29) x86_64 GNU/Linux
When I run the metabase I give the exception below:
```
08-11 09:32:45 INFO metabase.util :: Loading Metabase...
08-11 09:32:49 INFO util.encryption :: Saved credentials encryption is DISABLED for this Metabase instance. 🔓
For more information, see https://www.metabase.com/docs/latest/operations-guide/start.html#encrypting-your-database-connection-details-at-rest
08-11 09:32:58 INFO metabase.core :: Starting Metabase in STANDALONE mode
08-11 09:32:58 INFO metabase.core :: Launching Embedded Jetty Webserver with config:
{:port 3000}
08-11 09:32:58 INFO metabase.core :: Starting Metabase version v0.30.0 (04836dc release-0.30.0) ...
08-11 09:32:58 INFO metabase.core :: System timezone is 'Etc/UTC' ...
WARNING: any? already refers to: #'clojure.core/any? in namespace: monger.collection, being replaced by: #'monger.collection/any?
08-11 09:33:00 INFO metabase.core :: Setting up and migrating Metabase DB. Please sit tight, this may take a minute...
08-11 09:33:00 INFO metabase.db :: Verifying mysql Database Connection ...
08-11 09:33:01 INFO metabase.db :: Verify Database Connection ... ✅
08-11 09:33:01 INFO metabase.db :: Running Database Migrations...
08-11 09:33:01 INFO metabase.db :: Setting up Liquibase...
08-11 09:33:01 INFO metabase.db :: Liquibase is ready.
08-11 09:33:01 INFO metabase.db :: Checking if Database has unrun migrations...
08-11 09:33:05 INFO metabase.db :: Database has unrun migrations. Waiting for migration lock to be cleared...
08-11 09:33:07 WARN metabase.util :: auto-retry metabase.db$wait_for_migration_lock_to_be_cleared$fn__4775@599df260: Database has migration lock; cannot run migrations. You can force-release these locks by running `java -jar metabase.jar migrate release-locks`.
08-11 09:33:09 WARN metabase.util :: auto-retry metabase.db$wait_for_migration_lock_to_be_cleared$fn__4775@599df260: Database has migration lock; cannot run migrations. You can force-release these locks by running `java -jar metabase.jar migrate release-locks`.
08-11 09:33:11 WARN metabase.util :: auto-retry metabase.db$wait_for_migration_lock_to_be_cleared$fn__4775@599df260: Database has migration lock; cannot run migrations. You can force-release these locks by running `java -jar metabase.jar migrate release-locks`.
08-11 09:33:13 WARN metabase.util :: auto-retry metabase.db$wait_for_migration_lock_to_be_cleared$fn__4775@599df260: Database has migration lock; cannot run migrations. You can force-release these locks by running `java -jar metabase.jar migrate release-locks`.
08-11 09:33:15 WARN metabase.util :: auto-retry metabase.db$wait_for_migration_lock_to_be_cleared$fn__4775@599df260: Database has migration lock; cannot run migrations. You can force-release these locks by running `java -jar metabase.jar migrate release-locks`.
08-11 09:33:17 WARN metabase.util :: auto-retry metabase.db$run_schema_migrations_BANG_$fn__4851@5cc6f721: Database has migration lock; cannot run migrations. You can force-release these locks by running `java -jar metabase.jar migrate release-locks`.
08-11 09:33:17 INFO metabase.db :: Setting up Liquibase...
08-11 09:33:17 INFO metabase.db :: Liquibase is ready.
08-11 09:33:17 INFO metabase.db :: Checking if Database has unrun migrations...
08-11 09:33:19 INFO metabase.db :: Database has unrun migrations. Waiting for migration lock to be cleared...
08-11 09:33:21 WARN metabase.util :: auto-retry metabase.db$wait_for_migration_lock_to_be_cleared$fn__4775@55eb10c0: Database has migration lock; cannot run migrations. You can force-release these locks by running `java -jar metabase.jar migrate release-locks`.
08-11 09:33:23 WARN metabase.util :: auto-retry metabase.db$wait_for_migration_lock_to_be_cleared$fn__4775@55eb10c0: Database has migration lock; cannot run migrations. You can force-release these locks by running `java -jar metabase.jar migrate release-locks`.
08-11 09:33:25 WARN metabase.util :: auto-retry metabase.db$wait_for_migration_lock_to_be_cleared$fn__4775@55eb10c0: Database has migration lock; cannot run migrations. You can force-release these locks by running `java -jar metabase.jar migrate release-locks`.
08-11 09:33:27 WARN metabase.util :: auto-retry metabase.db$wait_for_migration_lock_to_be_cleared$fn__4775@55eb10c0: Database has migration lock; cannot run migrations. You can force-release these locks by running `java -jar metabase.jar migrate release-locks`.
08-11 09:33:29 WARN metabase.util :: auto-retry metabase.db$wait_for_migration_lock_to_be_cleared$fn__4775@55eb10c0: Database has migration lock; cannot run migrations. You can force-release these locks by running `java -jar metabase.jar migrate release-locks`.
08-11 09:33:31 ERROR metabase.core :: Metabase Initialization FAILED
java.lang.Exception: Database has migration lock; cannot run migrations. You can force-release these locks by running `java -jar metabase.jar migrate release-locks`.
at metabase.db$wait_for_migration_lock_to_be_cleared$fn__4775.invoke(db.clj:159)
at metabase.util$do_with_auto_retries.invokeStatic(util.clj:394)
at metabase.util$do_with_auto_retries.invoke(util.clj:386)
at metabase.util$do_with_auto_retries.invokeStatic(util.clj:398)
at metabase.util$do_with_auto_retries.invoke(util.clj:386)
at metabase.util$do_with_auto_retries.invokeStatic(util.clj:398)
at metabase.util$do_with_auto_retries.invoke(util.clj:386)
at metabase.util$do_with_auto_retries.invokeStatic(util.clj:398)
at metabase.util$do_with_auto_retries.invoke(util.clj:386)
at metabase.util$do_with_auto_retries.invokeStatic(util.clj:398)
at metabase.util$do_with_auto_retries.invoke(util.clj:386)
at metabase.util$do_with_auto_retries.invokeStatic(util.clj:398)
at metabase.util$do_with_auto_retries.invoke(util.clj:386)
at metabase.db$wait_for_migration_lock_to_be_cleared.invokeStatic(db.clj:154)
at metabase.db$wait_for_migration_lock_to_be_cleared.invoke(db.clj:150)
at metabase.db$migrate_up_if_needed_BANG_.invokeStatic(db.clj:175)
at metabase.db$migrate_up_if_needed_BANG_.invoke(db.clj:164)
at metabase.db$migrate_BANG_$fn__4818.invoke(db.clj:274)
at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:747)
at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:717)
at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:782)
at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:717)
at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:730)
at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:717)
at metabase.db$migrate_BANG_.invokeStatic(db.clj:262)
at metabase.db$migrate_BANG_.invoke(db.clj:243)
at metabase.db$run_schema_migrations_BANG_$fn__4851.invoke(db.clj:410)
at metabase.util$do_with_auto_retries.invokeStatic(util.clj:394)
at metabase.util$do_with_auto_retries.invoke(util.clj:386)
at metabase.util$do_with_auto_retries.invokeStatic(util.clj:398)
at metabase.util$do_with_auto_retries.invoke(util.clj:386)
at metabase.db$run_schema_migrations_BANG_.invokeStatic(db.clj:409)
at metabase.db$run_schema_migrations_BANG_.invoke(db.clj:392)
at metabase.db$setup_db_BANG_.invokeStatic(db.clj:428)
at metabase.db$setup_db_BANG_.doInvoke(db.clj:421)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at metabase.core$init_BANG_.invokeStatic(core.clj:161)
at metabase.core$init_BANG_.invoke(core.clj:138)
at metabase.core$start_normally.invokeStatic(core.clj:245)
at metabase.core$start_normally.invoke(core.clj:239)
at metabase.core$_main.invokeStatic(core.clj:265)
at metabase.core$_main.doInvoke(core.clj:260)
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)
08-11 09:33:31 INFO metabase.core :: Metabase Shutting Down ...
08-11 09:33:31 INFO metabase.core :: Metabase Shutdown COMPLETE
```
I have issued the below command to release locks, but got no success:
`java -jar metabase.jar migrate release-locks`
Why is this happening on `Metabase`. I'm using the previous version `0.29.3` for now.
Thanks for your help!
1 Like