[ 
https://issues.apache.org/jira/browse/FLINK-35554?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Josh England updated FLINK-35554:
---------------------------------
    Description: 
We use flink-docker to create a "standalone" application, with a Dockerfile 
like...
 
{code:java}
FROM flink:1.18.1-java17
COPY application.jar /opt/flink/usrlib/artifacts/
{code}

However, after upgrading to 1.19.0 we found our application would not start. We 
saw errors like the following in the logs:


{noformat}
org.apache.flink.util.FlinkException: Could not load the provided entrypoint 
class.
   at 
org.apache.flink.client.program.DefaultPackagedProgramRetriever.getPackagedProgram(DefaultPackagedProgramRetriever.java:230)
   at 
org.apache.flink.container.entrypoint.StandaloneApplicationClusterEntryPoint.getPackagedProgram(StandaloneApplicationClusterEntryPoint.java:149)
   at 
org.apache.flink.container.entrypoint.StandaloneApplicationClusterEntryPoint.lambda$main$0(StandaloneApplicationClusterEntryPoint.java:90)
   at 
org.apache.flink.runtime.security.contexts.NoOpSecurityContext.runSecured(NoOpSecurityContext.java:28)
   at 
org.apache.flink.container.entrypoint.StandaloneApplicationClusterEntryPoint.main(StandaloneApplicationClusterEntryPoint.java:89)
   Caused by: org.apache.flink.client.program.ProgramInvocationException: The 
program's entry point class 'XXXXXXXXX' was not found in the jar file.

.....

Classpath: 
/opt/flink/lib/flink-cep-1.19.0.jar:/opt/flink/lib/flink-connector-files-1.19.0.jar:/opt/flink/lib/flink-csv-1.19.0.jar:/opt/flink/lib/flink-json-1.19.0.jar:/opt/flink/lib/flink-scala_2.12-1.19.0.jar:/opt/flink/lib/flink-table-api-java-uber-1.19.0.jar:/opt/flink/lib/flink-table-planner-loader-1.19.0.jar:/opt/flink/lib/flink-table-runtime-1.19.0.jar:/opt/flink/lib/log4j-1.2-api-2.17.1.jar:/opt/flink/lib/log4j-api-2.17.1.jar:/opt/flink/lib/log4j-core-2.17.1.jar:/opt/flink/lib/logback-classic-1.5.6.jar:/opt/flink/lib/logback-core-1.5.6.jar:/opt/flink/lib/slf4j-api-2.0.13.jar:/opt/flink/lib/flink-dist-1.19.0.jar::::
{noformat}

We were able to fix the issue by placing the application.jar in /opt/flink/lib 
instead. My guess is that the usrlib directory isn't being added to the 
classpath by the shell scripts that launch flink from a container.


  was:
We use flink-docker to create a "standalone" application, with a Dockerfile 
like...
 
{code:java}
FROM flink:1.18.1-java17
COPY application.jar /opt/flink/usrlib/artifacts/
{code}

However, after upgrading to 1.19.0 we found our application would not start. We 
saw errors like the following in the logs:


{noformat}
org.apache.flink.util.FlinkException: Could not load the provided entrypoint 
class.
   at 
org.apache.flink.client.program.DefaultPackagedProgramRetriever.getPackagedProgram(DefaultPackagedProgramRetriever.java:230)
   at 
org.apache.flink.container.entrypoint.StandaloneApplicationClusterEntryPoint.getPackagedProgram(StandaloneApplicationClusterEntryPoint.java:149)
   at 
org.apache.flink.container.entrypoint.StandaloneApplicationClusterEntryPoint.lambda$main$0(StandaloneApplicationClusterEntryPoint.java:90)
   at 
org.apache.flink.runtime.security.contexts.NoOpSecurityContext.runSecured(NoOpSecurityContext.java:28)
   at 
org.apache.flink.container.entrypoint.StandaloneApplicationClusterEntryPoint.main(StandaloneApplicationClusterEntryPoint.java:89)
   Caused by: org.apache.flink.client.program.ProgramInvocationException: The 
program's entry point class 'XXXXXXXXX' was not found in the jar file.
{noformat}

We were able to fix the issue by placing the application.jar in /opt/flink/lib 
instead. My guess is that the usrlib directory isn't being added to the 
classpath by the shell scripts that launch flink from a container.



> usrlib is not added to classpath when using containers
> ------------------------------------------------------
>
>                 Key: FLINK-35554
>                 URL: https://issues.apache.org/jira/browse/FLINK-35554
>             Project: Flink
>          Issue Type: Bug
>          Components: flink-docker
>    Affects Versions: 1.19.0
>         Environment: Docker
>            Reporter: Josh England
>            Priority: Major
>
> We use flink-docker to create a "standalone" application, with a Dockerfile 
> like...
>  
> {code:java}
> FROM flink:1.18.1-java17
> COPY application.jar /opt/flink/usrlib/artifacts/
> {code}
> However, after upgrading to 1.19.0 we found our application would not start. 
> We saw errors like the following in the logs:
> {noformat}
> org.apache.flink.util.FlinkException: Could not load the provided entrypoint 
> class.
>    at 
> org.apache.flink.client.program.DefaultPackagedProgramRetriever.getPackagedProgram(DefaultPackagedProgramRetriever.java:230)
>    at 
> org.apache.flink.container.entrypoint.StandaloneApplicationClusterEntryPoint.getPackagedProgram(StandaloneApplicationClusterEntryPoint.java:149)
>    at 
> org.apache.flink.container.entrypoint.StandaloneApplicationClusterEntryPoint.lambda$main$0(StandaloneApplicationClusterEntryPoint.java:90)
>    at 
> org.apache.flink.runtime.security.contexts.NoOpSecurityContext.runSecured(NoOpSecurityContext.java:28)
>    at 
> org.apache.flink.container.entrypoint.StandaloneApplicationClusterEntryPoint.main(StandaloneApplicationClusterEntryPoint.java:89)
>    Caused by: org.apache.flink.client.program.ProgramInvocationException: The 
> program's entry point class 'XXXXXXXXX' was not found in the jar file.
> .....
> Classpath: 
> /opt/flink/lib/flink-cep-1.19.0.jar:/opt/flink/lib/flink-connector-files-1.19.0.jar:/opt/flink/lib/flink-csv-1.19.0.jar:/opt/flink/lib/flink-json-1.19.0.jar:/opt/flink/lib/flink-scala_2.12-1.19.0.jar:/opt/flink/lib/flink-table-api-java-uber-1.19.0.jar:/opt/flink/lib/flink-table-planner-loader-1.19.0.jar:/opt/flink/lib/flink-table-runtime-1.19.0.jar:/opt/flink/lib/log4j-1.2-api-2.17.1.jar:/opt/flink/lib/log4j-api-2.17.1.jar:/opt/flink/lib/log4j-core-2.17.1.jar:/opt/flink/lib/logback-classic-1.5.6.jar:/opt/flink/lib/logback-core-1.5.6.jar:/opt/flink/lib/slf4j-api-2.0.13.jar:/opt/flink/lib/flink-dist-1.19.0.jar::::
> {noformat}
> We were able to fix the issue by placing the application.jar in 
> /opt/flink/lib instead. My guess is that the usrlib directory isn't being 
> added to the classpath by the shell scripts that launch flink from a 
> container.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to