Marc Rooding created FLINK-10178: ------------------------------------ Summary: Job cancel REST API not working Key: FLINK-10178 URL: https://issues.apache.org/jira/browse/FLINK-10178 Project: Flink Issue Type: Bug Components: REST Affects Versions: 1.6.0, 1.5.2, 1.5.1 Environment: Running as a Docker container using the default flink Docker images. Reporter: Marc Rooding
I've been trying to work with the Flink REST API to cancel a running job. When I deploy a simple job I can retrieve the Job information using the *jobs/overview* endpoint which returns: {code:java} { "jobs": [ { "jid": "f907f847451cfd9231b7d3c0662b149b", "name": "Windowed WordCount", "state": "RUNNING", "start-time": 1534770489437, "end-time": -1, "duration": 72682, "last-modification": 1534770489942, "tasks": { "total": 6, "created": 0, "scheduled": 0, "deploying": 0, "running": 6, "finished": 0, "canceling": 0, "canceled": 0, "failed": 0, "reconciling": 0 } } ] } {code} I can also request more information about the job using the *jobs/f907f847451cfd9231b7d3c0662b149b* endpoint. According to the documentation, I should be able to do a DELETE request to *jobs/f907f847451cfd9231b7d3c0662b149b/cancel.* Doing so returns a 404 with the following body: {code:java} {"errors":["Not found."]}{code} I also tried a GET request to *jobs/**f907f847451cfd9231b7d3c0662b149b/cancel-with-savepoint/.* That simply returns a 404 without a body.** I tried it with Flink 1.5.1, 1.5.2 and 1.6.0 and get consistent results. I looked at which API is being used by the Flink web UI when pressing the 'Cancel' button and that one seems to go to *jobs/**f907f847451cfd9231b7d3c0662b149b/yarn-cancel*. If I do a GET request to that one manually it does actually cancel the job. I've been looking into the Flink source code but couldn't find an immediate clue to what's going on. -- This message was sent by Atlassian JIRA (v7.6.3#76005)