You are viewing a plain text version of this content. The canonical link for it is here.
Posted to builds@streampark.apache.org by GitBox <gi...@apache.org> on 2026/08/13 00:23:01 UTC

[GH] (streampark/fix/flink-client-security-manager-jdk17): Workflow run "E2E" failed!

The GitHub Actions job "E2E" on streampark.git/fix/flink-client-security-manager-jdk17 has failed.
Run started by GitHub user 88fantasy (triggered by wolfboys).

Head commit for run:
430dfbbc1c26b5f05f161121bf2615e422fbcf42 / 阮伟儿 <ru...@dgmed.cn>
fix(build): allow the legacy SecurityManager for FlinkClient#submit on JDK 18+

FlinkClient#submit() installs a custom ExitSecurityManager via
System.setSecurityManager() before invoking the Flink CLI in-process, purely
to intercept System.exit() calls the CLI makes on completion (turning them
into a catchable SecurityException instead of killing the whole console JVM).

JEP 411 deprecated the Security Manager in Java 17 and, starting Java 18,
System.setSecurityManager() throws UnsupportedOperationException unless the
java.security.manager system property is explicitly set to "allow" (or a
manager class name) at JVM startup -- it can no longer be set dynamically
without that flag. The console ships with a JDK 21 target, so every attempt
to start a Flink application fails with:

  java.lang.UnsupportedOperationException: The Security Manager is
  deprecated and will be removed in a future release
      at java.base/java.lang.System.setSecurityManager(System.java:431)
      at org.apache.streampark.flink.client.FlinkClient.submit(FlinkClient.java:63)

This exception is wrapped in a CompletionException and only persisted to the
t_flink_app_log table (via ApplicationLog / POST /flink/app/opt_log) -- it
never reaches the console's own log files, so the application just silently
flips to FAILED a few seconds after every start attempt with no visible
error anywhere in logs/.

Add -Djava.security.manager=allow next to the existing JDK 9+/17+
compatibility flags in jvm_opts.sh, following the same pattern as the
--add-opens flags already there for ClassLoaderUtils. This is a plain system
property: harmless on JDK 8-17 (ignored/already-default there), required on
JDK 18+.

Reproduced end to end against a real Flink 2.2.1 standalone cluster: without
this flag, POST /flink/app/start is accepted (HTTP 200) but the application
flips to FAILED within ~5s with the exception above recorded only in
t_flink_app_log, never in logs/error.*.log or logs/streampark.out.

Report URL: https://github.com/apache/streampark/actions/runs/31650080600

With regards,
GitHub Actions via GitBox