Sample data failed to install (Ubuntu VM on Azure)

New install on Ubunto 16.04 on Azure.
Metabase 0.28.1

First time I’ve done an install without a GUI.

Plain Ubuntu install, with just Java 9

Appears to start ok, everything works except the sample data which has failed to install. I’ve reset and tried again, but still nothing.
This is from terminal screen:

02-16 16:00:11 DEBUG sync.util :: Sync operations in flight: {:sync #{1}}
02-16 16:00:11 INFO sync.util :: STARTING: Sync h2 Database 1 'Sample Dataset'
02-16 16:00:11 DEBUG sync.util :: Sync operations in flight: {:sync #{1}, :sync-metadata #{1}}
02-16 16:00:11 INFO sync.util :: STARTING: Sync metadata for h2 Database 1 'Sample Dataset'
SQLException:
 Message: Connections could not be acquired from the underlying database!
 SQLState: null
 Error Code: 0
02-16 16:00:43 ERROR generic-sql.query-processor :: nil
02-16 16:00:43 WARN sync-metadata.sync-timezone :: Error syncing database timezone
java.lang.Exception: Error querying database 'Sample Dataset' for current time
        at metabase.driver$make_current_db_time_fn$fn__25679$fn__25680.invoke(driver.clj:344)
        at metabase.driver$make_current_db_time_fn$fn__25679.invoke(driver.clj:336)
        at metabase.driver$fn__25498$G__25363__25505.invoke(driver.clj:51)
        at metabase.sync.sync_metadata.sync_timezone$fn__36622$sync_timezone_BANG___36627$fn__36628.invoke(sync_timezone.clj:20)
        at metabase.sync.sync_metadata.sync_timezone$fn__36622$sync_timezone_BANG___36627.invoke(sync_timezone.clj:13)
        at metabase.sync.sync_metadata$fn__36864$sync_db_metadata_BANG___36869$fn__36870$fn__36871.invoke(sync_metadata.clj:24)
        at metabase.sync.util$do_with_error_handling.invokeStatic(util.clj:124)
        at metabase.sync.util$do_with_error_handling.invoke(util.clj:119)
        at metabase.sync.util$do_with_error_handling.invokeStatic(util.clj:122)
        at metabase.sync.util$do_with_error_handling.invoke(util.clj:119)
        at clojure.core$partial$fn__4759.invoke(core.clj:2514)
        at metabase.driver$fn__25602.invokeStatic(driver.clj:226)
        at metabase.driver$fn__25602.invoke(driver.clj:226)
        at metabase.driver$fn__25526$G__25357__25535.invoke(driver.clj:51)
        at metabase.sync.util$sync_in_context$fn__34128.invoke(util.clj:115)
        at metabase.sync.util$with_db_logging_disabled$fn__34125.invoke(util.clj:106)
        at metabase.sync.util$with_start_and_finish_logging$fn__34120.invoke(util.clj:92)
        at metabase.sync.util$with_sync_events$fn__34117.invoke(util.clj:75)
        at metabase.sync.util$with_duplicate_ops_prevented$fn__34108.invoke(util.clj:54)
        at metabase.sync.util$do_sync_operation.invokeStatic(util.clj:142)
        at metabase.sync.util$do_sync_operation.invoke(util.clj:139)
        at metabase.sync.sync_metadata$fn__36864$sync_db_metadata_BANG___36869$fn__36870.invoke(sync_metadata.clj:23)
        at metabase.sync.sync_metadata$fn__36864$sync_db_metadata_BANG___36869.invoke(sync_metadata.clj:20)
        at metabase.sync$fn__36914$sync_database_BANG___36919$fn__36920$fn__36921.invoke(sync.clj:28)
        at metabase.sync.util$do_with_error_handling.invokeStatic(util.clj:124)
        at metabase.sync.util$do_with_error_handling.invoke(util.clj:119)
        at metabase.sync.util$do_with_error_handling.invokeStatic(util.clj:122)
        at metabase.sync.util$do_with_error_handling.invoke(util.clj:119)
        at clojure.core$partial$fn__4759.invoke(core.clj:2514)
        at metabase.driver$fn__25602.invokeStatic(driver.clj:226)
        at metabase.driver$fn__25602.invoke(driver.clj:226)
        at metabase.driver$fn__25526$G__25357__25535.invoke(driver.clj:51)
        at metabase.sync.util$sync_in_context$fn__34128.invoke(util.clj:115)
        at metabase.sync.util$with_db_logging_disabled$fn__34125.invoke(util.clj:106)
        at metabase.sync.util$with_start_and_finish_logging$fn__34120.invoke(util.clj:92)
        at metabase.sync.util$with_sync_events$fn__34117.invoke(util.clj:75)
        at metabase.sync.util$with_duplicate_ops_prevented$fn__34108.invoke(util.clj:54)
        at metabase.sync.util$do_sync_operation.invokeStatic(util.clj:142)
        at metabase.sync.util$do_sync_operation.invoke(util.clj:139)
        at metabase.sync$fn__36914$sync_database_BANG___36919$fn__36920.invoke(sync.clj:26)
        at metabase.sync$fn__36914$sync_database_BANG___36919.invoke(sync.clj:19)
        at metabase.sample_data$add_sample_dataset_BANG_.invokeStatic(sample_data.clj:30)
        at metabase.sample_data$add_sample_dataset_BANG_.invoke(sample_data.clj:24)
        at metabase.core$init_BANG_.invokeStatic(core.clj:166)
        at metabase.core$init_BANG_.invoke(core.clj:119)
        at metabase.core$start_normally.invokeStatic(core.clj:248)
        at metabase.core$start_normally.invoke(core.clj:241)
        at metabase.core$_main.invokeStatic(core.clj:269)
        at metabase.core$_main.doInvoke(core.clj:264)
        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.lang.Exception: Connections could not be acquired from the underlying database!
        at metabase.driver.generic_sql.query_processor$do_with_try_catch.invokeStatic(query_processor.clj:452)
        at metabase.driver.generic_sql.query_processor$do_with_try_catch.invoke(query_processor.clj:448)
        at metabase.driver.generic_sql.query_processor$execute_query.invokeStatic(query_processor.clj:502)
        at metabase.driver.generic_sql.query_processor$execute_query.invoke(query_processor.clj:498)
        at clojure.lang.Var.invoke(Var.java:383)
        at metabase.driver$fn__25552$G__25381__25559.invoke(driver.clj:51)
        at metabase.driver$make_current_db_time_fn$fn__25679$fn__25680.invoke(driver.clj:338)

Congrats! Nice to get rid of all those Next > ... Next > ... Next > ... Next > ... screens eh? :wink:

Anyways, I happen to have an Ubuntu Azure instance - and I can reproduce the problem with:

$ java -version
openjdk version "9-internal"
OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195246.buildd.src)
OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode)
$ mkdir mb0.28.1-jar-test
$ cd mb0.28.1-jar-test/
$ wget http://downloads.metabase.com/v0.28.1/metabase.jar
$ export MB_JETTY_PORT=30281          # yep! port 3000 was already taken
$ java -jar metabase.jar

