Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] When launching a job on a Kubernetes cluster on Windows using an IDE, the job status cannot be properly updated. #4112

Open
3 tasks done
FrommyMind opened this issue Oct 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@FrommyMind
Copy link
Contributor

Search before asking

  • I had searched in the issues and found no similar issues.

Java Version

JDK1.8

Scala Version

2.12.x

StreamPark Version

  1. release-2.1.4
  2. release-2.1.5-rc1

Flink Version

1.17.2

deploy mode

kubernetes-session

What happened

After building Streampark, I started the console-server using the IDE, and then tried to start an Flink SQL Demo sample job in a Kubernetes session using Flink, but the status of the job was not updated correctly and remained "STARING". But on the Flink cluster Web UI, the job is already started and finally completed.

image

image

And the console log show that "tracking flink job status on kubernetes native session mode timeout"

10:26:49.972 [pool-10-thread-1] WARN org.apache.streampark.flink.kubernetes.watcher.FlinkJobStatusWatcher - [StreamPark] [FlinkJobStatusWatcher] tracking flink job status on kubernetes native session mode timeout, limitSeconds=120, trackIds=TrackId(kubernetes-session,pre-flink,dev-k8s,100000,19308092faf9eb315b31fcf01fe0fdd3,100000,{jobmanager.execution.failover-strategy=region, fs.s3a.secret.key=test-user, state.checkpoints.dir=s3://flink-checkpoint/checkpoints/, rest.bind-address=localhost, taskmanager.numberOfTaskSlots=1, jobmanager.rpc.address=localhost, state.savepoints.dir=s3://flink-checkpoint/savepoints/, taskmanager.bind-host=localhost, jobmanager.bind-host=localhost, jobmanager.memory.process.size=1600m, state.backend.incremental=true, parallelism.default=1, fs.s3a.endpoint=10.191.80.169:9001, containerized.master.env.ENABLE_BUILT_IN_PLUGINS=flink-s3-fs-hadoop-1.17.2.jar, containerized.taskmanager.env.ENABLE_BUILT_IN_PLUGINS=flink-s3-fs-hadoop-1.17.2.jar, rest.address=localhost, fs.s3a.list.version=1, jobmanager.rpc.port=6123, fs.s3a.connection.ssl.enabled=false, fs.s3a.access.key=test-user, taskmanager.host=localhost, taskmanager.memory.process.size=1728m, s3.path.style.access=true})

Then I tried to figure out what was going on.

After some debugging, I modified the code as follows.

  private def callJobsOverviewsApi(restUrl: String): Option[JobDetails] = {

  try {
    JobDetails.as(
      Request
        .get(s"$restUrl/jobs/overview")
        .connectTimeout(KubernetesRetriever.FLINK_REST_AWAIT_TIMEOUT_SEC)
        .responseTimeout(KubernetesRetriever.FLINK_CLIENT_TIMEOUT_SEC)
        .execute
        .returnContent()
        .asString(StandardCharsets.UTF_8)
    )
  }catch {
    case e: Throwable => logWarn(e.toString)
      None
  }
  }

The I found some exeception output.

10:37:42.660 [pool-10-thread-3] WARN org.apache.streampark.flink.kubernetes.watcher.FlinkJobStatusWatcher - [StreamPark] java.lang.NoClassDefFoundError: org/json4s/Formats
10:37:42.661 [pool-10-thread-3] WARN org.apache.streampark.flink.kubernetes.watcher.FlinkJobStatusWatcher - [StreamPark] java.lang.NoClassDefFoundError: org/json4s/Formats
10:37:47.660 [pool-10-thread-7] WARN org.apache.streampark.flink.kubernetes.watcher.FlinkJobStatusWatcher - [StreamPark] java.lang.NoClassDefFoundError: org/json4s/Formats

Error Exception

10:37:42.660 [pool-10-thread-3] WARN org.apache.streampark.flink.kubernetes.watcher.FlinkJobStatusWatcher - [StreamPark] java.lang.NoClassDefFoundError: org/json4s/Formats
10:37:42.661 [pool-10-thread-3] WARN org.apache.streampark.flink.kubernetes.watcher.FlinkJobStatusWatcher - [StreamPark] java.lang.NoClassDefFoundError: org/json4s/Formats
10:37:47.660 [pool-10-thread-7] WARN org.apache.streampark.flink.kubernetes.watcher.FlinkJobStatusWatcher - [StreamPark] java.lang.NoClassDefFoundError: org/json4s/Formats

Screenshots

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!(您是否要贡献这个PR?)

Code of Conduct

@FrommyMind FrommyMind added the bug Something isn't working label Oct 12, 2024
FrommyMind added a commit to FrommyMind/incubator-streampark that referenced this issue Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant