Making graphes (deployment problems)

i’m metabase.jar in my localhost with compose for postgres database and it works fine, but when i did deploy it to cloud foundry i was unable to create figures i am only able to see data in table format, can anyone help with that ? or at least give me a starting point …thank you

Hard to take a guess at with that little information. Can you explain/show the problem you experience compared to when it works?

Does either Metabase server log or browser error console give any hints?

metabase logs always give me this error : “ERROR sync.util :: Error syncing fields for Table whatever table there in my database” and this error too : ERROR sync-metadata.metabase-metadata :: Error syncing _metabase_metadata: no matching keypath:

Sorry, I give up. With just the info you provide I don’t think I’m able to help.

what info do you want me to provide ?

I asked for 3 things in my first post above. You gave me one (the Metabase logs).

In https://metabase.com/docs/latest/troubleshooting-guide/bugs.html you will find info on how to access the browser error console if you don’t already know how. (I was asking for that because you said you could see tables but no graphs/figures)

Hopefully https://www.snoyman.com/blog/2017/10/effective-ways-help-from-maintainers can give you some useful ideas about good ways to ask for help. The blog post talks about help with code, but much of it is relevant for IT setup as well. (My first question about “show me”). Otherwise we will both be wasting our time here.

sorry,
this is the link of my deployement : https://met-or.mybluemix.net/
i’m using a google chrome browser
metabase version is : v0.28.5
enviroment: cloud foundry
database : compose for postgres
Javascript console logs :
Failed to load resource: the server responded with a status of 401 (Unauthorized) api/user/current:1
api/util/password_check:1 Failed to load resource: the server responded with a status of 400 (Bad Request)
ListSearchField.jsx:31 Uncaught TypeError: _this2._input.focus is not a function
at ListSearchField.jsx:31

metabase logs:
Jul 24 09:14:32 INFO metabase.util :: Loading Metabase…
Jul 24 09:14:38 INFO metabase.util.encryption :: DB details encryption is DISABLED for this Metabase instance. :unlock:
See http://www.metabase.com/docs/latest/operations-guide/start.html#encrypting-your-database-connection-details-at-rest for more information.
Jul 24 09:14:48 INFO metabase.core :: Starting Metabase in STANDALONE mode
Jul 24 09:14:48 INFO metabase.core :: Launching Embedded Jetty Webserver with config:
{:port 8080, :host “0.0.0.0”}