As it apparently already had Java (not sure where it came from, shared machine ...)

On the other hand it runs well on my Win 10 WSL Ubuntu 16.04, though it has:

$ java -version
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
$ which java
/usr/bin/java

On Azure - the "workaround" ... or in al honesty, that's what we did from the start, was to:

  1. Install Docker CE
  2. Then to take latest for a test spin:
     docker run -p 30281:3000 --name metabase0.28.1 metabase/metabase:v0.28.1
  1. Finally grab a :beer: and go read :blue_book: Operations Guide: Running Metabase on Docker - in particular pay attention to that you shouldn't normally run with the metabase.db inside your docker container

Wow! First I work out how to install a dev environment on Linux.
Then do the same without a GUI.
Now I have to learn Docker!
All that on top of learning Functional Programming.
It’s going to be quite a month! :rofl:

Yep! Just trying to see how far I can push you … I’m sure you can push me into some SQL or something else where I’ll run away :scream:

1 Like

I went back to the Ubuntu VM on Azure for a play. Broke it trying to downgrade the JVM, so just started again.

Looks like there’s a problem with dependencies with the version 9 JDK.
I started by installing the recommended packages too. First one was default-jre
That installed a load more stuff than the Java 9 version, so I stopped there.
All working perfectly now.

1 Like

So it’s specific to the default JVM configured in the Azure Ubuntu VM, or? (Guess it would be good to super-quickly capture the fact of what component in the ecosystem seems to fail, if you can)

I think that installing just the JDK misses some of the dependencies if you’re upgrading to JDK 9. Maybe the MS image is slightly out of date?

1 Like