根据官网[1]使用docker部署flink,session cluster模式
环境win10+docker+flink1.11.2 cmd命令 docker run ^ -d^ --rm ^ --name=jobmanager ^ --hostname=jobmanager ^ --network flink-network ^ --env FLINK_PROPERTIES="jobmanager.rpc.address: jobmanager" ^ -p 28081:8081 ^ flink:1.11.2-scala_2.11 jobmanager docker run ^ -d^ --rm ^ --name=taskmanager ^ --hostname=taskmanager ^ --network flink-network ^ --env FLINK_PROPERTIES="jobmanager.rpc.address: jobmanager" ^ flink:1.11.2-scala_2.11 taskmanager 问题一: 在webui查看任务输出stdout提示找不到输出文件 java.util.concurrent.CompletionException: org.apache.flink.util.FlinkException: The file STDOUT does not exist on the TaskExecutor. at org.apache.flink.runtime.taskexecutor.TaskExecutor.lambda$requestFileUploadByFilePath$25(TaskExecutor.java:1742) ~[flink-dist_2.11-1.11.2.jar:1.11.2] at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604) ~[?:1.8.0_265] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_265] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_265] at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_265] Caused by: org.apache.flink.util.FlinkException: The file STDOUT does not exist on the TaskExecutor. ... 5 more 2020-09-27 09:04:33,370 ERROR org.apache.flink.runtime.rest.handler.taskmanager.TaskManagerStdoutFileHandler [] - Unhandled exception. org.apache.flink.util.FlinkException: The file STDOUT does not exist on the TaskExecutor. at org.apache.flink.runtime.taskexecutor.TaskExecutor.lambda$requestFileUploadByFilePath$25(TaskExecutor.java:1742) ~[flink-dist_2.11-1.11.2.jar:1.11.2] at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604) ~[?:1.8.0_265] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_265] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_265] at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_265] 问题二: mount的src的配置文件要多份吗 因为我把env替换成mount,如下 docker run ^ -d^ --rm ^ --name=jobmanager ^ --network flink-network ^ --mount type=bind,src=D:/cxy/soft/flink-1.11.2/conf,target=/opt/flink/conf ^ -p 28081:8081 ^ flink:1.11.2-scala_2.11 jobmanager docker run ^ -d^ --rm ^ --name=taskmanager ^ --network flink-network ^ --mount type=bind,src=D:/cxy/soft/flink-1.11.2/conf,target=/opt/flink/conf ^ flink:1.11.2-scala_2.11 taskmanager 结果发现webui上的可用Task Managers为0 每次执行命令的时候都会把mount配置的src下flink-conf.yaml中的jobmanager.rpc.address替换成了新的容器ip 我猜应该是这个原因导致启动taskmanager的时候jobmanager.rpc.address替换成了taskmanager的ip.所以没有Task可用 想问下大佬们,是我哪一步出现问题了吗 [1]:https://ci.apache.org/projects/flink/flink-docs-release-1.11/ops/deployment/docker.html |
第一个问题,因为默认情况下JM/TM进程的STDOUT已经输出到console,所以是没有办公通过webui查看STDOUT输出的
可以通过docker logs来查看,当然你也可以修改启动命令,把STDOUT重定向到具体的文件 第二个问题,在JobManager和TaskManager的docker-entrypoint.sh[1]里面会修改flink-conf.yaml的, 所以你mount进去会被修改掉 [1]. https://github.com/apache/flink-docker/blob/dev-1.11/docker-entrypoint.sh Best, Yang chenxuying <[hidden email]> 于2020年9月27日周日 下午7:56写道: > 根据官网[1]使用docker部署flink,session cluster模式 > 环境win10+docker+flink1.11.2 > cmd命令 > docker run ^ > -d^ > --rm ^ > --name=jobmanager ^ > --hostname=jobmanager ^ > --network flink-network ^ > --env FLINK_PROPERTIES="jobmanager.rpc.address: jobmanager" ^ > -p 28081:8081 ^ > flink:1.11.2-scala_2.11 jobmanager > docker run ^ > -d^ > --rm ^ > --name=taskmanager ^ > --hostname=taskmanager ^ > --network flink-network ^ > --env FLINK_PROPERTIES="jobmanager.rpc.address: jobmanager" ^ > flink:1.11.2-scala_2.11 taskmanager > > > 问题一: > 在webui查看任务输出stdout提示找不到输出文件 > java.util.concurrent.CompletionException: > org.apache.flink.util.FlinkException: The file STDOUT does not exist on the > TaskExecutor. > at > org.apache.flink.runtime.taskexecutor.TaskExecutor.lambda$requestFileUploadByFilePath$25(TaskExecutor.java:1742) > ~[flink-dist_2.11-1.11.2.jar:1.11.2] > at > java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604) > ~[?:1.8.0_265] > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) > ~[?:1.8.0_265] > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) > ~[?:1.8.0_265] > at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_265] > Caused by: org.apache.flink.util.FlinkException: The file STDOUT does not > exist on the TaskExecutor. > ... 5 more > 2020-09-27 09:04:33,370 ERROR > org.apache.flink.runtime.rest.handler.taskmanager.TaskManagerStdoutFileHandler > [] - Unhandled exception. > org.apache.flink.util.FlinkException: The file STDOUT does not exist on > the TaskExecutor. > at > org.apache.flink.runtime.taskexecutor.TaskExecutor.lambda$requestFileUploadByFilePath$25(TaskExecutor.java:1742) > ~[flink-dist_2.11-1.11.2.jar:1.11.2] > at > java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604) > ~[?:1.8.0_265] > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) > ~[?:1.8.0_265] > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) > ~[?:1.8.0_265] > at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_265] > > > > > 问题二: > mount的src的配置文件要多份吗 > 因为我把env替换成mount,如下 > docker run ^ > -d^ > --rm ^ > --name=jobmanager ^ > --network flink-network ^ > --mount type=bind,src=D:/cxy/soft/flink-1.11.2/conf,target=/opt/flink/conf > ^ > -p 28081:8081 ^ > flink:1.11.2-scala_2.11 jobmanager > > > docker run ^ > -d^ > --rm ^ > --name=taskmanager ^ > --network flink-network ^ > --mount type=bind,src=D:/cxy/soft/flink-1.11.2/conf,target=/opt/flink/conf > ^ > flink:1.11.2-scala_2.11 taskmanager > > > 结果发现webui上的可用Task Managers为0 > 每次执行命令的时候都会把mount配置的src下flink-conf.yaml中的jobmanager.rpc.address替换成了新的容器ip > > 我猜应该是这个原因导致启动taskmanager的时候jobmanager.rpc.address替换成了taskmanager的ip.所以没有Task可用 > 想问下大佬们,是我哪一步出现问题了吗 > > > [1]: > https://ci.apache.org/projects/flink/flink-docs-release-1.11/ops/deployment/docker.html |
请问一下第一个问题您说的修改启动命令,有例子吗,或者什么文档可以参考
在 2020-09-28 12:50:25,"Yang Wang" <[hidden email]> 写道: >第一个问题,因为默认情况下JM/TM进程的STDOUT已经输出到console,所以是没有办公通过webui查看STDOUT输出的 >可以通过docker logs来查看,当然你也可以修改启动命令,把STDOUT重定向到具体的文件 > >第二个问题,在JobManager和TaskManager的docker-entrypoint.sh[1]里面会修改flink-conf.yaml的, >所以你mount进去会被修改掉 > >[1]. >https://github.com/apache/flink-docker/blob/dev-1.11/docker-entrypoint.sh > > >Best, >Yang > >chenxuying <[hidden email]> 于2020年9月27日周日 下午7:56写道: > >> 根据官网[1]使用docker部署flink,session cluster模式 >> 环境win10+docker+flink1.11.2 >> cmd命令 >> docker run ^ >> -d^ >> --rm ^ >> --name=jobmanager ^ >> --hostname=jobmanager ^ >> --network flink-network ^ >> --env FLINK_PROPERTIES="jobmanager.rpc.address: jobmanager" ^ >> -p 28081:8081 ^ >> flink:1.11.2-scala_2.11 jobmanager >> docker run ^ >> -d^ >> --rm ^ >> --name=taskmanager ^ >> --hostname=taskmanager ^ >> --network flink-network ^ >> --env FLINK_PROPERTIES="jobmanager.rpc.address: jobmanager" ^ >> flink:1.11.2-scala_2.11 taskmanager >> >> >> 问题一: >> 在webui查看任务输出stdout提示找不到输出文件 >> java.util.concurrent.CompletionException: >> org.apache.flink.util.FlinkException: The file STDOUT does not exist on the >> TaskExecutor. >> at >> org.apache.flink.runtime.taskexecutor.TaskExecutor.lambda$requestFileUploadByFilePath$25(TaskExecutor.java:1742) >> ~[flink-dist_2.11-1.11.2.jar:1.11.2] >> at >> java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604) >> ~[?:1.8.0_265] >> at >> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) >> ~[?:1.8.0_265] >> at >> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) >> ~[?:1.8.0_265] >> at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_265] >> Caused by: org.apache.flink.util.FlinkException: The file STDOUT does not >> exist on the TaskExecutor. >> ... 5 more >> 2020-09-27 09:04:33,370 ERROR >> org.apache.flink.runtime.rest.handler.taskmanager.TaskManagerStdoutFileHandler >> [] - Unhandled exception. >> org.apache.flink.util.FlinkException: The file STDOUT does not exist on >> the TaskExecutor. >> at >> org.apache.flink.runtime.taskexecutor.TaskExecutor.lambda$requestFileUploadByFilePath$25(TaskExecutor.java:1742) >> ~[flink-dist_2.11-1.11.2.jar:1.11.2] >> at >> java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604) >> ~[?:1.8.0_265] >> at >> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) >> ~[?:1.8.0_265] >> at >> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) >> ~[?:1.8.0_265] >> at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_265] >> >> >> >> >> 问题二: >> mount的src的配置文件要多份吗 >> 因为我把env替换成mount,如下 >> docker run ^ >> -d^ >> --rm ^ >> --name=jobmanager ^ >> --network flink-network ^ >> --mount type=bind,src=D:/cxy/soft/flink-1.11.2/conf,target=/opt/flink/conf >> ^ >> -p 28081:8081 ^ >> flink:1.11.2-scala_2.11 jobmanager >> >> >> docker run ^ >> -d^ >> --rm ^ >> --name=taskmanager ^ >> --network flink-network ^ >> --mount type=bind,src=D:/cxy/soft/flink-1.11.2/conf,target=/opt/flink/conf >> ^ >> flink:1.11.2-scala_2.11 taskmanager >> >> >> 结果发现webui上的可用Task Managers为0 >> 每次执行命令的时候都会把mount配置的src下flink-conf.yaml中的jobmanager.rpc.address替换成了新的容器ip >> >> 我猜应该是这个原因导致启动taskmanager的时候jobmanager.rpc.address替换成了taskmanager的ip.所以没有Task可用 >> 想问下大佬们,是我哪一步出现问题了吗 >> >> >> [1]: >> https://ci.apache.org/projects/flink/flink-docs-release-1.11/ops/deployment/docker.html |
你可以自己写一个脚本,调用docker-entrypoint.sh,然后将输出重定向就可以
>/opt/flink/log/taskmanager.out 2>/opt/flink/log/taskmanager.err docker run的时候通过--entrypoint设置为你新的脚本就好了 Best, Yang chenxuying <[hidden email]> 于2020年9月28日周一 下午3:37写道: > 请问一下第一个问题您说的修改启动命令,有例子吗,或者什么文档可以参考 > > > > > 在 2020-09-28 12:50:25,"Yang Wang" <[hidden email]> 写道: > >第一个问题,因为默认情况下JM/TM进程的STDOUT已经输出到console,所以是没有办公通过webui查看STDOUT输出的 > >可以通过docker logs来查看,当然你也可以修改启动命令,把STDOUT重定向到具体的文件 > > > > >第二个问题,在JobManager和TaskManager的docker-entrypoint.sh[1]里面会修改flink-conf.yaml的, > >所以你mount进去会被修改掉 > > > >[1]. > >https://github.com/apache/flink-docker/blob/dev-1.11/docker-entrypoint.sh > > > > > >Best, > >Yang > > > >chenxuying <[hidden email]> 于2020年9月27日周日 下午7:56写道: > > > >> 根据官网[1]使用docker部署flink,session cluster模式 > >> 环境win10+docker+flink1.11.2 > >> cmd命令 > >> docker run ^ > >> -d^ > >> --rm ^ > >> --name=jobmanager ^ > >> --hostname=jobmanager ^ > >> --network flink-network ^ > >> --env FLINK_PROPERTIES="jobmanager.rpc.address: jobmanager" ^ > >> -p 28081:8081 ^ > >> flink:1.11.2-scala_2.11 jobmanager > >> docker run ^ > >> -d^ > >> --rm ^ > >> --name=taskmanager ^ > >> --hostname=taskmanager ^ > >> --network flink-network ^ > >> --env FLINK_PROPERTIES="jobmanager.rpc.address: jobmanager" ^ > >> flink:1.11.2-scala_2.11 taskmanager > >> > >> > >> 问题一: > >> 在webui查看任务输出stdout提示找不到输出文件 > >> java.util.concurrent.CompletionException: > >> org.apache.flink.util.FlinkException: The file STDOUT does not exist on > the > >> TaskExecutor. > >> at > >> > org.apache.flink.runtime.taskexecutor.TaskExecutor.lambda$requestFileUploadByFilePath$25(TaskExecutor.java:1742) > >> ~[flink-dist_2.11-1.11.2.jar:1.11.2] > >> at > >> > java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604) > >> ~[?:1.8.0_265] > >> at > >> > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) > >> ~[?:1.8.0_265] > >> at > >> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) > >> ~[?:1.8.0_265] > >> at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_265] > >> Caused by: org.apache.flink.util.FlinkException: The file STDOUT does > not > >> exist on the TaskExecutor. > >> ... 5 more > >> 2020-09-27 09:04:33,370 ERROR > >> > org.apache.flink.runtime.rest.handler.taskmanager.TaskManagerStdoutFileHandler > >> [] - Unhandled exception. > >> org.apache.flink.util.FlinkException: The file STDOUT does not exist on > >> the TaskExecutor. > >> at > >> > org.apache.flink.runtime.taskexecutor.TaskExecutor.lambda$requestFileUploadByFilePath$25(TaskExecutor.java:1742) > >> ~[flink-dist_2.11-1.11.2.jar:1.11.2] > >> at > >> > java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604) > >> ~[?:1.8.0_265] > >> at > >> > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) > >> ~[?:1.8.0_265] > >> at > >> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) > >> ~[?:1.8.0_265] > >> at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_265] > >> > >> > >> > >> > >> 问题二: > >> mount的src的配置文件要多份吗 > >> 因为我把env替换成mount,如下 > >> docker run ^ > >> -d^ > >> --rm ^ > >> --name=jobmanager ^ > >> --network flink-network ^ > >> --mount > type=bind,src=D:/cxy/soft/flink-1.11.2/conf,target=/opt/flink/conf > >> ^ > >> -p 28081:8081 ^ > >> flink:1.11.2-scala_2.11 jobmanager > >> > >> > >> docker run ^ > >> -d^ > >> --rm ^ > >> --name=taskmanager ^ > >> --network flink-network ^ > >> --mount > type=bind,src=D:/cxy/soft/flink-1.11.2/conf,target=/opt/flink/conf > >> ^ > >> flink:1.11.2-scala_2.11 taskmanager > >> > >> > >> 结果发现webui上的可用Task Managers为0 > >> > 每次执行命令的时候都会把mount配置的src下flink-conf.yaml中的jobmanager.rpc.address替换成了新的容器ip > >> > >> > 我猜应该是这个原因导致启动taskmanager的时候jobmanager.rpc.address替换成了taskmanager的ip.所以没有Task可用 > >> 想问下大佬们,是我哪一步出现问题了吗 > >> > >> > >> [1]: > >> > https://ci.apache.org/projects/flink/flink-docs-release-1.11/ops/deployment/docker.html > |
In reply to this post by Yang Wang
你好,我这边看到您在另一个问题[1]中有做了相关的回答,
我在k8s上部署是遇到相同的问题,相同的错误,您这边是否有空帮忙试试看是不是flink-docker的bug, 还是我的什么配置错了 我也发出了一个新的问题[2] [1]:http://apache-flink.147419.n8.nabble.com/flink-1-11-on-kubernetes-td4586.html#a4692 [2]:http://apache-flink.147419.n8.nabble.com/flink1-11-2-k8s-volume-Read-only-file-system-td7555.html -- Sent from: http://apache-flink.147419.n8.nabble.com/ |
Free forum by Nabble | Edit this page |