cr8
cr8 copied to clipboard
Jdk path points to the wrong location when run latest-nightly
The jdk path points to the wrong location when starting up latest-nightly
in cr8 0.18.1.dev5+g74d5c9f.d20200427
on mac os x.
> cr8 run-crate latest-nightly
Skipping download, tarball alrady extracted at /Users/mkleen/.cache/cr8/crates/crate-4.2.0-202004270003-1d3ac73
Starting Crate process
CrateDB launching:
PID: 3913
Logs: /Users/mkleen/.cache/cr8/crates/crate-4.2.0-202004270003-1d3ac73/logs/cr8-crate-run848645912.log
Data: /var/folders/49/v601s_vs0rqd3lx1q7s7shsr0000gn/T/tmpnxgx8rt5 (removed on stop)
/Users/mkleen/.cache/cr8/crates/crate-4.2.0-202004270003-1d3ac73/bin/crate: line 129: /Users/mkleen/.cache/cr8/crates/crate-4.2.0-202004270003-1d3ac73/jdk/Contents/Home/bin/java: No such file or directory
/Users/mkleen/.cache/cr8/crates/crate-4.2.0-202004270003-1d3ac73/bin/crate: line 129: exec: /Users/mkleen/.cache/cr8/crates/crate-4.2.0-202004270003-1d3ac73/jdk/Contents/Home/bin/java: cannot execute: No such file or directory
CrateDB didn't start in time or couldn't form a cluster.
The path:
/Users/mkleen/.cache/cr8/crates/crate-4.2.0-202004270003-1d3ac73/jdk/Contents/Home/bin/java
should point to:
/Users/mkleen/.cache/cr8/crates/crate-4.2.0-202004270003-1d3ac73/jdk/bin/java
I think part of the reason is that the jdk
included in the nightly tarballs is for x64 linux only.
I was thinking of extending the java_magic
so replace the bundled jdk
with a system java, but I don't have a MacOS to test it.
@mfussenegger If I understand you correctly the idea for the nightly build latest-nightly
is to still rely on the system java (over the bundled jdk
) at least for macOS? Is Windows affected as well?
@mfussenegger If I understand you correctly the idea for the nightly build
latest-nightly
is to still rely on the system java (over the bundledjdk
) at least for macOS? Is Windows affected as well?
Yes. I was thinking of monkey patching the jdk
directory that is bundled, replacing it with a symlink to the system JDK.
Both MacOS and Windows are affected because the nightly builds are only available for x64 linux and contain a x64-linux JDK.
The easier solution would be to provide nightly for all 3 platforms.
A workaround is btw. to use cr8 run-crate branch:master
, but it's also slower as it will build the distribution locally.