Hello users, I am having a problem while running my flink program in a cluster. It gives me an error that it is unable to find an .so file in a tmp directory.Caused by: java.lang.UnsatisfiedLinkError: no jniopencv_core in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867) at java.lang.Runtime.loadLibrary0(Runtime.java:870) at java.lang.System.loadLibrary(System.java:1122) at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:654) at org.bytedeco.javacpp.Loader.load(Loader.java:492) at org.bytedeco.javacpp.Loader.load(Loader.java:409) at org.bytedeco.javacpp.opencv_core.<clinit>(opencv_core.java:10) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at org.bytedeco.javacpp.Loader.load(Loader.java:464) at org.bytedeco.javacpp.Loader.load(Loader.java:409) at org.bytedeco.javacpp.helper.opencv_core$AbstractArray.<clinit>(opencv_core.java:109) at loc.video.FlinkStreamSource.run(FlinkStreamSource.java:95) at org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:78) at org.apache.flink.streaming.runtime.tasks.SourceStreamTask.run(SourceStreamTask.java:56) at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:225) at org.apache.flink.runtime.taskmanager.Task.run(Task.java:559) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.UnsatisfiedLinkError: /tmp/javacpp5400264496782/libjniopencv_core.so: libgomp.so.1: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824) at java.lang.Runtime.load0(Runtime.java:809) at java.lang.System.load(System.java:1086) at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:637) Thanks in advance. Regards, Debaditya |
Yes, the BlobCache on each TaskManager node should fetch it from the
JobManager. How are you packaging your JAR? On Tue, Jul 26, 2016 at 4:32 PM, Debaditya Roy <[hidden email]> wrote: > Hello users, > > I am having a problem while running my flink program in a cluster. It gives > me an error that it is unable to find an .so file in a tmp directory. > > Caused by: java.lang.UnsatisfiedLinkError: no jniopencv_core in > java.library.path > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867) > at java.lang.Runtime.loadLibrary0(Runtime.java:870) > at java.lang.System.loadLibrary(System.java:1122) > at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:654) > at org.bytedeco.javacpp.Loader.load(Loader.java:492) > at org.bytedeco.javacpp.Loader.load(Loader.java:409) > at org.bytedeco.javacpp.opencv_core.<clinit>(opencv_core.java:10) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:348) > at org.bytedeco.javacpp.Loader.load(Loader.java:464) > at org.bytedeco.javacpp.Loader.load(Loader.java:409) > at > org.bytedeco.javacpp.helper.opencv_core$AbstractArray.<clinit>(opencv_core.java:109) > at loc.video.FlinkStreamSource.run(FlinkStreamSource.java:95) > at > org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:78) > at > org.apache.flink.streaming.runtime.tasks.SourceStreamTask.run(SourceStreamTask.java:56) > at > org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:225) > at org.apache.flink.runtime.taskmanager.Task.run(Task.java:559) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.UnsatisfiedLinkError: > /tmp/javacpp5400264496782/libjniopencv_core.so: libgomp.so.1: cannot open > shared object file: No such file or directory > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824) > at java.lang.Runtime.load0(Runtime.java:809) > at java.lang.System.load(System.java:1086) > at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:637) > > > I searched for the temp directory and in one of the nodes this directory and > the .jar file was present. Is it required to have the file across all the > nodes? If yes is there any way to control it? Since this tmp directory and > the .so file gets extracted during the runtime without any external > manipulation. > > > Thanks in advance. > > Regards, > Debaditya |
Hello, I am using the jar builder from IntelliJ IDE (the mvn one was causing problems). After that I executed it successfully locally. But in remote it is causing problem.On Tue, Jul 26, 2016 at 4:36 PM, Ufuk Celebi <[hidden email]> wrote: Yes, the BlobCache on each TaskManager node should fetch it from the |
What error message to you get from Maven?
On Tue, Jul 26, 2016 at 4:39 PM, Debaditya Roy <[hidden email]> wrote: > Hello, > > I am using the jar builder from IntelliJ IDE (the mvn one was causing > problems). After that I executed it successfully locally. But in remote it > is causing problem. > > Warm Regards, > Debaditya > > On Tue, Jul 26, 2016 at 4:36 PM, Ufuk Celebi <[hidden email]> wrote: >> >> Yes, the BlobCache on each TaskManager node should fetch it from the >> JobManager. How are you packaging your JAR? >> >> On Tue, Jul 26, 2016 at 4:32 PM, Debaditya Roy <[hidden email]> >> wrote: >> > Hello users, >> > >> > I am having a problem while running my flink program in a cluster. It >> > gives >> > me an error that it is unable to find an .so file in a tmp directory. >> > >> > Caused by: java.lang.UnsatisfiedLinkError: no jniopencv_core in >> > java.library.path >> > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867) >> > at java.lang.Runtime.loadLibrary0(Runtime.java:870) >> > at java.lang.System.loadLibrary(System.java:1122) >> > at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:654) >> > at org.bytedeco.javacpp.Loader.load(Loader.java:492) >> > at org.bytedeco.javacpp.Loader.load(Loader.java:409) >> > at org.bytedeco.javacpp.opencv_core.<clinit>(opencv_core.java:10) >> > at java.lang.Class.forName0(Native Method) >> > at java.lang.Class.forName(Class.java:348) >> > at org.bytedeco.javacpp.Loader.load(Loader.java:464) >> > at org.bytedeco.javacpp.Loader.load(Loader.java:409) >> > at >> > >> > org.bytedeco.javacpp.helper.opencv_core$AbstractArray.<clinit>(opencv_core.java:109) >> > at loc.video.FlinkStreamSource.run(FlinkStreamSource.java:95) >> > at >> > >> > org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:78) >> > at >> > >> > org.apache.flink.streaming.runtime.tasks.SourceStreamTask.run(SourceStreamTask.java:56) >> > at >> > >> > org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:225) >> > at org.apache.flink.runtime.taskmanager.Task.run(Task.java:559) >> > at java.lang.Thread.run(Thread.java:745) >> > Caused by: java.lang.UnsatisfiedLinkError: >> > /tmp/javacpp5400264496782/libjniopencv_core.so: libgomp.so.1: cannot >> > open >> > shared object file: No such file or directory >> > at java.lang.ClassLoader$NativeLibrary.load(Native Method) >> > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941) >> > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824) >> > at java.lang.Runtime.load0(Runtime.java:809) >> > at java.lang.System.load(System.java:1086) >> > at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:637) >> > >> > >> > I searched for the temp directory and in one of the nodes this directory >> > and >> > the .jar file was present. Is it required to have the file across all >> > the >> > nodes? If yes is there any way to control it? Since this tmp directory >> > and >> > the .so file gets extracted during the runtime without any external >> > manipulation. >> > >> > >> > Thanks in advance. >> > >> > Regards, >> > Debaditya > > |
Out of curiosity I've tried this locally by adding the following
dependencies to my Maven project: <dependency> <groupId>org.bytedeco</groupId> <artifactId>javacpp</artifactId> <version>1.2.2</version> </dependency> <dependency> <groupId>org.bytedeco.javacpp-presets</groupId> <artifactId>opencv</artifactId> <version>3.1.0-1.2</version> </dependency> With this, running mvn clean package works as expected. On Tue, Jul 26, 2016 at 7:09 PM, Ufuk Celebi <[hidden email]> wrote: > What error message to you get from Maven? > > On Tue, Jul 26, 2016 at 4:39 PM, Debaditya Roy <[hidden email]> wrote: >> Hello, >> >> I am using the jar builder from IntelliJ IDE (the mvn one was causing >> problems). After that I executed it successfully locally. But in remote it >> is causing problem. >> >> Warm Regards, >> Debaditya >> >> On Tue, Jul 26, 2016 at 4:36 PM, Ufuk Celebi <[hidden email]> wrote: >>> >>> Yes, the BlobCache on each TaskManager node should fetch it from the >>> JobManager. How are you packaging your JAR? >>> >>> On Tue, Jul 26, 2016 at 4:32 PM, Debaditya Roy <[hidden email]> >>> wrote: >>> > Hello users, >>> > >>> > I am having a problem while running my flink program in a cluster. It >>> > gives >>> > me an error that it is unable to find an .so file in a tmp directory. >>> > >>> > Caused by: java.lang.UnsatisfiedLinkError: no jniopencv_core in >>> > java.library.path >>> > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867) >>> > at java.lang.Runtime.loadLibrary0(Runtime.java:870) >>> > at java.lang.System.loadLibrary(System.java:1122) >>> > at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:654) >>> > at org.bytedeco.javacpp.Loader.load(Loader.java:492) >>> > at org.bytedeco.javacpp.Loader.load(Loader.java:409) >>> > at org.bytedeco.javacpp.opencv_core.<clinit>(opencv_core.java:10) >>> > at java.lang.Class.forName0(Native Method) >>> > at java.lang.Class.forName(Class.java:348) >>> > at org.bytedeco.javacpp.Loader.load(Loader.java:464) >>> > at org.bytedeco.javacpp.Loader.load(Loader.java:409) >>> > at >>> > >>> > org.bytedeco.javacpp.helper.opencv_core$AbstractArray.<clinit>(opencv_core.java:109) >>> > at loc.video.FlinkStreamSource.run(FlinkStreamSource.java:95) >>> > at >>> > >>> > org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:78) >>> > at >>> > >>> > org.apache.flink.streaming.runtime.tasks.SourceStreamTask.run(SourceStreamTask.java:56) >>> > at >>> > >>> > org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:225) >>> > at org.apache.flink.runtime.taskmanager.Task.run(Task.java:559) >>> > at java.lang.Thread.run(Thread.java:745) >>> > Caused by: java.lang.UnsatisfiedLinkError: >>> > /tmp/javacpp5400264496782/libjniopencv_core.so: libgomp.so.1: cannot >>> > open >>> > shared object file: No such file or directory >>> > at java.lang.ClassLoader$NativeLibrary.load(Native Method) >>> > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941) >>> > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824) >>> > at java.lang.Runtime.load0(Runtime.java:809) >>> > at java.lang.System.load(System.java:1086) >>> > at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:637) >>> > >>> > >>> > I searched for the temp directory and in one of the nodes this directory >>> > and >>> > the .jar file was present. Is it required to have the file across all >>> > the >>> > nodes? If yes is there any way to control it? Since this tmp directory >>> > and >>> > the .so file gets extracted during the runtime without any external >>> > manipulation. >>> > >>> > >>> > Thanks in advance. >>> > >>> > Regards, >>> > Debaditya >> >> |
Hi, For the error I get this when I run the .jar made by mvn clean packagejava.lang.NoClassDefFoundError: org/bytedeco/javacpp/opencv_core$Mat at loc.video.Job.main(Job.java:29) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:505) at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:403) at org.apache.flink.client.program.Client.runBlocking(Client.java:248) at org.apache.flink.client.CliFrontend.executeProgramBlocking(CliFrontend.java:866) at org.apache.flink.client.CliFrontend.run(CliFrontend.java:333) at org.apache.flink.client.CliFrontend.parseParameters(CliFrontend.java:1192) at org.apache.flink.client.CliFrontend.main(CliFrontend.java:1243) Caused by: java.lang.ClassNotFoundException: org.bytedeco.javacpp.opencv_core$Mat at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 12 more <?xml version="1.0" encoding="UTF-8"?> Since it was giving an error I used the .jar file created by the IDE and ran it by specifying class path which was working nice locally but in the cluster it was failing. Thanks in advance Warm Regrads, Debaditya On Tue, Jul 26, 2016 at 8:06 PM, Ufuk Celebi <[hidden email]> wrote: Out of curiosity I've tried this locally by adding the following |
Hello users, I rebuilt the project and now on doing mvn clean package i have got two jar files and I can run with the fat jar in the local jvm properly. However when executing in the cluster I get error as follows: Source: Custom Source -> Flat Map -> Sink: Unnamed(1/1) switched to FAILED java.lang.UnsatisfiedLinkError: no jniopencv_core in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867) at java.lang.Runtime.loadLibrary0(Runtime.java:870) at java.lang.System.loadLibrary(System.java:1122) at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:726) at org.bytedeco.javacpp.Loader.load(Loader.java:501) at org.bytedeco.javacpp.Loader.load(Loader.java:418) at org.bytedeco.javacpp.opencv_core.<clinit>(opencv_core.java:10) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at org.bytedeco.javacpp.Loader.load(Loader.java:473) at org.bytedeco.javacpp.Loader.load(Loader.java:418) at org.bytedeco.javacpp.helper.opencv_core$AbstractArray.<clinit>(opencv_core.java:109) at org.myorg.quickstart.FlinkStreamSource.run(FlinkStreamSource.java:33) at org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:78) at org.apache.flink.streaming.runtime.tasks.SourceStreamTask.run(SourceStreamTask.java:56) at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:225) at org.apache.flink.runtime.taskmanager.Task.run(Task.java:559) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.UnsatisfiedLinkError: /tmp/javacpp5798629402792/libjniopencv_core.so: libgomp.so.1: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824) at java.lang.Runtime.load0(Runtime.java:809) at java.lang.System.load(System.java:1086) at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:709) ... 14 more 07/27/2016 14:38:42 Job execution switched to status FAILING. java.lang.UnsatisfiedLinkError: no jniopencv_core in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867) at java.lang.Runtime.loadLibrary0(Runtime.java:870) at java.lang.System.loadLibrary(System.java:1122) at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:726) at org.bytedeco.javacpp.Loader.load(Loader.java:501) at org.bytedeco.javacpp.Loader.load(Loader.java:418) at org.bytedeco.javacpp.opencv_core.<clinit>(opencv_core.java:10) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at org.bytedeco.javacpp.Loader.load(Loader.java:473) at org.bytedeco.javacpp.Loader.load(Loader.java:418) at org.bytedeco.javacpp.helper.opencv_core$AbstractArray.<clinit>(opencv_core.java:109) at org.myorg.quickstart.FlinkStreamSource.run(FlinkStreamSource.java:33) at org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:78) at org.apache.flink.streaming.runtime.tasks.SourceStreamTask.run(SourceStreamTask.java:56) at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:225) at org.apache.flink.runtime.taskmanager.Task.run(Task.java:559) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.UnsatisfiedLinkError: /tmp/javacpp5798629402792/libjniopencv_core.so: libgomp.so.1: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824) at java.lang.Runtime.load0(Runtime.java:809) at java.lang.System.load(System.java:1086) at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:709) ... 14 more Do I need to do some more tweak to run in the cluster? On Tue, Jul 26, 2016 at 8:56 PM, Debaditya Roy <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |