SOS: Restart metabase via docker failed, and do migrate H2 to Mysql also get failed

Hi, thanks for building metabase, it's such a good product and we use if everyday for some dashboard displaying.

Today we see this process consume lot memory, so we decide to restart it. [actually we do restart our program in every several days/weeks]

this is the command we used to stop metabase: docker stop metabase && docker container rm metabase

this is the command we used to start metabase:

docker run -d -v /root/metabase/metabase_db:/metabase.db \ -v /root/metabase/metabase-data:/metabase-data \ --name metabase -e MB_DB_FILE=/metabase.db -p 9000:3000 metabase/metabase:v0.35.4

but when we run the start command, it raised some errors saying Database connection error java.util.concurrent.TimeoutException: Timed out after 5.0 s

After doing some googling, I see there are some solutions:

  1. some process is still using metabase db files, so I use lsof | grep metabase add don't see and process opening db files, so passed this reason.

  2. migrate h2 to mysql, from this link https://www.metabase.com/docs/latest/operations-guide/migrating-from-h2.html, I just download metabase.jar (version 0.35.4, same with my metabase version), and follow the tutorial, but still get an error saying Database connection error java.util.concurrent.TimeoutException: Timed out after 5.0 s

  3. I found this is caused by the db files, so I just start metabase from another new folder, everything is fine, but in this way I lost all my questions/dashboards and db configs, this hearts too much.

Can anyone please help me on this? now I'm stuck and don't know how to restore it to make it work. we have so many daily jobs rely on this.


bellow is the full error logs:

----> this is lsof log

root@ms003:~/metabase$ lsof | grep metabase
bash 3133 root cwd DIR 253,1 4096 2388253 /root/metabase
lsof 12554 root cwd DIR 253,1 4096 2388253 /root/metabase
grep 12555 root cwd DIR 253,1 4096 2388253 /root/metabase
lsof 12556 root cwd DIR 253,1 4096 2388253 /root/metabase
bash 15429 root cwd DIR 253,1 4096 2388253 /root/metabase

---> this is error log when I do migrate h2 to mysql

