Skip to content

[Bug] User-defined ingress causes job status error #3792

Description

@squanch-c

Search before asking

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

Java Version

8

Scala Version

2.12.x

StreamPark Version

2.1.4

Flink Version

1.17.2

deploy mode

kubernetes-application

What happened

After the task is started, manually add ingress:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: job-name
  namespace: flink
  annotations:
    nginx.ingress.kubernetes.io/whitelist-source-range: 'xxx'
spec:
  ingressClassName: nginx-test
  rules:
  - host: "xxx"
    http:
      paths:
      - pathType: Prefix
        path: "/"
        backend:
          service:
            name: job-name-rest
            port:
              number: 8081

The job status will changes to Canceled.

The URL obtained by method KubernetesRetriever.retrieveFlinkRestUrl ends with /,
when concatenating the full path of FlinkJobStatusWatcher.callJobsOverviewsApi, the path starts with /, which makes the URL invalid (URI path begins with multiple slashes).
image

Error Exception

15:43:03.420 [pool-10-thread-13] INFO org.apache.streampark.flink.kubernetes.KubernetesRetriever - retrieve flink jobManager rest url: http://streampark-new-versin-test.test.xx.xxx.net/
15:43:03.420 [pool-10-thread-13] WARN org.apache.streampark.flink.kubernetes.watcher.FlinkJobStatusWatcher - The retry fetch failed, final status failed, errorStak=URI path begins with multiple slashes.
15:43:03.421 [pool-10-thread-13] INFO org.apache.streampark.flink.kubernetes.watcher.FlinkJobStatusWatcher - trackId TrackId(kubernetes-application,flink,streampak-new-version-test,100001,b387176f7a6e36e4042270f9daaa64db,100000,{jobmanager.rpc.port=6123, rest.bind-address=localhost, high-availability.type=kubernetes, rest.address=localhost, taskmanager.host=localhost, jobmanager.memory.process.size=1600m, taskmanager.numberOfTaskSlots=1, jobmanager.execution.failover-strategy=region, high-availability.storageDir=hdfs:///streampark/recovery/k8s, jobmanager.bind-host=localhost, yarn.application.queue=game_offline, parallelism.default=1, taskmanager.memory.process.size=1728m, jobmanager.rpc.address=localhost, taskmanager.bind-host=localhost}) is canceling

Screenshots

No response

Are you willing to submit PR?

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

Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions