I'm trying to run Metabase on Cloud Run with Cloud SQL MySQL but when I push my service in Cloud Run the metabase database isn't initialized. The service running correctly I can access to the URL but the data are empty. But it's weird because Metabase create me 2 tables in the Database.
mysql> show tables;
+-----------------------+
| Tables_in_metabase |
+-----------------------+
| DATABASECHANGELOG |
| DATABASECHANGELOGLOCK |
+-----------------------+
One is empty and the other table got this:
+----+----------------+-------------+----------+
| ID | LOCKED | LOCKGRANTED | LOCKEDBY |
+----+----------------+-------------+----------+
| 1 | 0x00 | NULL | NULL |
+----+----------------+-------------+----------+
Here is my Dockerfile:
FROM metabase/metabase
ENV MB_DB_TYPE mysql
ENV MB_DB_DBNAME metabase
ENV MB_DB_PORT 3306
ENV MB_DB_USER root
ENV MB_DB_PASS mypass
ENV MB_DB_HOST my_public_ip
ENV METABASE_SQL_INSTANCE my_instance_name:tcp=3306
In the logs I can see this message:
INFO plugins.dependencies :: 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. See https://metabase.com/docs/latest/administration-guide/databases/vertica.html for more details.
And many rows like this :
Container Sandbox: Unsupported syscall UNKNOWN[439/0x1b7](0xffffffffffffff9c,0x3e695eddeb00,0x1,0x200,0x200,0x3e695eddeb00). It is very likely that you can safely ignore this message and that this is not the cause of any error you might be troubleshooting. Please, refer to https://gvisor.dev/docs/user_guide/compatibility/linux/amd64/UNKNOWN[439/0x1b7] for more information.
My other services running in Cloud Run can access to Cloud SQL without problem by using UNIX Socket but with the metabase service I don't know why it doesn't work. I don't use proxy cloud because my service is in the same project than the Cloud SQL instance.
I can see in the logs Metabase is shutting down
2022-03-11T12:03:46.253520Z
2022-03-11 12:03:46,253 INFO plugins.dependencies :: Metabase Vertica Driver dependency {:class com.vertica.jdbc.Driver} satisfied? false
2022-03-11T12:03:46.254049Z
2022-03-11 12:03:46,253 INFO plugins.dependencies :: e[33mPlugins with unsatisfied deps: ["Metabase Oracle Driver" "Metabase Vertica Driver"]e[0m
2022-03-11T12:03:46.254324Z
2022-03-11 12:03:46,254 INFO metabase.core :: Setting up and migrating Metabase DB. Please sit tight, this may take a minute...
2022-03-11T12:03:46.258288Z
2022-03-11 12:03:46,257 INFO db.setup :: e[36mVerifying mysql Database Connection ...e[0m
2022-03-11T12:03:47.182216Z
GET5031,62 Ko6 msChrome 98 https://metabase-bcsxqdqetq-ew.a.run.app/api/health
2022-03-11T12:03:47.325811Z
2022-03-11 12:03:47,325 INFO db.setup :: Successfully verified MySQL 5.7.36-google application database connection. ✅
2022-03-11T12:03:47.330113Z
2022-03-11 12:03:47,329 INFO db.setup :: Running Database Migrations...
2022-03-11T12:03:48.176763Z
GET5031,62 Ko5 msChrome 98 https://metabase-bcsxqdqetq-ew.a.run.app/api/health
2022-03-11T12:03:48.197788Z
2022-03-11 12:03:48,197 INFO db.setup :: Setting up Liquibase...
2022-03-11T12:03:48.222906Z
2022-03-11 12:03:48,222 INFO db.setup :: Liquibase is ready.
2022-03-11T12:03:48.223359Z
2022-03-11 12:03:48,223 INFO db.liquibase :: Checking if Database has unrun migrations...
2022-03-11T12:03:49.180371Z
GET5031,62 Ko6 msChrome 98 https://metabase-bcsxqdqetq-ew.a.run.app/api/health
2022-03-11T12:03:50.169448Z
GET5031,62 Ko8 msChrome 98 https://metabase-bcsxqdqetq-ew.a.run.app/api/health
2022-03-11T12:03:51.168973Z
GET5031,62 Ko7 msChrome 98 https://metabase-bcsxqdqetq-ew.a.run.app/api/health
2022-03-11T12:03:52.175088Z
GET5031,62 Ko6 msChrome 98 https://metabase-bcsxqdqetq-ew.a.run.app/api/health
2022-03-11T12:03:53.171036Z
GET5031,62 Ko7 msChrome 98 https://metabase-bcsxqdqetq-ew.a.run.app/api/health
2022-03-11T12:03:54.174932Z
GET5031,62 Ko5 msChrome 98 https://metabase-bcsxqdqetq-ew.a.run.app/api/health
2022-03-11T12:03:55.182729Z
GET5031,62 Ko8 msChrome 98 https://metabase-bcsxqdqetq-ew.a.run.app/api/health
GET5031,62 Ko7 msChrome 98 https://metabase-bcsxqdqetq-ew.a.run.app/api/health
2022-03-11 12:03:56,170 INFO metabase.core :: Metabase Shutting Down ...
2022-03-11T12:03:56.181639Z
2022-03-11 12:03:56,181 INFO metabase.server :: Shutting Down Embedded Jetty Webserver
Do you have an idea to help me please ?