You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had searched in the issues and found no similar issues.
What happened
My resource configuration is correct (oss -> s3 -> minio), and I can also execute JAR tasks to the Kubernetes cluster via Dinky's rs protocol without any issues.
However, when I use "add customjar", it shows ClassNotFoundException when executing the check (whether it's an SQL task or a JAR task).
The JAR task cannot be submitted for execution because it fails during the checking phase.
The SQL task fails the sql check, but it can still be submitted to the K8s cluster.And the container logs immediately report a ClassNotFoundException and the container enters a loop of restarting.
However, if I first launch the Flink session on K8S using Dinky and then submit these tasks to the session using Dinky, the tasks can run normally (although Dinky's local check still fails to pass).
Exception in sql task check
java.lang.IllegalArgumentException: get com.commontest.TestProto$TestPb descriptors error!
at org.apache.flink.formats.protobuf.util.PbFormatUtils.getDescriptor(PbFormatUtils.java:94)
at org.apache.flink.formats.protobuf.serialize.PbRowDataSerializationSchema.<init>(PbRowDataSerializationSchema.java:49)
at org.apache.flink.formats.protobuf.PbEncodingFormat.createRuntimeEncoder(PbEncodingFormat.java:47)
at org.apache.flink.formats.protobuf.PbEncodingFormat.createRuntimeEncoder(PbEncodingFormat.java:31)
at org.apache.flink.streaming.connectors.kafka.table.KafkaDynamicSink.createSerialization(KafkaDynamicSink.java:388)
at org.apache.flink.streaming.connectors.kafka.table.KafkaDynamicSink.getSinkRuntimeProvider(KafkaDynamicSink.java:194)
at org.apache.flink.table.planner.plan.nodes.exec.common.CommonExecSink.createSinkTransformation(CommonExecSink.java:149)
at org.apache.flink.table.planner.plan.nodes.exec.stream.StreamExecSink.translateToPlanInternal(StreamExecSink.java:176)
at org.apache.flink.table.planner.plan.nodes.exec.ExecNodeBase.translateToPlan(ExecNodeBase.java:158)
at org.apache.flink.table.planner.delegation.StreamPlanner.$anonfun$translateToPlan$1(StreamPlanner.scala:85)
at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:286)
...
Caused by: java.lang.ClassNotFoundException: com.commontest.TestProto$TestPb
at org.springframework.boot.web.embedded.tomcat.TomcatEmbeddedWebappClassLoader.loadClass(TomcatEmbeddedWebappClassLoader.java:72)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1220)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:398)
at org.apache.flink.formats.protobuf.util.PbFormatUtils.getDescriptor(PbFormatUtils.java:89)
... 129 more
Exception in jar task check:
Caused by: org.apache.flink.client.program.ProgramInvocationException: The program's entry point class 'dw.realtime.ads.app.TestAddCustomJar' could not be loaded due to a linkage failure.
at org.apache.flink.client.program.PackagedProgram.loadMainClass(PackagedProgram.java:493)
at org.apache.flink.client.program.PackagedProgram.<init>(PackagedProgram.java:153)
at org.apache.flink.client.program.PackagedProgram.<init>(PackagedProgram.java:65)
at org.apache.flink.client.program.PackagedProgram$Builder.build(PackagedProgram.java:691)
at org.dinky.trans.dml.ExecuteJarOperation.getStreamGraph(ExecuteJarOperation.java:83)
... 143 more
Caused by: java.lang.NoClassDefFoundError: com/commontest/app/BaseApp
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1022)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:555)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)
at org.apache.flink.util.ChildFirstClassLoader.loadClassWithoutExceptionHandling(ChildFirstClassLoader.java:71)
at org.apache.flink.util.FlinkUserCodeClassLoader.loadClass(FlinkUserCodeClassLoader.java:51)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:527)
at org.apache.flink.util.FlinkUserCodeClassLoaders$SafetyNetWrapperClassLoader.loadClass(FlinkUserCodeClassLoaders.java:192)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:398)
at org.apache.flink.client.program.PackagedProgram.loadMainClass(PackagedProgram.java:479)
... 147 more
Caused by: java.lang.ClassNotFoundException: com.commontest.app.BaseApp
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:594)
at org.apache.flink.util.FlinkUserCodeClassLoader.loadClassWithoutExceptionHandling(FlinkUserCodeClassLoader.java:67)
at org.apache.flink.util.ChildFirstClassLoader.loadClassWithoutExceptionHandling(ChildFirstClassLoader.java:74)
at org.apache.flink.util.FlinkUserCodeClassLoader.loadClass(FlinkUserCodeClassLoader.java:51)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:527)
... 162 more
Exception in sql task on k8s cluster:
2024-03-05T15:15:21.608543612+08:00 Caused by: java.lang.IllegalArgumentException: get com.commontest.TestProto$TestPb descriptors error!
2024-03-05T15:15:21.608545675+08:00 at org.apache.flink.formats.protobuf.util.PbFormatUtils.getDescriptor(PbFormatUtils.java:94) ~[flink-sql-protobuf-1.16.0.jar:1.16.0]
2024-03-05T15:15:21.608547816+08:00 at org.apache.flink.formats.protobuf.serialize.PbRowDataSerializationSchema.<init>(PbRowDataSerializationSchema.java:49) ~[flink-sql-protobuf-1.16.0.jar:1.16.0]
at org.apache.flink.formats.protobuf.PbEncodingFormat.createRuntimeEncoder(PbEncodingFormat.java:47) ~[flink-sql-protobuf-1.16.0.jar:1.16.0]
2024-03-05T15:15:21.608563955+08:00 at org.apache.flink.formats.protobuf.PbEncodingFormat.createRuntimeEncoder(PbEncodingFormat.java:31) ~[flink-sql-protobuf-1.16.0.jar:1.16.0]
2024-03-05T15:15:21.608574597+08:00 at org.apache.flink.streaming.connectors.kafka.table.KafkaDynamicSink.createSerialization(KafkaDynamicSink.java:388) ~[flink-sql-connector-kafka-1.16.0.jar:1.16.0]
at org.apache.flink.streaming.connectors.kafka.table.KafkaDynamicSink.getSinkRuntimeProvider(KafkaDynamicSink.java:194) ~[flink-sql-connector-kafka-1.16.0.jar:1.16.0]
2024-03-05T15:15:21.608579752+08:00 at org.apache.flink.table.planner.plan.nodes.exec.common.CommonExecSink.createSinkTransformation(CommonExecSink.java:149) ~[flink-table-planner_2.12-1.16.0.jar:1.16.0]
2024-03-05T15:15:21.608582285+08:00 at org.apache.flink.table.planner.plan.nodes.exec.stream.StreamExecSink.translateToPlanInternal(StreamExecSink.java:176) ~[flink-table-planner_2.12-1.16.0.jar:1.16.0]
at org.apache.flink.table.planner.plan.nodes.exec.ExecNodeBase.translateToPlan(ExecNodeBase.java:158) ~[flink-table-planner_2.12-1.16.0.jar:1.16.0]
at org.apache.flink.table.planner.delegation.StreamPlanner.$anonfun$translateToPlan$1(StreamPlanner.scala:85) ~[flink-table-planner_2.12-1.16.0.jar:1.16.0]
at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:233) ~[flink-scala_2.12-1.16.0.jar:1.16.0]
...
2024-03-05T15:15:21.608643710+08:00 Caused by: java.lang.ClassNotFoundException: com.commontest.TestProto$TestPb
at java.net.URLClassLoader.findClass(Unknown Source) ~[?:?]
2024-03-05T15:15:21.608646726+08:00 at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:?]
2024-03-05T15:15:21.608648144+08:00 at org.apache.flink.util.FlinkUserCodeClassLoader.loadClassWithoutExceptionHandling(FlinkUserCodeClassLoader.java:67) ~[flink-dist-1.16.0.jar:1.16.0]
2024-03-05T15:15:21.608649659+08:00 at org.apache.flink.util.FlinkUserCodeClassLoader.loadClass(FlinkUserCodeClassLoader.java:51) ~[flink-dist-1.16.0.jar:1.16.0]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:?]
2024-03-05T15:15:21.608656151+08:00 at org.apache.flink.util.FlinkUserCodeClassLoaders$SafetyNetWrapperClassLoader.loadClass(FlinkUserCodeClassLoaders.java:192) ~[flink-dist-1.16.0.jar:1.16.0]
at java.lang.Class.forName0(Native Method) ~[?:?]
2024-03-05T15:15:21.608659206+08:00 at java.lang.Class.forName(Unknown Source) ~[?:?]
2024-03-05T15:15:21.608660640+08:00 at org.apache.flink.formats.protobuf.util.PbFormatUtils.getDescriptor(PbFormatUtils.java:89) ~[flink-sql-protobuf-1.16.0.jar:1.16.0]
2024-03-05T15:15:21.608662264+08:00 at org.apache.flink.formats.protobuf.serialize.PbRowDataSerializationSchema.<init>(PbRowDataSerializationSchema.java:49) ~[flink-sql-protobuf-1.16.0.jar:1.16.0]
2024-03-05T15:15:21.608663653+08:00 at org.apache.flink.formats.protobuf.PbEncodingFormat.createRuntimeEncoder(PbEncodingFormat.java:47) ~[flink-sql-protobuf-1.16.0.jar:1.16.0]
2024-03-05T15:15:21.608665027+08:00 at org.apache.flink.formats.protobuf.PbEncodingFormat.createRuntimeEncoder(PbEncodingFormat.java:31) ~[flink-sql-protobuf-1.16.0.jar:1.16.0]
2024-03-05T15:15:21.608666617+08:00 at org.apache.flink.streaming.connectors.kafka.table.KafkaDynamicSink.createSerialization(KafkaDynamicSink.java:388) ~[flink-sql-connector-kafka-1.16.0.jar:1.16.0]
at org.apache.flink.streaming.connectors.kafka.table.KafkaDynamicSink.getSinkRuntimeProvider(KafkaDynamicSink.java:194) ~[flink-sql-connector-kafka-1.16.0.jar:1.16.0]
2024-03-05T15:15:21.608670118+08:00 at org.apache.flink.table.planner.plan.nodes.exec.common.CommonExecSink.createSinkTransformation(CommonExecSink.java:149) ~[flink-table-planner_2.12-1.16.0.jar:1.16.0]
2024-03-05T15:15:21.608671522+08:00 at org.apache.flink.table.planner.plan.nodes.exec.stream.StreamExecSink.translateToPlanInternal(StreamExecSink.java:176) ~[flink-table-planner_2.12-1.16.0.jar:1.16.0]
2024-03-05T15:15:21.608672995+08:00 at org.apache.flink.table.planner.plan.nodes.exec.ExecNodeBase.translateToPlan(ExecNodeBase.java:158) ~[flink-table-planner_2.12-1.16.0.jar:1.16.0]
2024-03-05T15:15:21.608674456+08:00 at org.apache.flink.table.planner.delegation.StreamPlanner.$anonfun$translateToPlan$1(StreamPlanner.scala:85) ~[flink-table-planner_2.12-1.16.0.jar:1.16.0]
2024-03-05T15:15:21.608675873+08:00 at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:233) ~[flink-scala_2.12-1.16.0.jar:1.16.0]
at scala.collection.Iterator.foreach(Iterator.scala:937) ~[flink-scala_2.12-1.16.0.jar:1.16.0]
What you expected to happen
"add customjar" can successfully add JAR files, allowing the check to pass and the tasks to be submitted and run successfully.
How to reproduce
dinky version : 1.0 rc4
"realtime-common-1.0-SNAPSHOT.jar" contains some common utility classes and proto classes.
Storage system: MinIO (S3 protocol)
Resource configuration: OSS (Dinky can upload/download files normally)
Cluster: Kubernetes (K8s)
Jar task:
add CUSTOMJAR 'rs:/common/realtime-common-1.0-SNAPSHOT.jar';
EXECUTE JAR WITH (
'uri'='rs:/ads/original-testAddCustomJar-SNAPSHOT.jar',
'main-class'='dw.realtime.ads.app.TestAddCustomJar',
'args'='--env prod --offset.init earliest --parallelism 1'
);
Search before asking
What happened
My resource configuration is correct (oss -> s3 -> minio), and I can also execute JAR tasks to the Kubernetes cluster via Dinky's rs protocol without any issues.
However, when I use "add customjar", it shows ClassNotFoundException when executing the check (whether it's an SQL task or a JAR task).
The JAR task cannot be submitted for execution because it fails during the checking phase.
The SQL task fails the sql check, but it can still be submitted to the K8s cluster.And the container logs immediately report a ClassNotFoundException and the container enters a loop of restarting.
However, if I first launch the Flink session on K8S using Dinky and then submit these tasks to the session using Dinky, the tasks can run normally (although Dinky's local check still fails to pass).
Exception in sql task check
Exception in jar task check:
Exception in sql task on k8s cluster:
What you expected to happen
"add customjar" can successfully add JAR files, allowing the check to pass and the tasks to be submitted and run successfully.
How to reproduce
dinky version : 1.0 rc4
"realtime-common-1.0-SNAPSHOT.jar" contains some common utility classes and proto classes.
Storage system: MinIO (S3 protocol)
Resource configuration: OSS (Dinky can upload/download files normally)
Cluster: Kubernetes (K8s)
Jar task:
Sql task:
Anything else
No response
Version
1.0.0
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: