reef-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergiy Matusevych <sergiy.matusev...@gmail.com>
Subject Re: HelloREEF runs on Windows but not on Linux
Date Sun, 13 Nov 2016 03:15:34 GMT
Hi Doug,

We've discussed the PATH vs. JAVA_HOME issue with Markus, and came to the
conclusion that we should follow the Spark behavior, i.e. rely on the
JAVA_HOME variable. I think we already have it in the documentation, but I
will double check.

P.S. I believe on Ubuntu you can also set JAVA_HOME=/usr to use the default
JVM, since the only way we use JAVA_HOME in REEF is to specify the path to
java binary when starting a REEF process, like this:
"{{JAVA_HOME}}/bin/java ..."

Cheers,
Sergiy.


On Fri, Nov 11, 2016 at 6:09 PM, Douglas Service <dsopsrc@gmail.com> wrote:

> Either way we should probably put a note about JAVA_HOME on the tutorials
> page on the REEF Wiki in case the user still has problems. I can add the
> information to the Wiki. I can also update the code based on what we
> decide.
>
> Doug
>
> On Fri, Nov 11, 2016 at 6:02 PM, Douglas Service <dsopsrc@gmail.com>
> wrote:
>
> > Both the Java and CLR versions of HelloReef run fine on windows.
> >
> > However on Ubuntu I had to set the JAVA_HOME to
> > /usr/lib/jvm/java-8-oracle/jre to get the HelloREEF to run correctly. I
> do
> > not know about other Linux distributions, but on Ubuntu, the
> > update-alternatives functionality, which is enabled by default even only
> > one version of java is installed, puts links in /usr/bin for java, jar,
> jdb
> > etc. This causes all of the java programs to appear in the user's usual
> > path because /usr/bin is always included in the user's path by default
> > unless they specifically remove it. Plus they always get the version of
> > java controlled by "update-alternatives --config java". If this is the
> case
> > on other Linux distributions, we should use JAVA_HOME if it is set,
> > otherwise we should just rely on the user's path when we invoke java.
> >
> > Doug
> >
> >
> > On Thu, Nov 10, 2016 at 4:32 PM, Sergiy Matusevych <
> > sergiy.matusevych@gmail.com> wrote:
> >
> >> hi Douglas,
> >>
> >> The fix is in the master now - please go ahead and give it a try.
> >>
> >> Cheers,
> >> Sergiy.
> >>
> >> On Mon, Nov 7, 2016 at 6:00 PM, Sergiy Matusevych <
> >> sergiy.matusevych@gmail.com> wrote:
> >>
> >> > OK I think I'll create a PR for this. Here goes: https://github.com/
> >> > apache/reef/pull/1179
> >> >
> >> > Cheers,
> >> > Sergiy.
> >> >
> >> > On Mon, Nov 7, 2016 at 5:36 PM, Sergiy Matusevych <
> >> > sergiy.matusevych@gmail.com> wrote:
> >> >
> >> >> Hi Douglas,
> >> >>
> >> >> I think I know what's going on. The key is this line:
> >> >>
> >> >> public final class JavaLaunchCommandBuilder implements
> >> >> LaunchCommandBuilder {
> >> >>   // ...
> >> >>   private static final String DEFAULT_JAVA_PATH =
> >> >> System.getenv("JAVA_HOME") + "/bin/" + "java";
> >> >>
> >> >> That is, *by default* REEF client assumes that
> >> >>   1) you have JAVA_HOME environment variable set, and
> >> >>   2) your JAVA_HOME is the same as the one on the remote host.
> >> >>
> >> >> I am not sure this is the best default value. I would rather set
> >> >> DEFAULT_JAVA_PATH = "java"; and assume that java binary is in the
> >> system
> >> >> PATH - on both client and in the cluster.
> >> >>
> >> >> I've actually made that fix to debug REEF applications on my PC, but
> I
> >> >> can transform it into a pull request in no time.
> >> >>
> >> >> Markus, what do you think? I would love to file a JIRA and a PR for
> >> this.
> >> >>
> >> >> Cheers,
> >> >> Sergiy.
> >> >>
> >> >> On Tue, Oct 4, 2016 at 9:00 PM, Douglas Service <dsopsrc@gmail.com>
> >> >> wrote:
> >> >>
> >> >> > When I run HelloREEF on Linux following the instructions on the
> >> >> developer
> >> >> > WIKI, I get the following errors which looks like it is having
a
> >> problem
> >> >> > finding java.
> >> >> >
> >> >> >
> >> >> > dougse@reefdevlx:/code/reef$ java -cp lang/java/reef-examples/
> >> >> > target/reef-examples-0.16.0-SNAPSHOT-shaded.jar
> >> >> org.apache.reef.examples.
> >> >> > hello.HelloREEF
> >> >>
> >> >> [...]
> >> >>
> >> >> > SEVERE: Unable to spawn process "driver" wth command
> [null/bin/java,
> >> >> > -Xmx512m, -XX:PermSize=128m, -XX:MaxPermSize=128m, -classpath,
> >> >> > reef/local/*:reef/global/*:/code/reef/lang/java/reef-
> >> >> > examples/target/reef-examples-0.16.0-SNAPSHOT-shaded.jar,
> >> -Dproc_reef,
> >> >> > org.apache.reef.runtime.common.REEFLauncher,
> reef/local/driver.conf]
> >> >> >  Exception:java.io.IOException: Cannot run program "null/bin/java"
> >> (in
> >> >> > directory "/code/reef/REEF_LOCAL_RUNTIME/HelloREEF-1475636573040/
> >> >> driver"):
> >> >> > error=2, No such file or directory
> >> >>
> >> >>
> >> >
> >>
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message