在flink中的wordcount示例中,与JobManager的通信失败错误

时间:2015-12-16 16:48:07

标签: scala word-count apache-flink

我尝试运行wordcount示例: ../bin/flink run WordCount.jar

并给我一个"与JobManager的通信失败错误"执行后几分钟。

源: https://github.com/apache/flink/blob/master/flink-examples/flink-scala-examples

例外情况如下:

Executing WordCount example with built-in default data.
  Provide parameters to read input data from a file.
  Usage: WordCount <text path> <result path>
org.apache.flink.client.program.ProgramInvocationException: The program execution failed: Communication with JobManager failed: Lost connection to the JobManager.
  at org.apache.flink.client.program.Client.runBlocking(Client.java:370)
  at org.apache.flink.client.program.Client.runBlocking(Client.java:348)
  at org.apache.flink.client.program.Client.runBlocking(Client.java:315)
  at org.apache.flink.client.program.ContextEnvironment.execute(ContextEnvironment.java:70)
  at org.apache.flink.api.java.ExecutionEnvironment.execute(ExecutionEnvironment.java:804)
  at org.apache.flink.api.java.DataSet.collect(DataSet.java:410)
  at org.apache.flink.api.java.DataSet.print(DataSet.java:1495)
  at org.apache.flink.examples.java.wordcount.WordCount.main(WordCount.java:80)
  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:483)
  at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:497)
  at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:395)
  at org.apache.flink.client.program.Client.runBlocking(Client.java:252)
  at org.apache.flink.client.CliFrontend.executeProgramBlocking(CliFrontend.java:675)
  at org.apache.flink.client.CliFrontend.run(CliFrontend.java:326)
  at org.apache.flink.client.CliFrontend.parseParameters(CliFrontend.java:977)
  at org.apache.flink.client.CliFrontend.main(CliFrontend.java:1027)
Caused by: org.apache.flink.runtime.client.JobExecutionException: Communication with JobManager failed: Lost connection to the JobManager.
  at org.apache.flink.runtime.client.JobClient.submitJobAndWait(JobClient.java:141)
  at org.apache.flink.client.program.Client.runBlocking(Client.java:368)
... 18 more
Caused by: org.apache.flink.runtime.client.JobClientActorConnectionTimeoutException: Lost connection to the JobManager.
  at org.apache.flink.runtime.client.JobClientActor.handleMessage(JobClientActor.java:243)
  at org.apache.flink.runtime.akka.FlinkUntypedActor.handleLeaderSessionID(FlinkUntypedActor.java:88)
  at org.apache.flink.runtime.akka.FlinkUntypedActor.onReceive(FlinkUntypedActor.java:68)
  at akka.actor.UntypedActor$$anonfun$receive$1.applyOrElse(UntypedActor.scala:167)
  at akka.actor.Actor$class.aroundReceive(Actor.scala:465)
  at akka.actor.UntypedActor.aroundReceive(UntypedActor.scala:97)
  at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516)
  at akka.actor.ActorCell.invoke(ActorCell.scala:487)
/src/main/scala/org/apache/flink/examples/scala/wordcount/WordCount.scala
  at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:254)
  at akka.dispatch.Mailbox.run(Mailbox.scala:221)
  at akka.dispatch.Mailbox.exec(Mailbox.scala:231)  
  at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)   
  at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.pollAndExecAll(ForkJoinPool.java:1253)
  at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1346)
  at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
  at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

尝试运行命令时发生上述异常。

1 个答案:

答案 0 :(得分:3)

我解决了分析@Till建议的日志的问题。 服务器运行不正常。重启所有已解决的服务器。