Apache Flink 示例作业无法 运行 且 "Job not found"

Apache Flink example job fails to run with "Job not found"

正在尝试 运行 在 flink 站点 here 上找到的 SocketWindowWordCount 示例教程 here

我启动了flink集群,然后运行一个本地套接字服务器:

nc -l 9000

编译取自 github 的示例源代码后,我 运行 作业

flink run target/SocketWindowWordCount.jar  --port 9000

然后我在终端 运行ning nc 上输入了一些单词。没有任何内容进入预期的输出文件并且日志重复出现此错误:

2019-07-09 15:54:32,673 ERROR org.apache.flink.runtime.rest.handler.job.JobDetailsHandler   - Exception occurred in REST handler: Job f9b3c58ca3026855fd2612e3c86551fa not found
2019-07-09 15:54:35,673 ERROR org.apache.flink.runtime.rest.handler.job.JobDetailsHandler   - Exception occurred in REST handler: Job f9b3c58ca3026855fd2612e3c86551fa not found
2019-07-09 15:54:38,673 ERROR org.apache.flink.runtime.rest.handler.job.JobDetailsHandler   - Exception occurred in REST handler: Job f9b3c58ca3026855fd2612e3c86551fa not found
2019-07-09 15:54:39,769 ERROR org.apache.flink.runtime.rest.handler.job.JobDetailsHandler   - Exception occurred in REST handler: Job f9b3c58ca3026855fd2612e3c86551fa not found

当您在浏览器中打开 Flink UI 选项卡时,通常会发生这种情况,该选项卡在之前的作业部署中保持打开状态。 所以 UI 指向 URL 和 http://.../f9b3c58ca3026855fd2612e3c86551fa 这是一个不存在的 JobID。这会导致显示上述日志。