Hello,
I am configuring Flink to run on a cluster with NFS. I have the Flink 0.9.1 distribution in some path in NFS and I added that path in ~/.bashrc as FLINK_HOME, and also included the $FLINK_HOME/lib folder to $PATH. I have the slaves file and the yaml file configured correctly with the nodes involved. Still, when I run the following command I get the following errors: $FLINK_HOME/bin/start-cluster.sh (tried also cd $FLINK_HOME ./bin/start-cluster.sh) --> in /log/flink-theuser-jobmanager-thenode.out Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/flink/runtime/jobmanager/JobManager Caused by: java.lang.ClassNotFoundException: org.apache.flink.runtime.jobmanager.JobManager at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:323) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:268) Could not find the main class: org.apache.flink.runtime.jobmanager.JobManager. Program will exit. -->in /log/flink-theuser-taskmanager-theslavenode.out Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/flink/runtime/taskmanager/TaskManager Caused by: java.lang.ClassNotFoundException: org.apache.flink.runtime.taskmanager.TaskManager at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:323) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:268) Could not find the main class: org.apache.flink.runtime.taskmanager.TaskManager. Program will exit. And lastly, in my script I have the run of a job which gives: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/flink/client/CliFrontend Caused by: java.lang.ClassNotFoundException: org.apache.flink.client.CliFrontend at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:323) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:268) Could not find the main class: org.apache.flink.client.CliFrontend. Program will exit. What could be the cause and which is the solution? Looking forward to your answer as soon as possible. Many thanks, Camelia |
The distributed "start-cluster.sh" script works only, if the code is accessible under the same path on all machines, which must be the same path as on the machine where you invoke the script. Otherwise the paths for remote shell commands will be wrong, and the classpaths will be wrong as a result. That means none of the Flink classes are in the JVM classpath. I don't think any of these scripts evaluate a "FLINK_HOME" variable. Can you try and make sure that Flink is on all machines under the same directory structure, and that you start it from there? On Mon, Nov 9, 2015 at 2:32 PM, Camelia Elena Ciolac <[hidden email]> wrote:
|
In reply to this post by Camelia Elena Ciolac
Good morning,
Thank you Stephan! I keep on testing and in the meantime I'm wondering if the Java version on the cluster may be part of the issue: java version "1.6.0_36" OpenJDK Runtime Environment (IcedTea6 1.13.8) (rhel-1.13.8.1.el6_7-x86_64) OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode) ? The cluster has shared network file system, so no problem in this aspect. I keep on trying and I've put some echo's for debugging in the Flink start scripts. Best regards, Camelia From: Camelia Elena Ciolac
Sent: Monday, November 09, 2015 2:32 PM To: [hidden email] Subject: Cluster installation gives java.lang.NoClassDefFoundError for everything Hello,
I am configuring Flink to run on a cluster with NFS. I have the Flink 0.9.1 distribution in some path in NFS and I added that path in ~/.bashrc as FLINK_HOME, and also included the $FLINK_HOME/lib folder to $PATH. I have the slaves file and the yaml file configured correctly with the nodes involved. Still, when I run the following command I get the following errors: $FLINK_HOME/bin/start-cluster.sh (tried also cd $FLINK_HOME ./bin/start-cluster.sh) --> in /log/flink-theuser-jobmanager-thenode.out Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/flink/runtime/jobmanager/JobManager Caused by: java.lang.ClassNotFoundException: org.apache.flink.runtime.jobmanager.JobManager at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:323) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:268) Could not find the main class: org.apache.flink.runtime.jobmanager.JobManager. Program will exit. -->in /log/flink-theuser-taskmanager-theslavenode.out Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/flink/runtime/taskmanager/TaskManager Caused by: java.lang.ClassNotFoundException: org.apache.flink.runtime.taskmanager.TaskManager at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:323) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:268) Could not find the main class: org.apache.flink.runtime.taskmanager.TaskManager. Program will exit. And lastly, in my script I have the run of a job which gives: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/flink/client/CliFrontend Caused by: java.lang.ClassNotFoundException: org.apache.flink.client.CliFrontend at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:323) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:268) Could not find the main class: org.apache.flink.client.CliFrontend. Program will exit. What could be the cause and which is the solution? Looking forward to your answer as soon as possible. Many thanks, Camelia |
Hi! Flink requires at least Java 1.7, so one of the reasons could also be that the classes are rejected for an incompatible version (class format 1.7, JVM does not understand it since it is only version 1.6). That could explain things... Greetings, Stephan On Wed, Nov 11, 2015 at 9:01 AM, Camelia Elena Ciolac <[hidden email]> wrote:
|
In reply to this post by Camelia Elena Ciolac
Hi Camelia, Flink 0.9.X supports Java 6. So this can't be the issue.java version "1.6.0_36" OpenJDK Runtime Environment (IcedTea6 1.13.8) (6b36-1.13.8-0ubuntu1~14.04) OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode) I think the error must be caused by your NFS setup. Let's start with ./bin/flink. For instance, can you access "/users/camelia/thecluster/flink-0.9.1/lib/flink-dist-0.9.1.jar" from the machine where you run ./bin/flink? Best, Max On Wed, Nov 11, 2015 at 10:41 AM, Camelia Elena Ciolac <[hidden email]> wrote:
|
Is "jar tf /users/camelia/thecluster/flink-0.9.1/lib/flink-dist-0.9.1.jar" listing for example the "org/apache/flink/client/CliFrontend" class? On Wed, Nov 11, 2015 at 12:09 PM, Maximilian Michels <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |