flink-user-zh mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 郑 洁锋 <zjfpla...@hotmail.com>
Subject Re: Re: flink on yarn jdk版本问题
Date Wed, 15 Jan 2020 08:33:52 GMT
果然是,yarn上的jdk版本升级后就可以了。。

________________________________
zjfplayer@hotmail.com

发件人: tison<mailto:wander4096@gmail.com>
发送时间: 2020-01-15 14:22
收件人: user-zh<mailto:user-zh@flink.apache.org>
抄送: Benchao Li<mailto:libenchao@gmail.com>
主题: Re: Re: flink on yarn jdk版本问题
玄学问题,升级 JDK 小版本可接,或与类型擦除有关

你可以share一下 JM 侧的日志,应该有作业执行异常

Best,
tison.


郑 洁锋 <zjfplayer@hotmail.com> 于2020年1月15日周三 下午2:17写道:

> Hi,
>
>     非常感谢,可以了,我在flink-conf.yaml中添加了如下配置项即可正常运行
yarn-session.sh了,且Flink Dashboard也能正常查看了
>
>         containerized.master.env.JAVA_HOME: /usr/java/jdk1.8.0_25/
>
>          containerized.taskmanager.env.JAVA_HOME: /usr/java/jdk1.8.0_25/
>
>
> 但是在运行官方例子https://ci.apache.org/projects/flink/flink-docs-release-1.9/zh/getting-started/tutorials/local_setup.html#run-the-example,测试时报错了:
>
>
> bin/flink run examples/streaming/SocketWindowWordCount.jar  --port 9000
> 2020-01-15 00:46:25,574 INFO  org.apache.flink.yarn.cli.FlinkYarnSessionCli         
       - Found Yarn properties file under /tmp/.yarn-properties-root.
> 2020-01-15 00:46:25,574 INFO  org.apache.flink.yarn.cli.FlinkYarnSessionCli         
       - Found Yarn properties file under /tmp/.yarn-properties-root.
> 2020-01-15 00:46:26,097 INFO  org.apache.flink.yarn.cli.FlinkYarnSessionCli         
       - YARN properties set default parallelism to 4
> 2020-01-15 00:46:26,097 INFO  org.apache.flink.yarn.cli.FlinkYarnSessionCli         
       - YARN properties set default parallelism to 4
> YARN properties set default parallelism to 4
> 2020-01-15 00:46:26,293 INFO  org.apache.flink.yarn.cli.FlinkYarnSessionCli         
       - No path for the flink jar passed. Using the location of class org.apache.flink.yarn.YarnClusterDescriptor
to locate the jar
> 2020-01-15 00:46:26,293 INFO  org.apache.flink.yarn.cli.FlinkYarnSessionCli         
       - No path for the flink jar passed. Using the location of class org.apache.flink.yarn.YarnClusterDescriptor
to locate the jar
> 2020-01-15 00:46:26,375 INFO  org.apache.flink.yarn.AbstractYarnClusterDescriptor   
       - Found application JobManager host name 'tdh-2' and port '8181' from supplied application
