Hi, I am trying to run flink with the flink kubern...
# troubleshooting
l
Hi, I am trying to run flink with the flink kubernetes operator using my own docker image, However, it is unable to start the flink cluster with the null pointer exception:
Copy code
2023-09-30 00:04:01,950 ERROR org.apache.flink.runtime.entrypoint.ClusterEntrypoint        [] - Could not create application program.
java.lang.NullPointerException: null
    at org.apache.flink.kubernetes.utils.KubernetesUtils.checkJarFileForApplicationMode(KubernetesUtils.java:370) ~[flink-dist_2.12-1.14.5.jar:1.14.5]
    at org.apache.flink.kubernetes.entrypoint.KubernetesApplicationClusterEntrypoint.getPackagedProgramRetriever(KubernetesApplicationClusterEntrypoint.java:115) ~[flink-dist_2.12-1.14.5.jar:1.14.5]
    at org.apache.flink.kubernetes.entrypoint.KubernetesApplicationClusterEntrypoint.getPackagedProgram(KubernetesApplicationClusterEntrypoint.java:96) ~[flink-dist_2.12-1.14.5.jar:1.14.5]
    at org.apache.flink.kubernetes.entrypoint.KubernetesApplicationClusterEntrypoint.main(KubernetesApplicationClusterEntrypoint.java:70) [flink-dist_2.12-1.14.5.jar:1.14.5]
In my docker image, I get flink on /shared/flink/ but I did configured ENV for both PATH and FLINK_HOME to the correct location. Does anyone know what would trigger this NullPointerException? Thanks
I found the issue is that the flink operator is putting the config under /opt/flink, however, in my own docker image, I set the FLINK_HOME to be /shared/flink.
s
Copy code
java.lang.NullPointerException: null
    at org.apache.flink.kubernetes.utils.KubernetesUtils.checkJarFileForApplicationMode(KubernetesUtils.java:370) ~[flink-dist_2.12-1.14.5.jar:1.14.5]
Can u pls check if u have packaged ur jar file correctly?
l
The problem is solved, I set a different FLINK_HOME which is different from the one that is mount by the flink operator.
πŸ‘ 1