root@ms003:~/metabase$java -jar metabase.jar load-from-h2 /path/to/metabase.db
05-25 11:00:51 DEBUG plugins.classloader :: Using NEWLY CREATED classloader as shared context classloader: clojure.lang.DynamicClassLoader@14b0e127
05-25 11:00:51 INFO metabase.util :: Loading Metabase...
05-25 11:00:51 INFO metabase.util :: Maximum memory available to JVM: 3.9 GB
05-25 11:01:05 INFO util.encryption :: Saved credentials encryption is DISABLED for this Metabase instance. 
For more information, see https://metabase.com/docs/latest/operations-guide/encrypting-database-details-at-rest.html
05-25 11:01:11 WARN metabase.core :: WARNING: You have enabled namespace tracing, which could log sensitive information like db passwords.
05-25 11:01:11 INFO metabase.db :: Verifying mysql Database Connection ...
05-25 11:01:11 INFO driver.impl :: Registered abstract driver :sql 
Load driver :sql took 159.4 ms
05-25 11:01:11 INFO driver.impl :: Registered abstract driver :sql-jdbc (parents: [:sql]) 
Load driver :sql-jdbc took 170.0 ms
05-25 11:01:11 INFO driver.impl :: Registered driver :mysql (parents: [:sql-jdbc]) 
Load driver :mysql took 387.6 ms
05-25 11:01:11 INFO driver.impl :: Initializing driver :sql...
05-25 11:01:11 INFO driver.impl :: Initializing driver :sql-jdbc...
05-25 11:01:11 INFO driver.impl :: Initializing driver :mysql...
05-25 11:01:16 ERROR driver.util :: Database connection error
java.util.concurrent.TimeoutException: Timed out after 5.0 s
at metabase.util$deref_with_timeout.invokeStatic(util.clj:301)
at metabase.util$deref_with_timeout.invoke(util.clj:293)
at metabase.util$do_with_timeout.invokeStatic(util.clj:307)
at metabase.util$do_with_timeout.invoke(util.clj:304)
at metabase.driver.util$can_connect_with_details_QMARK_.invokeStatic(util.clj:29)
at metabase.driver.util$can_connect_with_details_QMARK_.doInvoke(util.clj:18)
at clojure.lang.RestFn.invoke(RestFn.java:442)
at clojure.lang.Var.invoke(Var.java:393)
at metabase.db$fn__21334$verify_db_connection__21343$fn__21346$fn__21347.invoke(db.clj:309)
at metabase.db$fn__21334$verify_db_connection__21343$fn__21346.invoke(db.clj:308)
at metabase.db$fn__21334$verify_db_connection__21343.invoke(db.clj:300)
at metabase.db$fn__21334$verify_db_connection__21343$fn__21344.invoke(db.clj:303)
at metabase.db$fn__21334$verify_db_connection__21343.invoke(db.clj:300)
at metabase.db$setup_db_BANG__STAR_$fn__21382.invoke(db.clj:345)
at metabase.util$do_with_us_locale.invokeStatic(util.clj:649)
at metabase.util$do_with_us_locale.invoke(util.clj:635)
at metabase.db$setup_db_BANG__STAR_.invokeStatic(db.clj:344)
at metabase.db$setup_db_BANG__STAR_.invoke(db.clj:339)
at metabase.db$setup_db_from_env_BANG__STAR_.invokeStatic(db.clj:354)
at metabase.db$setup_db_from_env_BANG__STAR_.invoke(db.clj:351)
at metabase.db$setup_db_BANG_$fn__21393.invoke(db.clj:368)
at metabase.db$setup_db_BANG_.invokeStatic(db.clj:366)
at metabase.db$setup_db_BANG_.invoke(db.clj:361)
at metabase.cmd.load_from_h2$load_from_h2_BANG_.invokeStatic(load_from_h2.clj:240)
at metabase.cmd.load_from_h2$load_from_h2_BANG_.invoke(load_from_h2.clj:234)
at clojure.lang.Var.invoke(Var.java:384)
at metabase.cmd$load_from_h2.invokeStatic(cmd.clj:37)
at metabase.cmd$load_from_h2.invoke(cmd.clj:30)
at clojure.lang.AFn.applyToHelper(AFn.java:154)
at clojure.lang.AFn.applyTo(AFn.java:144)
at clojure.core$apply.invokeStatic(core.clj:665)
at clojure.core$apply.invoke(core.clj:660)
at metabase.cmd$run_cmd$fn__67532.invoke(cmd.clj:127)
at metabase.cmd$run_cmd.invokeStatic(cmd.clj:127)
at metabase.cmd$run_cmd.invoke(cmd.clj:123)
at clojure.lang.Var.invoke(Var.java:388)
at metabase.core$run_cmd.invokeStatic(core.clj:133)
at metabase.core$run_cmd.invoke(core.clj:131)
at metabase.core$main.invokeStatic(core.clj:155)
at metabase.core$main.doInvoke(core.clj:150)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at metabase.core.main(Unknown Source)
java.lang.Exception: Timed out after 5.0 s
at metabase.driver.util$can_connect_with_details_QMARK
.invokeStatic(util.clj:35)
at metabase.driver.util$can_connect_with_details_QMARK
.doInvoke(util.clj:18)
at clojure.lang.RestFn.invoke(RestFn.java:442)
at clojure.lang.Var.invoke(Var.java:393)
at metabase.db$fn__21334$verify_db_connection__21343$fn__21346$fn__21347.invoke(db.clj:309)
at metabase.db$fn__21334$verify_db_connection__21343$fn__21346.invoke(db.clj:308)
at metabase.db$fn__21334$verify_db_connection__21343.invoke(db.clj:300)
at metabase.db$fn__21334$verify_db_connection__21343$fn__21344.invoke(db.clj:303)
at metabase.db$fn__21334$verify_db_connection__21343.invoke(db.clj:300)
at metabase.db$setup_db_BANG__STAR_$fn__21382.invoke(db.clj:345)
at metabase.util$do_with_us_locale.invokeStatic(util.clj:649)
at metabase.util$do_with_us_locale.invoke(util.clj:635)
at metabase.db$setup_db_BANG__STAR_.invokeStatic(db.clj:344)
at metabase.db$setup_db_BANG__STAR_.invoke(db.clj:339)
at metabase.db$setup_db_from_env_BANG__STAR_.invokeStatic(db.clj:354)
at metabase.db$setup_db_from_env_BANG__STAR_.invoke(db.clj:351)
at metabase.db$setup_db_BANG_$fn__21393.invoke(db.clj:368)
at metabase.db$setup_db_BANG_.invokeStatic(db.clj:366)
at metabase.db$setup_db_BANG_.invoke(db.clj:361)
at metabase.cmd.load_from_h2$load_from_h2_BANG_.invokeStatic(load_from_h2.clj:240)
at metabase.cmd.load_from_h2$load_from_h2_BANG_.invoke(load_from_h2.clj:234)
at clojure.lang.Var.invoke(Var.java:384)
at metabase.cmd$load_from_h2.invokeStatic(cmd.clj:37)
at metabase.cmd$load_from_h2.invoke(cmd.clj:30)
at clojure.lang.AFn.applyToHelper(AFn.java:154)
at clojure.lang.AFn.applyTo(AFn.java:144)
at clojure.core$apply.invokeStatic(core.clj:665)
at clojure.core$apply.invoke(core.clj:660)
at metabase.cmd$run_cmd$fn__67532.invoke(cmd.clj:127)
at metabase.cmd$run_cmd.invokeStatic(cmd.clj:127)
at metabase.cmd$run_cmd.invoke(cmd.clj:123)
at clojure.lang.Var.invoke(Var.java:388)
at metabase.core$run_cmd.invokeStatic(core.clj:133)
at metabase.core$run_cmd.invoke(core.clj:131)
at metabase.core$_main.invokeStatic(core.clj:155)
at metabase.core$main.doInvoke(core.clj:150)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at metabase.core.main(Unknown Source)
Caused by: java.util.concurrent.TimeoutException: Timed out after 5.0 s
at metabase.util$deref_with_timeout.invokeStatic(util.clj:301)
at metabase.util$deref_with_timeout.invoke(util.clj:293)
at metabase.util$do_with_timeout.invokeStatic(util.clj:307)
at metabase.util$do_with_timeout.invoke(util.clj:304)
at metabase.driver.util$can_connect_with_details_QMARK
.invokeStatic(util.clj:29)
... 37 more
Command failed with exception: Timed out after 5.0 s
root@ms003:~/metabase$