id 'application_1578968334899_0010'
> Starting execution of program
> ------------------------------------------------------------
>  The program finished with the following exception:
> org.apache.flink.client.program.ProgramInvocationException: Could not retrieve the execution
result. (JobID: aaf4720f0c432de8d91b848838589c62)
> at org.apache.flink.client.program.rest.RestClusterClient.submitJob(RestClusterClient.java:255)
> at org.apache.flink.client.program.ClusterClient.run(ClusterClient.java:338)
> at org.apache.flink.streaming.api.environment.StreamContextEnvironment.execute(StreamContextEnvironment.java:60)
> at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.java:1507)
> at org.apache.flink.streaming.examples.socket.SocketWindowWordCount.main(SocketWindowWordCount.java:92)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:576)
> at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:438)
> at org.apache.flink.client.program.ClusterClient.run(ClusterClient.java:274)
> at org.apache.flink.client.cli.CliFrontend.executeProgram(CliFrontend.java:746)
> at org.apache.flink.client.cli.CliFrontend.runProgram(CliFrontend.java:273)
> at org.apache.flink.client.cli.CliFrontend.run(CliFrontend.java:205)
> at org.apache.flink.client.cli.CliFrontend.parseParameters(CliFrontend.java:1010)
> at org.apache.flink.client.cli.CliFrontend.lambda$main$10(CliFrontend.java:1083)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.security.auth.Subject.doAs(Subject.java:422)
> at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1754)
> at org.apache.flink.runtime.security.HadoopSecurityContext.runSecured(HadoopSecurityContext.java:41)
> at org.apache.flink.client.cli.CliFrontend.main(CliFrontend.java:1083)
> Caused by: org.apache.flink.runtime.client.JobSubmissionException: Failed to submit JobGraph.
> at org.apache.flink.client.program.rest.RestClusterClient.lambda$submitJob$8(RestClusterClient.java:382)
> at java.util.concurrent.CompletableFuture.uniExceptionally(CompletableFuture.java:870)
> at java.util.concurrent.CompletableFuture$UniExceptionally.tryFire(CompletableFuture.java:852)
> at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
> at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977)
> at org.apache.flink.runtime.concurrent.FutureUtils.lambda$retryOperationWithDelay$8(FutureUtils.java:263)
> at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:760)
> at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:736)
> at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
> at java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:561)
> at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:929)
> at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:442)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: org.apache.flink.runtime.rest.util.RestClientException: [Internal server error.,
<Exception on server side:
> akka.pattern.AskTimeoutException: Ask timed out on [Actor[akka://flink/user/dispatcher#54443530]]
after [10000 ms]. Message of type [org.apache.flink.runtime.rpc.messages.LocalFencedMessage].
A typical reason for `AskTimeoutException` is that the recipient actor didn't send a reply.
> at akka.pattern.PromiseActorRef$$anonfun$2.apply(AskSupport.scala:635)
> at akka.pattern.PromiseActorRef$$anonfun$2.apply(AskSupport.scala:635)
> at akka.pattern.PromiseActorRef$$anonfun$1.apply$mcV$sp(AskSupport.scala:648)
> at akka.actor.Scheduler$$anon$4.run(Scheduler.scala:205)
> at scala.concurrent.Future$InternalCallbackExecutor$.unbatchedExecute(Future.scala:601)
> at scala.concurrent.BatchingExecutor$class.execute(BatchingExecutor.scala:109)
> at scala.concurrent.Future$InternalCallbackExecutor$.execute(Future.scala:599)
> at akka.actor.LightArrayRevolverScheduler$TaskHolder.executeTask(LightArrayRevolverScheduler.scala:328)
> at akka.actor.LightArrayRevolverScheduler$$anon$4.executeBucket$1(LightArrayRevolverScheduler.scala:279)
> at akka.actor.LightArrayRevolverScheduler$$anon$4.nextTick(LightArrayRevolverScheduler.scala:283)
> at akka.actor.LightArrayRevolverScheduler$$anon$4.run(LightArrayRevolverScheduler.scala:235)
> at java.lang.Thread.run(Thread.java:745)
> End of exception on server side>]
> at org.apache.flink.runtime.rest.RestClient.parseResponse(RestClient.java:389)
> at org.apache.flink.runtime.rest.RestClient.lambda$submitRequest$3(RestClient.java:373)
> at java.util.concurrent.CompletableFuture.uniCompose(CompletableFuture.java:952)
> at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:926)
> ... 4 more
>
>
>     有尝试过添加配置:
>     akka.ask.timeout: 20s
>     web.timeout: 20000
>     还是一样的报错(超时时间生效了,日志中变更了)。
>
>     而且dashboard也出现了问题:
>     这个有人遇到过吗,我搜索还有说是flink版本的问题,但是我已经是最新的1.9.1版本了,这个是还未修复的bug还是其他的问题?
>
> ------------------------------
> zjfplayer@hotmail.com
>
>
> *发件人:* Benchao Li <libenchao@gmail.com>
> *发送时间:* 2020-01-15 12:56
> *收件人:* user-zh <user-zh@flink.apache.org>; zjfplayer
> <zjfplayer@hotmail.com>
> *主题:* Re: flink on yarn jdk版本问题
> Hi ,
>
> Flink也支持传递环境变量的,也可以尝试一下:
> https://ci.apache.org/projects/flink/flink-docs-master/ops/config.html#configuration-runtime-environment-variables
>
> 郑 洁锋 <zjfplayer@hotmail.com> 于2020年1月15日周三 上午11:34写道:
>
>> Hi,
>>
>> 我们使用了TDH中的yarn(hadoop2.7,jdk1.7),原先使用spark的时候,也遇到过jdk版本最低1.8的情况,我们是通过如下方式解决的(考虑到现场公用TDH集群不能更改):
>>         spark-submit中可以通过添加参数 --conf
>> "spark.yarn.appMasterEnv.JAVA_HOME=/usr/java/jdk1.8.0_25/" --conf
>> "spark.executorEnv.JAVA_HOME=/usr/java/jdk1.8.0_25/"来指定当前spark任务特定在yarn中执行时的jdk目录
>>
>>         请问下flink启动&提交任务时(bin/yarn-session.sh&flink
>> run)有没有参数可以指定flink特定使用yarn时的jdk目录,flink中是否有这样的功能?(不影响其他yarn上应用正常运行)
>>
>>
>>
>> ________________________________
>> zjfplayer@hotmail.com
>>
>
>
> --
>
> Benchao Li
> School of Electronics Engineering and Computer Science, Peking University
> Tel:+86-15650713730
> Email: libenchao@gmail.com; libenchao@pku.edu.cn
>
>
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message