Starting metabase from symlink breaks. Last worked on 0.30.3

Hi guys!

I typically like to create a symlink to a jar file, which allows me to keep several versions in parallel , always knowing for sure which version I currently have hooked up.

This used to work perfectly up until 0.30.0

On 0.32.8 however, I started getting a file not found error.

I first figured maybe just something with that particular version, let’s wait for the next update.

Sure enough also 0.32.10 shows the same behavior:

08-17 12:20:10 ERROR metabase.core :: Metabase Initialization FAILED

java.nio.file.NoSuchFileException: file:/home/ubuntu/metabase/metabase.jar.0.32.10!/modules
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemProvider.java:427)
at java.nio.file.Files.newDirectoryStream(Files.java:457)
at java.nio.file.Files.list(Files.java:3451)
at metabase.plugins.files$files_seq.invokeStatic(files.clj:68)
at metabase.plugins.files$files_seq.invoke(files.clj:65)
at metabase.plugins.files$copy_files_BANG_.invokeStatic(files.clj:86)
at metabase.plugins.files$copy_files_BANG_.invoke(files.clj:82)
at metabase.plugins$extract_system_modules_BANG_$fn__65948.invoke(plugins.clj:57)
at metabase.plugins.files$do_with_open_path_to_resource.invokeStatic(files.clj:112)
at metabase.plugins.files$do_with_open_path_to_resource.invoke(files.clj:103)
at metabase.plugins$extract_system_modules_BANG_.invokeStatic(plugins.clj:56)
at metabase.plugins$extract_system_modules_BANG_.invoke(plugins.clj:53)
at metabase.plugins$load_plugins_BANG_.invokeStatic(plugins.clj:135)
at metabase.plugins$load_plugins_BANG_.invoke(plugins.clj:121)
at metabase.core$init_BANG_.invokeStatic(core.clj:67)
at metabase.core$init_BANG_.invoke(core.clj:55)
at metabase.core$start_normally.invokeStatic(core.clj:122)
at metabase.core$start_normally.invoke(core.clj:116)
at metabase.core$_main.invokeStatic(core.clj:142)
at metabase.core$_main.doInvoke(core.clj:137)
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)

It works when I directly rename the file to metabase.jar as opposed to having a symlink pointing metabase.jar to metabase.jar.0.32.10

Thank you & Best Regards
Fabian

Hi @SetSails
So it only started not-working since 0.32.8?
Which version of Java? java -version
What happens if the actual file is called metabase-0.32.10.jar?

Hi @flamber, thanks for the quick RE!

I haven’t tried versions between 0.30.0 and 0.32.8 so I can’t be more specific unfortunately.

Java Version:
openjdk version “1.8.0_191”
OpenJDK Runtime Environment (build 1.8.0_191-8u191-b12-2ubuntu0.16.04.1-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)

When I call the actual file metabase-0.32.10.jar I get the same error message:

java.nio.file.NoSuchFileException: file:/home/ubuntu/metabase/metabase.jar.0.32.10!/modules
	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
	at sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemProvider.java:427)
	at java.nio.file.Files.newDirectoryStream(Files.java:457)
	at java.nio.file.Files.list(Files.java:3451)
	at metabase.plugins.files$files_seq.invokeStatic(files.clj:68)
	at metabase.plugins.files$files_seq.invoke(files.clj:65)
	at metabase.plugins.files$copy_files_BANG_.invokeStatic(files.clj:86)
	at metabase.plugins.files$copy_files_BANG_.invoke(files.clj:82)
	at metabase.plugins$extract_system_modules_BANG_$fn__65948.invoke(plugins.clj:57)
	at metabase.plugins.files$do_with_open_path_to_resource.invokeStatic(files.clj:112)
	at metabase.plugins.files$do_with_open_path_to_resource.invoke(files.clj:103)
	at metabase.plugins$extract_system_modules_BANG_.invokeStatic(plugins.clj:56)
	at metabase.plugins$extract_system_modules_BANG_.invoke(plugins.clj:53)
	at metabase.plugins$load_plugins_BANG_.invokeStatic(plugins.clj:135)
	at metabase.plugins$load_plugins_BANG_.invoke(plugins.clj:121)
	at metabase.core$init_BANG_.invokeStatic(core.clj:67)
	at metabase.core$init_BANG_.invoke(core.clj:55)
	at metabase.core$start_normally.invokeStatic(core.clj:122)
	at metabase.core$start_normally.invoke(core.clj:116)
	at metabase.core$_main.invokeStatic(core.clj:142)
	at metabase.core$_main.doInvoke(core.clj:137)
	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)

Thank you & Best Regards
Fabian

@SetSails
I might be misunderstanding you.
Try to rename metabase.jar.0.32.10 to metabase-0.32.10.jar
The important part, make sure the Metabase file ends with .jar

Java is a little outdated, latest is 8u221 - you might want to update that. Not that it has anything to do with this problem, simply just for security.

A side question. Why do you symlink the files? I have an archive with about 15 different versions and I just use this to point to the version I want to start:
java -jar metabase-0.31.2.jar