Jul 24 09:14:48 INFO metabase.core :: Starting Metabase version v0.28.5 (fa5cb8a release-0.28.5) …
Jul 24 09:14:48 INFO metabase.core :: System timezone is ‘UTC’ …
Jul 24 09:14:55 INFO metabase.core :: Setting up and migrating Metabase DB. Please sit tight, this may take a minute…
Jul 24 09:14:55 INFO metabase.db :: Verifying postgres Database Connection …
Jul 24 09:14:55 INFO metabase.db :: Verify Database Connection … :white_check_mark:
Jul 24 09:14:55 INFO metabase.db :: Running Database Migrations…
Jul 24 09:14:55 INFO metabase.db :: Setting up Liquibase…
Jul 24 09:14:55 INFO metabase.db :: Liquibase is ready.
Jul 24 09:14:55 INFO metabase.db :: Checking if Database has unrun migrations…
Jul 24 09:15:00 INFO metabase.db :: Database has unrun migrations. Waiting for migration lock to be cleared…
Jul 24 09:15:00 INFO metabase.db :: Migration lock is cleared. Running migrations…
Jul 24 09:15:03 INFO metabase.db :: Database Migrations Current … :white_check_mark:
Jul 24 09:15:04 INFO metabase.db.migrations :: Running all necessary data migrations, this may take a minute.
Jul 24 09:15:04 INFO metabase.db.migrations :: Running data migration ‘set-card-database-and-table-ids’…
Jul 24 09:15:05 INFO metabase.db.migrations :: Running data migration ‘set-mongodb-databases-ssl-false’…
Jul 24 09:15:05 INFO metabase.db.migrations :: Running data migration ‘set-default-schemas’…
Jul 24 09:15:05 INFO metabase.db.migrations :: Running data migration ‘set-admin-email’…
Jul 24 09:15:05 INFO metabase.db.migrations :: Running data migration ‘remove-database-sync-activity-entries’…
Jul 24 09:15:06 INFO metabase.db.migrations :: Running data migration ‘update-dashboards-to-new-grid’…
Jul 24 09:15:06 INFO metabase.db.migrations :: Running data migration ‘migrate-field-visibility-type’…
Jul 24 09:15:06 INFO metabase.db.migrations :: Running data migration ‘add-users-to-default-permissions-groups’…
Jul 24 09:15:06 INFO metabase.models.permissions-group :: Created magic permissions group ‘All Users’ (ID = 1)
Jul 24 09:15:06 INFO metabase.models.permissions-group :: Created magic permissions group ‘Administrators’ (ID = 2)
Jul 24 09:15:06 INFO metabase.db.migrations :: Running data migration ‘add-admin-group-root-entry’…
Jul 24 09:15:06 INFO metabase.db.migrations :: Running data migration ‘add-databases-to-magic-permissions-groups’…
Jul 24 09:15:07 INFO metabase.models.permissions-group :: Created magic permissions group ‘MetaBot’ (ID = 3)
Jul 24 09:15:07 INFO metabase.db.migrations :: Running data migration ‘migrate-field-types’…
Jul 24 09:15:08 INFO metabase.db.migrations :: Running data migration ‘fix-invalid-field-types’…
Jul 24 09:15:08 INFO metabase.db.migrations :: Running data migration ‘copy-site-url-setting-and-remove-trailing-slashes’…
Jul 24 09:15:08 INFO metabase.db.migrations :: Running data migration ‘migrate-query-executions’…
Jul 24 09:15:08 INFO metabase.db.migrations :: Running data migration ‘drop-old-query-execution-table’…
Jul 24 09:15:08 INFO metabase.db.migrations :: Running data migration ‘ensure-protocol-specified-in-site-url’…
Jul 24 09:15:08 INFO metabase.db.migrations :: Running data migration ‘populate-card-database-id’…
Jul 24 09:15:08 INFO metabase.db.migrations :: Running data migration ‘migrate-humanization-setting’…
Jul 24 09:15:08 INFO metabase.db.migrations :: Running data migration ‘populate-card-read-permissions’…
Jul 24 09:15:08 INFO metabase.db.migrations :: Not running migration populate-card-read-permissions as it has been replaced by a subsequent migration
Jul 24 09:15:08 INFO metabase.db.migrations :: Running data migration ‘repopulate-card-read-permissions’…
Jul 24 09:15:08 INFO metabase.db.migrations :: Finished running data migrations.
Jul 24 09:15:08 INFO metabase.events :: Starting events listener: metabase.events.activity-feed :ear:
Jul 24 09:15:08 INFO metabase.events :: Starting events listener: metabase.events.dependencies :ear:
Jul 24 09:15:08 INFO metabase.events :: Starting events listener: metabase.events.driver-notifications :ear:
Jul 24 09:15:08 INFO metabase.events :: Starting events listener: metabase.events.last-login :ear:
Jul 24 09:15:08 INFO metabase.events :: Starting events listener: metabase.events.metabot-lifecycle :ear:
Jul 24 09:15:08 INFO metabase.events :: Starting events listener: metabase.events.notifications :ear:
Jul 24 09:15:08 INFO metabase.events :: Starting events listener: metabase.events.revision :ear:
Jul 24 09:15:08 INFO metabase.events :: Starting events listener: metabase.events.sync-database :ear:
Jul 24 09:15:08 INFO metabase.events :: Starting events listener: metabase.events.view-log :ear:
Jul 24 09:15:08 INFO metabase.task :: Loading tasks namespace: metabase.task.cleanup-temporary-computation-job-results :calendar:
Jul 24 09:15:08 INFO metabase.task :: Loading tasks namespace: metabase.task.follow-up-emails :calendar:
Jul 24 09:15:08 INFO metabase.task :: Loading tasks namespace: metabase.task.send-anonymous-stats :calendar:
Jul 24 09:15:08 INFO metabase.task :: Loading tasks namespace: metabase.task.send-pulses :calendar:
Jul 24 09:15:09 INFO metabase.task :: Loading tasks namespace: metabase.task.sync-databases :calendar:
Jul 24 09:15:09 INFO metabase.task :: Loading tasks namespace: metabase.task.upgrade-checks :calendar:
Jul 24 09:15:09 INFO metabase.core :: Looks like this is a new installation … preparing setup wizard
Jul 24 09:15:09 INFO metabase.core :: Please use the following url to setup your Metabase installation:

