Problem deploying Metabase with Google App Engine

Hi guys,
I am new here, so I have problem deploying Metabase I have this console error.
INFO metabase.driver :: Registered abstract driver :sql ?
My whole problem is described on this link Any suggestions or solutions are welcomed

Hi @hshurbeski
That’s an old version of Metabase. Latest is 0.36.6
Try looking at comments in these issues:
https://github.com/metabase/metabase/issues?q=is%3Aissue+gcr.io%2Fgoogle-appengine%2Fopenjdk+is%3Aclosed

1 Like

Hi @flamber
I tried this https://github.com/metabase/metabase/issues/12549#issuecomment-638210783
And i got the following error: Application startup error! Code: APP_CONTAINER_CRASHED
Start command: java -XX:+IgnoreUnrecognizedVMOptions -Dfile.encoding=UTF-8 --add-opens=java.base/java.net=ALL-UNNAMED --add-modules=java.xml.bind -Djava.awt.headless=true -Djavax.accessibility.assistive_technologies=
java.lang.Object -jar app.jar
Error: Unable to access jarfile app.jar
Any suggestions what could be wrong?

@hshurbeski What is app.jar ? Is that supposed to be the metabase.jar? You should probably post the entire script too instead of just the error.

I solved it, I just changed the version of metabase!

@hshurbeski Then please post your final configurations, so others can learn from that.

  1. MAKE SURE YOU HAVE CLOUD SQL API AND CLOUD SQL ADMIN API ENABLED ON THE PROJECT. MAKE A NEW COMPUTE ENGINE VM INSTANCE, AND SQL DATABSE INSTANCE, ADD THE PUBLIC IP FROM THE VM IN THE DATABASE INSTANCE AS PUBLIC AUTORIZED IP NETWORK
  2. MAKE A NEW DATABASE WITH PASSWORD - CONNECT TO THE DATABASE WITH SSH (OVERVIEW - >CONNECT TO INSTANCE) - > AND MAKE A NEW USER WITH POSTGRESQL, SAVE THE USERNAME AND PASSWORD

DOCKERFILE

FROM gcr.io/google-appengine/openjdk

EXPOSE 8080

ENV PORT 8080
ENV MB_PORT 8080
ENV MB_JETTY_PORT 8080
ENV MB_DB_PORT 5432
ENV METABASE_SQL_INSTANCE instance-name=tcp:5432
ENV JAVA_OPTS “-XX:+IgnoreUnrecognizedVMOptions -Dfile.encoding=UTF-8 --add-opens=java.base/java.net=ALL-UNNAMED --add-modules=java.xml.bind”

ADD https://dl.google.com/cloudsql/cloud_sql_proxy.linux.amd64 ./cloud_sql_proxy
ADD http://downloads.metabase.com/v0.36.6/metabase.jar ./metabase.jar

RUN chmod +x ./cloud_sql_proxy

CMD ./cloud_sql_proxy -instances=$METABASE_SQL_INSTANCE=tcp:$MB_DB_PORT & java -jar ./metabase.jar

app.yaml

runtime: custom
env: flex

manual_scaling:
instances: 1

resources:
cpu: 1
memory_gb: 1
disk_size_gb: 10

readiness_check:
path: “/api/health”
check_interval_sec: 5
timeout_sec: 5
failure_threshold: 2
success_threshold: 2
app_start_timeout_sec: 600

beta_settings:
cloud_sql_instances: instance-name=tcp:5432

env_variables:
MB_DB_DBNAME: metabase
MB_DB_TYPE: ‘postgres’
MB_DB_HOST: ‘172.17.0.1’
MB_DB_PORT: ‘5432’
MB_DB_USER: ‘devops’
MB_DB_PASS: ‘Changeme123!’
MB_JETTY_PORT: ‘8080’

here is it @flamber, step by step

1 Like

Hi @hshurbeski,
I was trying to do the same thing now and also struggling. I'm really confused as to what the compute engine VM instance is doing. What is it needed at all? In the dockerfile I don't see anything about connecting to a VM.

And if the VM is needed, why bother with App Engine, why not just run Metabase on the VM?

I've changed to using Heroku to get it hosted, which is a much better fit for my skill level in this area. Metabase's post on this has a button that you just need to click.