---> this is error log when I start metabase via docker

05-25 02:31:59 e[1mDEBUG plugins.classloadere[0m :: Using NEWLY CREATED classloader as shared context classloader: clojure.lang.DynamicClassLoader@459f703f
05-25 02:32:00 e[1mINFO metabase.utile[0m :: Loading Metabase...
05-25 02:32:00 e[1mINFO metabase.utile[0m :: Maximum memory available to JVM: 3.9 GB
05-25 02:32:10 e[1mINFO util.encryptione[0m :: Saved credentials encryption is DISABLED for this Metabase instance. :unlock:
For more information, see....
05-25 02:32:17 e[1mWARN metabase.coree[0m :: WARNING: You have enabled namespace tracing, which could log sensitive information like db passwords.
05-25 02:32:17 e[1mINFO metabase.coree[0m :: Starting Metabase in STANDALONE mode
05-25 02:32:17 e[1mINFO metabase.servere[0m :: Launching Embedded Jetty Webserver with config:
{:port 3000, :host "0.0.0.0"}

05-25 02:32:17 e[1mINFO metabase.coree[0m :: Starting Metabase version v0.35.4 (b3080fa release-0.35.x) ...
05-25 02:32:18 e[1mINFO metabase.coree[0m :: System info:
{"file.encoding" "UTF-8",
"java.runtime.name" "OpenJDK Runtime Environment",
"java.runtime.version" "11.0.7+10",
"java.vendor" "AdoptOpenJDK",
"java.vendor.url" "",
"java.version" "11.0.7",
"java.vm.name" "OpenJDK 64-Bit Server VM",
"java.vm.version" "11.0.7+10",
"os.name" "Linux",
"os.version" "4.4.0-151-generic",
"user.language" "en",
"user.timezone" "GMT"}

05-25 02:32:18 e[1mINFO metabase.pluginse[0m :: Loading plugins in /plugins...
e[32mExtract file /modules/sparksql.metabase-driver.jar -> /plugins/sparksql.metabase-driver.jar took 405.2 mse[0m
e[32mExtract file /modules/bigquery.metabase-driver.jar -> /plugins/bigquery.metabase-driver.jar took 4.9 mse[0m
e[32mExtract file /modules/sqlserver.metabase-driver.jar -> /plugins/sqlserver.metabase-driver.jar took 7.8 mse[0m
e[32mExtract file /modules/sqlite.metabase-driver.jar -> /plugins/sqlite.metabase-driver.jar took 17.2 mse[0m
e[32mExtract file /modules/vertica.metabase-driver.jar -> /plugins/vertica.metabase-driver.jar took 890.4 µse[0m
e[32mExtract file /modules/redshift.metabase-driver.jar -> /plugins/redshift.metabase-driver.jar took 14.7 mse[0m
e[32mExtract file /modules/presto.metabase-driver.jar -> /plugins/presto.metabase-driver.jar took 1.5 mse[0m
e[32mExtract file /modules/druid.metabase-driver.jar -> /plugins/druid.metabase-driver.jar took 3.5 mse[0m
e[32mExtract file /modules/mongo.metabase-driver.jar -> /plugins/mongo.metabase-driver.jar took 28.1 mse[0m
e[32mExtract file /modules/google.metabase-driver.jar -> /plugins/google.metabase-driver.jar took 6.7 mse[0m
e[32mExtract file /modules/oracle.metabase-driver.jar -> /plugins/oracle.metabase-driver.jar took 844.3 µse[0m
e[32mExtract file /modules/snowflake.metabase-driver.jar -> /plugins/snowflake.metabase-driver.jar took 161.2 mse[0m
e[32mExtract file /modules/googleanalytics.metabase-driver.jar -> /plugins/googleanalytics.metabase-driver.jar took 5.4 mse[0m
05-25 02:32:19 e[1mDEBUG plugins.lazy-loaded-drivere[0m :: e[35mRegistering lazy loading driver :presto...e[0m
05-25 02:32:19 e[1mINFO driver.imple[0m :: e[34mRegistered abstract driver :sqle[0m :truck:
e[32mLoad driver :sql took 142.4 mse[0m
05-25 02:32:19 e[1mINFO driver.imple[0m :: e[34mRegistered driver :prestoe[0m (parents: [:sql]) :truck:
05-25 02:32:19 e[1mDEBUG plugins.lazy-loaded-drivere[0m :: e[35mRegistering lazy loading driver :druid...e[0m
05-25 02:32:19 e[1mINFO driver.imple[0m :: e[34mRegistered driver :druide[0m :truck:
05-25 02:32:19 e[1mDEBUG plugins.lazy-loaded-drivere[0m :: e[35mRegistering lazy loading driver :hive-like...e[0m
05-25 02:32:19 e[1mINFO driver.imple[0m :: e[34mRegistered abstract driver :sql-jdbce[0m (parents: [:sql]) :truck:
e[32mLoad driver :sql-jdbc took 42.8 mse[0m
05-25 02:32:19 e[1mINFO driver.imple[0m :: e[34mRegistered abstract driver :hive-likee[0m (parents: [:sql-jdbc]) :truck:
05-25 02:32:19 e[1mDEBUG plugins.lazy-loaded-drivere[0m :: e[35mRegistering lazy loading driver :sparksql...e[0m
05-25 02:32:19 e[1mINFO driver.imple[0m :: e[34mRegistered driver :sparksqle[0m (parents: [:hive-like]) :truck:
05-25 02:32:19 e[1mINFO plugins.dependenciese[0m :: Plugin 'Metabase BigQuery Driver' depends on plugin 'Metabase Google Drivers Shared Dependencies'
05-25 02:32:19 e[1mINFO plugins.dependenciese[0m :: Metabase BigQuery Driver dependency {:plugin Metabase Google Drivers Shared Dependencies} satisfied? false
05-25 02:32:19 e[1mINFO plugins.dependenciese[0m :: e[33mPlugins with unsatisfied deps: ["Metabase BigQuery Driver"]e[0m
05-25 02:32:19 e[1mDEBUG plugins.lazy-loaded-drivere[0m :: e[35mRegistering lazy loading driver :redshift...e[0m
05-25 02:32:19 e[1mINFO driver.imple[0m :: e[34mRegistered driver :postgrese[0m (parents: [:sql-jdbc]) :truck:
e[32mLoad driver :postgres took 29.5 mse[0m
05-25 02:32:19 e[1mINFO driver.imple[0m :: e[34mRegistered driver :redshifte[0m (parents: [:postgres]) :truck:
05-25 02:32:19 e[1mDEBUG plugins.lazy-loaded-drivere[0m :: e[35mRegistering lazy loading driver :mongo...e[0m
05-25 02:32:19 e[1mINFO driver.imple[0m :: e[34mRegistered driver :mongoe[0m :truck:
05-25 02:32:19 e[1mDEBUG plugins.lazy-loaded-drivere[0m :: e[35mRegistering lazy loading driver :google...e[0m
05-25 02:32:19 e[1mINFO driver.imple[0m :: e[34mRegistered abstract driver :googlee[0m :truck:
05-25 02:32:19 e[1mINFO plugins.dependenciese[0m :: Metabase BigQuery Driver dependency {:plugin Metabase Google Drivers Shared Dependencies} satisfied? true
05-25 02:32:19 e[1mDEBUG plugins.initializee[0m :: e[33mDependencies satisfied; these plugins will now be loaded: ["Metabase BigQuery Driver"]e[0m
05-25 02:32:19 e[1mDEBUG plugins.lazy-loaded-drivere[0m :: e[35mRegistering lazy loading driver :bigquery...e[0m
05-25 02:32:19 e[1mINFO driver.imple[0m :: e[34mRegistered driver :bigquerye[0m (parents: [:sql :google]) :truck:
05-25 02:32:19 e[1mINFO plugins.dependenciese[0m :: e[31mMetabase cannot initialize plugin Metabase Oracle Driver due to required dependencies.e[0m Metabase requires the Oracle JDBC driver in order to connect to Oracle databases, but we can't ship it as part of Metabase due to licensing restrictions. See

05-25 02:32:19 e[1mINFO plugins.dependenciese[0m :: Metabase Oracle Driver dependency {:class oracle.jdbc.OracleDriver} satisfied? false
05-25 02:32:19 e[1mINFO plugins.dependenciese[0m :: e[33mPlugins with unsatisfied deps: ["Metabase Oracle Driver"]e[0m
05-25 02:32:19 e[1mINFO plugins.dependenciese[0m :: e[31mMetabase cannot initialize plugin Metabase Vertica Driver due to required dependencies.e[0m Metabase requires the Vertica JDBC driver in order to connect to Vertica databases, but we can't ship it as part of Metabase due to licensing restrictions.

05-25 02:32:19 e[1mINFO plugins.dependenciese[0m :: Metabase Vertica Driver dependency {:class com.vertica.jdbc.Driver} satisfied? false
05-25 02:32:19 e[1mINFO plugins.dependenciese[0m :: e[33mPlugins with unsatisfied deps: ["Metabase Oracle Driver" "Metabase Vertica Driver"]e[0m
05-25 02:32:19 e[1mINFO plugins.dependenciese[0m :: Plugin 'Metabase Google Analytics Driver' depends on plugin 'Metabase Google Drivers Shared Dependencies'
05-25 02:32:19 e[1mINFO plugins.dependenciese[0m :: Metabase Google Analytics Driver dependency {:plugin Metabase Google Drivers Shared Dependencies} satisfied? true
05-25 02:32:19 e[1mDEBUG plugins.lazy-loaded-drivere[0m :: e[35mRegistering lazy loading driver :googleanalytics...e[0m
05-25 02:32:19 e[1mINFO driver.imple[0m :: e[34mRegistered driver :googleanalyticse[0m (parents: [:google]) :truck:
05-25 02:32:19 e[1mDEBUG plugins.lazy-loaded-drivere[0m :: e[35mRegistering lazy loading driver :snowflake...e[0m
05-25 02:32:19 e[1mINFO driver.imple[0m :: e[34mRegistered driver :snowflakee[0m (parents: [:sql-jdbc]) :truck:
05-25 02:32:19 e[1mDEBUG plugins.lazy-loaded-drivere[0m :: e[35mRegistering lazy loading driver :sqlserver...e[0m
05-25 02:32:19 e[1mINFO driver.imple[0m :: e[34mRegistered driver :sqlservere[0m (parents: [:sql-jdbc]) :truck:
05-25 02:32:19 e[1mDEBUG plugins.lazy-loaded-drivere[0m :: e[35mRegistering lazy loading driver :sqlite...e[0m
05-25 02:32:19 e[1mINFO driver.imple[0m :: e[34mRegistered driver :sqlitee[0m (parents: [:sql-jdbc]) :truck:
05-25 02:32:19 e[1mINFO driver.imple[0m :: e[34mRegistered driver :h2e[0m (parents: [:sql-jdbc]) :truck:
05-25 02:32:19 e[1mINFO driver.imple[0m :: e[34mRegistered driver :mysqle[0m (parents: [:sql-jdbc]) :truck:
05-25 02:32:19 e[1mINFO metabase.coree[0m :: Setting up and migrating Metabase DB. Please sit tight, this may take a minute...
05-25 02:32:19 e[1mWARN metabase.dbe[0m :: e[31mWARNING: Using Metabase with an H2 application database is not recommended for production deployments. For production deployments, we highly recommend using Postgres, MySQL, or MariaDB instead. If you decide to continue to use H2, please be sure to back up the database file regularly. For more information, seehttps://metabase.com/docs/latest/operations-guide/migrating-from-h2.htmle[0m
05-25 02:32:19 e[1mINFO metabase.dbe[0m :: e[36mVerifying h2 Database Connection ...e[0m
05-25 02:32:19 e[1mINFO driver.imple[0m :: e[33mInitializing driver :sql...e[0m
05-25 02:32:19 e[1mINFO driver.imple[0m :: e[33mInitializing driver :sql-jdbc...e[0m
05-25 02:32:19 e[1mINFO driver.imple[0m :: e[33mInitializing driver :h2...e[0m
05-25 02:32:24 e[1mERROR driver.utile[0m :: Database connection error
java.util.concurrent.TimeoutException: Timed out after 5.0 s
at metabase.util$deref_with_timeout.invokeStatic(util.clj:301)
at metabase.util$deref_with_timeout.invoke(util.clj:293)
at metabase.util$do_with_timeout.invokeStatic(util.clj:307)
at metabase.util$do_with_timeout.invoke(util.clj:304)
at metabase.driver.util$can_connect_with_details_QMARK_.invokeStatic(util.clj:29)
at metabase.driver.util$can_connect_with_details_QMARK_.doInvoke(util.clj:18)
at clojure.lang.RestFn.invoke(RestFn.java:442)
at clojure.lang.Var.invoke(Var.java:393)
at metabase.db$fn__21334$verify_db_connection__21343$fn__21346$fn__21347.invoke(db.clj:309)
at metabase.db$fn__21334$verify_db_connection__21343$fn__21346.invoke(db.clj:308)
at metabase.db$fn__21334$verify_db_connection__21343.invoke(db.clj:300)
at metabase.db$fn__21334$verify_db_connection__21343$fn__21344.invoke(db.clj:303)
at metabase.db$fn__21334$verify_db_connection__21343.invoke(db.clj:300)
at metabase.db$setup_db_BANG__STAR_$fn__21382.invoke(db.clj:345)
at metabase.util$do_with_us_locale.invokeStatic(util.clj:649)
at metabase.util$do_with_us_locale.invoke(util.clj:635)
at metabase.db$setup_db_BANG__STAR_.invokeStatic(db.clj:344)
at metabase.db$setup_db_BANG__STAR_.invoke(db.clj:339)
at metabase.db$setup_db_from_env_BANG__STAR_.invokeStatic(db.clj:354)
at metabase.db$setup_db_from_env_BANG__STAR_.invoke(db.clj:351)
at metabase.db$setup_db_BANG_$fn__21393.invoke(db.clj:368)
at metabase.db$setup_db_BANG_.invokeStatic(db.clj:366)
at metabase.db$setup_db_BANG_.invoke(db.clj:361)
at metabase.core$init_BANG_.invokeStatic(core.clj:77)
at metabase.core$init_BANG_.invoke(core.clj:56)
at metabase.core$start_normally.invokeStatic(core.clj:123)
at metabase.core$start_normally.invoke(core.clj:117)
at metabase.core$main.invokeStatic(core.clj:156)
at metabase.core$main.doInvoke(core.clj:150)
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)
05-25 02:32:24 e[1mERROR metabase.coree[0m :: Metabase Initialization FAILED
java.lang.Exception: Timed out after 5.0 s
at metabase.driver.util$can_connect_with_details_QMARK
.invokeStatic(util.clj:35)
at metabase.driver.util$can_connect_with_details_QMARK
.doInvoke(util.clj:18)
at clojure.lang.RestFn.invoke(RestFn.java:442)
at clojure.lang.Var.invoke(Var.java:393)
at metabase.db$fn__21334$verify_db_connection__21343$fn__21346$fn__21347.invoke(db.clj:309)
at metabase.db$fn__21334$verify_db_connection__21343$fn__21346.invoke(db.clj:308)
at metabase.db$fn__21334$verify_db_connection__21343.invoke(db.clj:300)
at metabase.db$fn__21334$verify_db_connection__21343$fn__21344.invoke(db.clj:303)
at metabase.db$fn__21334$verify_db_connection__21343.invoke(db.clj:300)
at metabase.db$setup_db_BANG__STAR_$fn__21382.invoke(db.clj:345)
at metabase.util$do_with_us_locale.invokeStatic(util.clj:649)
at metabase.util$do_with_us_locale.invoke(util.clj:635)
at metabase.db$setup_db_BANG__STAR_.invokeStatic(db.clj:344)
at metabase.db$setup_db_BANG__STAR_.invoke(db.clj:339)
at metabase.db$setup_db_from_env_BANG__STAR_.invokeStatic(db.clj:354)
at metabase.db$setup_db_from_env_BANG__STAR_.invoke(db.clj:351)
at metabase.db$setup_db_BANG_$fn__21393.invoke(db.clj:368)
at metabase.db$setup_db_BANG_.invokeStatic(db.clj:366)
at metabase.db$setup_db_BANG_.invoke(db.clj:361)
at metabase.core$init_BANG_.invokeStatic(core.clj:77)
at metabase.core$init_BANG_.invoke(core.clj:56)
at metabase.core$start_normally.invokeStatic(core.clj:123)
at metabase.core$start_normally.invoke(core.clj:117)
at metabase.core$_main.invokeStatic(core.clj:156)
at metabase.core$main.doInvoke(core.clj:150)
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)
Caused by: java.util.concurrent.TimeoutException: Timed out after 5.0 s
at metabase.util$deref_with_timeout.invokeStatic(util.clj:301)
at metabase.util$deref_with_timeout.invoke(util.clj:293)
at metabase.util$do_with_timeout.invokeStatic(util.clj:307)
at metabase.util$do_with_timeout.invoke(util.clj:304)
at metabase.driver.util$can_connect_with_details_QMARK
.invokeStatic(util.clj:29)
... 28 more
05-25 02:32:24 e[1mINFO metabase.coree[0m :: Metabase Shutting Down ...
05-25 02:32:24 e[1mINFO metabase.servere[0m :: Shutting Down Embedded Jetty Webserver
05-25 02:32:24 e[1mINFO metabase.coree[0m :: Metabase Shutdown COMPLETE

Hi @taotaoli

Metabase uses UID/GID 2000 for reading files via Docker by default, so the referenced volume directories/files needs to be accessible (read and possible write depending on the file) by that user.
I'm not sure if /root/metabase/metabase_db is a file or a directory.

I would highly recommend that you migrate away from H2 if you're using Metabase in production.
You need to replace /path/to/metabase.db with the actual location of your H2, so that might be something like /root/metabase/metabase_db/metabase.db.
And I'm guessing that you're setting the environment variables pointing to MySQL.