http://0.0.0.0:8080/setup/

Jul 24 09:15:09 INFO metabase.sample-data :: Loading sample dataset…
Jul 24 09:15:09 DEBUG metabase.sync.util :: Sync operations in flight: {:sync #{1}}
Jul 24 09:15:09 INFO metabase.sync.util :: STARTING: Sync h2 Database 1 ‘Sample Dataset’
Jul 24 09:15:09 DEBUG metabase.sync.util :: Sync operations in flight: {:sync #{1}, :sync-metadata #{1}}
Jul 24 09:15:09 INFO metabase.sync.util :: STARTING: Sync metadata for h2 Database 1 ‘Sample Dataset’
Jul 24 09:15:10 INFO metabase.sync.sync-metadata.tables :: Found new tables: (Table ‘PUBLIC.PRODUCTS’ Table ‘PUBLIC.ORDERS’ Table ‘PUBLIC.PEOPLE’ Table ‘PUBLIC.REVIEWS’)
Jul 24 09:15:11 ERROR metabase.sync.util :: Error syncing fields for Table 4 ‘PUBLIC.REVIEWS’: Output of table-metadata does not match schema:

{:fields #{{:base-type (not (“Valid field type” :type/Integer))} {:base-type (not (“Valid field type” :type/Text))} {:base-type (not (“Valid field type” :type/Text))} {:base-type (not (“Valid field type” :type/DateTime))} {:base-type (not (“Valid field type” :type/Integer))} {:base-type (not (“Valid field type” :type/BigInteger))}}}

(“sync.fetch_metadata$fn__36355$table_metadata__36360.invoke(fetch_metadata.clj:15)”
“sync.sync_metadata.fields$fn__36916$db_metadata__36921$fn__36922.invoke(fields.clj:294)”
“sync.sync_metadata.fields$fn__36916$db_metadata__36921.invoke(fields.clj:290)”
“sync.sync_metadata.fields$fn__36944$sync_fields_for_table_BANG___36953$fn__36956$fn__36957.invoke(fields.clj:307)”
“sync.util$do_with_error_handling.invokeStatic(util.clj:124)”
“sync.util$do_with_error_handling.invoke(util.clj:119)”
“sync.sync_metadata.fields$fn__36944$sync_fields_for_table_BANG___36953$fn__36956.invoke(fields.clj:306)”
“sync.sync_metadata.fields$fn__36944$sync_fields_for_table_BANG___36953.invoke(fields.clj:301)”
“sync.sync_metadata.fields$fn__36982$sync_fields_BANG___36987$fn__36988.invoke(fields.clj:318)”
“sync.sync_metadata.fields$fn__36982$sync_fields_BANG___36987.invoke(fields.clj:314)”
“sync.sync_metadata$fn__37551$sync_db_metadata_BANG___37556$fn__37557$fn__37558.invoke(sync_metadata.clj:28)”
“sync.util$do_with_error_handling.invokeStatic(util.clj:124)”
“sync.util$do_with_error_handling.invoke(util.clj:119)”
“sync.util$do_with_error_handling.invokeStatic(util.clj:122)”
“sync.util$do_with_error_handling.invoke(util.clj:119)”
“driver$fn__25838.invokeStatic(driver.clj:235)”
“driver$fn__25838.invoke(driver.clj:235)”
“driver$fn__25773$G__25580__25782.invoke(driver.clj:51)”
“sync.util$sync_in_context$fn__35069.invoke(util.clj:115)”
“sync.util$with_db_logging_disabled$fn__35066.invoke(util.clj:106)”
“sync.util$with_start_and_finish_logging$fn__35061.invoke(util.clj:92)”
“sync.util$with_sync_events$fn__35058.invoke(util.clj:75)”
“sync.util$with_duplicate_ops_prevented$fn__35049.invoke(util.clj:54)”
“sync.util$do_sync_operation.invokeStatic(util.clj:142)”
“sync.util$do_sync_operation.invoke(util.clj:139)”
“sync.sync_metadata$fn__37551$sync_db_metadata_BANG___37556$fn__37557.invoke(sync_metadata.clj:23)”
“sync.sync_metadata$fn__37551$sync_db_metadata_BANG___37556.invoke(sync_metadata.clj:20)”
“sync$fn__37601$sync_database_BANG___37606$fn__37607$fn__37608.invoke(sync.clj:28)”
“sync.util$do_with_error_handling.invokeStatic(util.clj:124)”
“sync.util$do_with_error_handling.invoke(util.clj:119)”
“sync.util$do_with_error_handling.invokeStatic(util.clj:122)”
“sync.util$do_with_error_handling.invoke(util.clj:119)”
“driver$fn__25838.invokeStatic(driver.clj:235)”
“driver$fn__25838.invoke(driver.clj:235)”
“driver$fn__25773$G__25580__25782.invoke(driver.clj:51)”
“sync.util$sync_in_context$fn__35069.invoke(util.clj:115)”
“sync.util$with_db_logging_disabled$fn__35066.invoke(util.clj:106)”
“sync.util$with_start_and_finish_logging$fn__35061.invoke(util.clj:92)”
“sync.util$with_sync_events$fn__35058.invoke(util.clj:75)”
“sync.util$with_duplicate_ops_prevented$fn__35049.invoke(util.clj:54)”
“sync.util$do_sync_operation.invokeStatic(util.clj:142)”
“sync.util$do_sync_operation.invoke(util.clj:139)”
“sync$fn__37601$sync_database_BANG___37606$fn__37607.invoke(sync.clj:26)”
“sync$fn__37601$sync_database_BANG___37606.invoke(sync.clj:19)”
“sample_data$add_sample_dataset_BANG_.invokeStatic(sample_data.clj:30)”
“sample_data$add_sample_dataset_BANG_.invoke(sample_data.clj:24)”
“core$init_BANG_.invokeStatic(core.clj:180)”
“core$init_BANG_.invoke(core.clj:133)”
“core$start_normally.invokeStatic(core.clj:258)”
“core$start_normally.invoke(core.clj:251)”
“core$_main.invokeStatic(core.clj:279)”
“core$_main.doInvoke(core.clj:274)”
“core.main(Unknown Source)”)

Jul 24 09:15:11 ERROR metabase.sync.util :: Error syncing fields for Table 3 ‘PUBLIC.PEOPLE’: Output of table-metadata does not match schema:

{:fields #{{:base-type (not (“Valid field type” :type/Date))} {:base-type (not (“Valid field type” :type/Text))} {:base-type (not (“Valid field type” :type/Text))} {:base-type (not (“Valid field type” :type/DateTime))} {:base-type (not (“Valid field type” :type/BigInteger))} {:base-type (not (“Valid field type” :type/Text))} {:base-type (not (“Valid field type” :type/Float))} {:base-type (not (“Valid field type” :type/Text))} {:base-type (not (“Valid field type” :type/Float))} {:base-type (not (“Valid field type” :type/Text))} {:base-type (not (“Valid field type” :type/Text))} {:base-type (not (“Valid field type” :type/Text))} {:base-type (not (“Valid field type” :type/Text))}}}

(“sync.fetch_metadata$fn__36355$table_metadata__36360.invoke(fetch_metadata.clj:15)”
“sync.sync_metadata.fields$fn__36916$db_metadata__36921$fn__36922.invoke(fields.clj:294)”
“sync.sync_metadata.fields$fn__36916$db_metadata__36921.invoke(fields.clj:290)”
“sync.sync_metadata.fields$fn__36944$sync_fields_for_table_BANG___36953$fn__36956$fn__36957.invoke(fields.clj:307)”
“sync.util$do_with_error_handling.invokeStatic(util.clj:124)”
“sync.util$do_with_error_handling.invoke(util.clj:119)”
“sync.sync_metadata.fields$fn__36944$sync_fields_for_table_BANG___36953$fn__36956.invoke(fields.clj:306)”
“sync.sync_metadata.fields$fn__36944$sync_fields_for_table_BANG___36953.invoke(fields.clj:301)”
“sync.sync_metadata.fields$fn__36982$sync_fields_BANG___36987$fn__36988.invoke(fields.clj:318)”
“sync.sync_metadata.fields$fn__36982$sync_fields_BANG___36987.invoke(fields.clj:314)”
“sync.sync_metadata$fn__37551$sync_db_metadata_BANG___37556$fn__37557$fn__37558.invoke(sync_metadata.clj:28)”
“sync.util$do_with_error_handling.invokeStatic(util.clj:124)”
“sync.util$do_with_error_handling.invoke(util.clj:119)”
“sync.util$do_with_error_handling.invokeStatic(util.clj:122)”
“sync.util$do_with_error_handling.invoke(util.clj:119)”
“driver$fn__25838.invokeStatic(driver.clj:235)”
“driver$fn__25838.invoke(driver.clj:235)”
“driver$fn__25773$G__25580__25782.invoke(driver.clj:51)”
“sync.util$sync_in_context$fn__35069.invoke(util.clj:115)”
“sync.util$with_db_logging_disabled$fn__35066.invoke(util.clj:106)”
“sync.util$with_start_and_finish_logging$fn__35061.invoke(util.clj:92)”
“sync.util$with_sync_events$fn__35058.invoke(util.clj:75)”
“sync.util$with_duplicate_ops_prevented$fn__35049.invoke(util.clj:54)”
“sync.util$do_sync_operation.invokeStatic(util.clj:142)”
“sync.util$do_sync_operation.invoke(util.clj:139)”
“sync.sync_metadata$fn__37551$sync_db_metadata_BANG___37556$fn__37557.invoke(sync_metadata.clj:23)”
“sync.sync_metadata$fn__37551$sync_db_metadata_BANG___37556.invoke(sync_metadata.clj:20)”
“sync$fn__37601$sync_database_BANG___37606$fn__37607$fn__37608.invoke(sync.clj:28)”
“sync.util$do_with_error_handling.invokeStatic(util.clj:124)”
“sync.util$do_with_error_handling.invoke(util.clj:119)”
“sync.util$do_with_error_handling.invokeStatic(util.clj:122)”
“sync.util$do_with_error_handling.invoke(util.clj:119)”
“driver$fn__25838.invokeStatic(driver.clj:235)”
“driver$fn__25838.invoke(driver.clj:235)”
“driver$fn__25773$G__25580__25782.invoke(driver.clj:51)”
“sync.util$sync_in_context$fn__35069.invoke(util.clj:115)”
“sync.util$with_db_logging_disabled$fn__35066.invoke(util.clj:106)”
“sync.util$with_start_and_finish_logging$fn__35061.invoke(util.clj:92)”
“sync.util$with_sync_events$fn__35058.invoke(util.clj:75)”
“sync.util$with_duplicate_ops_prevented$fn__35049.invoke(util.clj:54)”
“sync.util$do_sync_operation.invokeStatic(util.clj:142)”
“sync.util$do_sync_operation.invoke(util.clj:139)”
“sync$fn__37601$sync_database_BANG___37606$fn__37607.invoke(sync.clj:26)”
“sync$fn__37601$sync_database_BANG___37606.invoke(sync.clj:19)”
“sample_data$add_sample_dataset_BANG_.invokeStatic(sample_data.clj:30)”
“sample_data$add_sample_dataset_BANG_.invoke(sample_data.clj:24)”
“core$init_BANG_.invokeStatic(core.clj:180)”
“core$init_BANG_.invoke(core.clj:133)”
“core$start_normally.invokeStatic(core.clj:258)”
“core$start_normally.invoke(core.clj:251)”
“core$_main.invokeStatic(core.clj:279)”
“core$_main.doInvoke(core.clj:274)”
“core.main(Unknown Source)”)
thank you for your help

OK, that’s better. You now have shared the symptoms (or output) — next is to look at what happened before (the Input). Specially what steps you took to configure the two instances. That is needed to explain and understand the output and what went wrong (Remember I also asked for “show me”?)

I will try to share my thinking below. Hopefully that’s useful and you come to the same conclusions.

Brief look at the symptoms (and partial conclusion for now)

It looks suspicious with:

Jul 24 09:14:55 INFO metabase.db :: Verifying postgres Database Connection …

in combination with

Jul 24 09:15:09 INFO metabase.core :: Looks like this is a new installation … preparing setup wizard
Jul 24 09:15:09 INFO metabase.core :: Please use the following url to setup your Metabase installation:

http://0.0.0.0:8080/setup/

Jul 24 09:15:09 INFO metabase.sample-data :: Loading sample dataset…
Jul 24 09:15:09 DEBUG metabase.sync.util :: Sync operations in flight: {:sync #{1}}
Jul 24 09:15:09 INFO metabase.sync.util :: STARTING: Sync h2 Database 1 ‘Sample Dataset’

It confuses me. It looks like a mix of first time setup (with migration runs) and something already setup pointing to H2. Compare it to a fresh setup first and normal run just with H2 and you will see differences.

All the other problems later in both browser and server logs are probably just a result of the first problems so let’s forget those … and focus on input/what happened before!

Show me the configuration

You mentioned you setup a local metabase.jar and that it works with your Postgres. How is that configured? Version? What is used for Metabase application database: H2 or Postgres?

Please share any relevant details on the steps you did take for Cloud Foundry deployment, including:

  • setup/configuration of your cloud foundry Metabase instance
  • if you did any data migration of the Metabase application database to the Cloud Foundry instance, then how?

Remember very few people here know what Cloud Foundry is — and it’s not something offically supported by the Metabase core team. So you must help others understand the setup to get meaningful help.

Hmm looking at this again an idea came up. Just a wild guess, as I don’t know how you set it up.

Is the problem simply that you — somehow — got it setup with Postgres as Metabase application database which contains info referencing the Sample Data and that it expects that to live in a H2 database that isn’t there/is broken etc.?

thank you again for you’re help, to deploy metabase i followed these steps :
1- create a manifest.yml to help me deploy metabase .this is what i wrote in manifest :
applications:
- env:
MB_JETTY_PORT: 8080
MB_JETTY_HOST: 0.0.0.0
MB_DB_TYPE: postgres
MB_DB_DBNAME: compose
MB_DB_PORT: 42589
MB_DB_USER: admin
MB_DB_PASS: ****************
MB_DB_HOST: sl-us-south-1-portal.27.dblayer.com
2- i just typed this comande : cf push application name -p metabase.jar

Thanks, that’s helpful. Now I know you setup with a jar (not a container) and configured Postgres as application db.

Does it still run into the error with a failed H2 sample dataset sync if you set up a new fresh application database?

For example by setting this in your manifest.yml:

MB_DB_DBNAME: metabase_appdb

If that still fails, can you simply delete Metabase’s reference to the H2 Sample Dataset under Admin > Databases?