Spark 工作器节点超时



当我使用sbt run运行我的 Spark 应用程序时,配置指向远程集群的主节点,工作人员不会执行任何有用的操作,并且sbt run日志中反复打印以下警告。

WARN TaskSchedulerImpl: Initial job has not accepted any resources; check your cluster UI to ensure that workers are registered and have sufficient resources

这是我的火花配置的样子:

@transient lazy val conf: SparkConf = new SparkConf()
.setMaster("spark://master-ip:7077")
.setAppName("HelloWorld")
.set("spark.executor.memory", "1g")
.set("spark.driver.memory", "12g")
@transient lazy val sc: SparkContext = new SparkContext(conf)
val lines   = sc.textFile("hdfs://master-public-dns:9000/test/1000.csv")

我知道此警告通常在群集配置错误且辅助角色没有资源或首先未启动时出现。 但是,根据我的 Spark UI(在 master-ip:8080 上),工作节点似乎有足够的 RAM 和 CPU 内核,它们甚至尝试执行我的应用程序,但它们退出并将其保留stderr日志中:

INFO SecurityManager: SecurityManager: authentication disabled; ui acls disabled; 
users  with view permissions: Set(ubuntu, myuser); 
groups with view permissions: Set(); users  with modify permissions: Set(ubuntu, myuser); groups with modify permissions: Set()
Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1713)
...
Caused by: java.util.concurrent.TimeoutException: Cannot receive any reply from 192.168.0.11:35996 in 120 seconds
... 8 more
ERROR RpcOutboxMessage: Ask timeout before connecting successfully

有什么想法吗?

无法在 120 秒内收到来自 192.168.0.11:35996 的任何回复

您能否从worker远程登录到此IP上的此端口,也许您的驱动程序计算机具有多个网络接口,请尝试在$SPARK_HOME/conf/spark-env.sh 中设置SPARK_LOCAL_IP

最新更新