Flink在远程群集错误上运行名称或服务未知

时间:2017-11-01 13:30:45

标签: cluster-computing apache-flink

我已在本地成功测试了我的Flink wordcount应用,但在群集上运行我遇到了以下错误

Exception in thread "main" org.apache.flink.client.program.ProgramInvocationException: Cannot establish connection to JobManager: hduser@192.168.101.10: Name or service not known

我的flink群集在VirtualBox上创建,包括3个节点,一个Jobmanager和两个TaskManager,而JobManager在地址192.168.101.10和端口6123上运行。

所以在java代码中我使用以下命令来创建StreamExecutionEnvironment对象

final StreamExecutionEnvironment env = StreamExecutionEnvironment.createRemoteEnvironment("hduser@192.168.101.10", 6123);

hduser是用户拥有的JobManager。

我使用命令

在我的主机操作系统(运行VirtualBox)中运行jar文件
java -cp flink-quickstart-java.jar WordCountStreamingCluster --port 9000

更新 如果在以下行中未使用用户名作为群集地址:

final StreamExecutionEnvironment env = StreamExecutionEnvironment.createRemoteEnvironment("192.168.101.10", 6123);

我遇到了以下错误:

22:04:11,106 INFO  
org.apache.flink.streaming.api.environment.RemoteStreamEnvironment  - 
Running remotely at 192.168.101.10:6123
22:04:11,422 INFO  
org.apache.flink.client.program.StandaloneClusterClient       - 
Starting client actor system.
22:04:11,424 INFO  org.apache.flink.runtime.util.LeaderRetrievalUtils            
- Trying to select the network interface and address to use by 
connecting to the leading JobManager.
22:04:11,424 INFO  org.apache.flink.runtime.util.LeaderRetrievalUtils            
- TaskManager will try to connect for 10000 milliseconds before 
falling back to heuristics
22:04:11,432 INFO  org.apache.flink.runtime.net.ConnectionUtils                  
- Retrieved new target address /192.168.101.10:6123.
Exception in thread "main" 
org.apache.flink.client.program.ProgramInvocationException: Could not 
start the ActorSystem needed to talk to the JobManager.
at org.apache.flink.client.program.ClusterClient.run(ClusterClient.java:461)
at org.apache.flink.client.program.StandaloneClusterClient.submitJob(StandaloneClusterClient.java:105)
at org.apache.flink.client.program.ClusterClient.run(ClusterClient.java:442)
at org.apache.flink.client.program.ClusterClient.run(ClusterClient.java:434)
at org.apache.flink.streaming.api.environment.RemoteStreamEnvironment.executeRemotely(RemoteStreamEnvironment.java:212)
at org.apache.flink.streaming.api.environment.RemoteStreamEnvironment.execute(RemoteStreamEnvironment.java:176)
at WordCountStreamingCluster.main(WordCountStreamingCluster.java:39)
Caused by: org.apache.flink.util.FlinkException: Could not start the 
ActorSystem lazily.
at org.apache.flink.client.program.ClusterClient$LazyActorSystemLoader.get(ClusterClient.java:230)
at org.apache.flink.client.program.ClusterClient.run(ClusterClient.java:459)
... 6 more
Caused by: com.typesafe.config.ConfigException$Missing: No 
configuration setting found for key 'akka.version'
at com.typesafe.config.impl.SimpleConfig.findKey(SimpleConfig.java:124)
at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:145)
at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:151)
at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:159)
at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:164)
at com.typesafe.config.impl.SimpleConfig.getString(SimpleConfig.java:206)
at akka.actor.ActorSystem$Settings.<init>(ActorSystem.scala:169)
at akka.actor.ActorSystemImpl.<init>(ActorSystem.scala:505)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:142)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:119)
at akka.actor.ActorSystem$.create(ActorSystem.scala:67)
at org.apache.flink.runtime.akka.AkkaUtils$.createActorSystem(AkkaUtils.scala:104)
at org.apache.flink.runtime.akka.AkkaUtils$.createActorSystem(AkkaUtils.scala:92)
at org.apache.flink.runtime.akka.AkkaUtils.createActorSystem(AkkaUtils.scala)
at org.apache.flink.client.program.ClusterClient$LazyActorSystemLoader.get(ClusterClient.java:226)
... 7 more

我该如何解决这个问题?

0 个答案:

没有答案