apache-spark org.apache.spark.rpc.RpcTimeoutException: Cannot receive any reply in 120

spark心跳超时分析 Cannot receive any reply in 120 seconds. org.apache.spark.rpc.RpcTimeoutException: Cannot receive any reply in 120 seconds. This timeout is controlled by spark.rpc.askTimeout         at org.apache.spark.rpc.RpcTimeout.org$apache$spark$rpc$R 阅读详情

I has configured a spark cluster in standalone mode. I can see that both workers are running, but when I start a spark-shell I have this problem: Configuration of spark cluster is automatic.

val lines=sc.parallelize(List(1,2,3,4))

this work ok the new rdd has created but when I start the next task

lines.take(2).foreach(println) 

I have this error that i cant solve:

Output:

 16/02/18 10:27:02 INFO DAGScheduler: Got job 0 (take at :24) with 1 output partitions
 16/02/18 10:27:02 INFO DAGScheduler: Final stage: ResultStage 0 (take at :24)
 16/02/18 10:27:02 INFO DAGScheduler: Parents of final stage: List() 
 16/02/18 10:27:02 INFO DAGScheduler: Missing parents: List() 
 16/02/18 10:27:02 INFO DAGScheduler: Submitting ResultStage 0 (ParallelCollectionRDD[0] at parallelize at :21), which has no missing parents
 16/02/18 10:27:03 INFO MemoryStore: Block broadcast_0 stored as values in memory (estimated size 1288.0 B, free 1288.0 B)
 16/02/18 10:27:04 INFO MemoryStore: Block broadcast_0_piece0 stored as bytes in memory (estimated size 856.0 B, free 2.1 KB)

A minute and a half later:

16/02/18 10:28:43 WARN NettyRpcEndpointRef: Error sending message [message = RemoveExecutor(0,java.io.IOException: Failed to create directory /srv/spark/work/app-20160218102438-0000/0)] in 2 attempts org.apache.spark.rpc.RpcTimeoutException:
Cannot receive any reply in 120 seconds. This timeout is controlled by spark.rpc.askTimeout
    at org.apache.spark.rpc.RpcTimeout.org$apache$spark$rpc$RpcTimeout$$createRpcTimeoutException(RpcTimeout.scala:48)
    at org.apache.spark.rpc.RpcTimeout$$anonfun$addMessageIfTimeout$1.applyOrElse(RpcTimeout.scala:63)
    at org.apache.spark.rpc.RpcTimeout$$anonfun$addMessageIfTimeout$1.applyOrElse(RpcTimeout.scala:59)
    at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:33) 
    at scala.util.Failure$$anonfun$recover$1.apply(Try.scala:185)
    at scala.util.Try$.apply(Try.scala:161)
    at scala.util.Failure.recover(Try.scala:185)
    at scala.concurrent.Future$$anonfun$recover$1.apply(Future.scala:324) 
    at scala.concurrent.Future$$anonfun$recover$1.apply(Future.scala:324) 
    at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)
    at org.spark-project.guava.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:293) 
    at scala.concurrent.impl.ExecutionContextImpl$$anon$1.execute(ExecutionContextImpl.scala:133) 
    at scala.concurrent.impl.CallbackRunnable.executeWithValue(Promise.scala:40) 
    at scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:248) 
    at scala.concurrent.Promise$class.complete(Promise.scala:55) 
    at scala.concurrent.impl.Promise$DefaultPromise.complete(Promise.scala:153) 
    at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235) 
    at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235) 
    at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32) 
    at scala.concurrent.Future$InternalCallbackExecutor$Batch$$anonfun$run$1.processBatch$1(Future.scala:643) 
    at scala.concurrent.Future$InternalCallbackExecutor$Batch$$anonfun$run$1.apply$mcV$sp(Future.scala:658)
    at scala.concurrent.Future$InternalCallbackExecutor$Batch$$anonfun$run$1.apply(Future.scala:635) 
    at scala.concurrent.Future$InternalCallbackExecutor$Batch$$anonfun$run$1.apply(Future.scala:635) 
    at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:72) 
    at scala.concurrent.Future$InternalCallbackExecutor$Batch.run(Future.scala:634) 
    at scala.concurrent.Future$InternalCallbackExecutor$.scala$concurrent$Future$InternalCallbackExecutor$$unbatchedExecute(Future.scala:694) 
    at scala.concurrent.Future$InternalCallbackExecutor$.execute(Future.scala:685) 
    at scala.concurrent.impl.CallbackRunnable.executeWithValue(Promise.scala:40) 
    at scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:248) 
    at scala.concurrent.Promise$class.tryFailure(Promise.scala:112) 
    at scala.concurrent.impl.Promise$DefaultPromise.tryFailure(Promise.scala:153) 
    at org.apache.spark.rpc.netty.NettyRpcEnv$$anon$1.run(NettyRpcEnv.scala:241) 
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) 
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
    at java.lang.Thread.run(Thread.java:745) 
Caused by: java.util.concurrent.TimeoutException: Cannot receive any reply in 120 seconds 
    at org.apache.spark.rpc.netty.NettyRpcEnv$$anon$1.run(NettyRpcEnv.scala:242) ... 7 more

In one worker, I can see this log error :

Invalid maximum head size: -Xmxm0M could not create JVM

and also I can see a some problem I think that is related to a problem with binding a port or something like this.

  • You have to review your spark conf. Ensure both workers can connect by ssh without password. and check that Xmxm0M –  rhernando  Feb 19 '16 at 9:15
  • yes both can connect without password, it is a requirement to set up a cluster in standalone mode. I can see in the UI that the two worker are alive. But when i start a task fail. I can see in the UI the app is launched but the memory per worker is 0. I change spark.executor.memory=1g but i still see 0 MB per node. I am very confuse about this –  Miren  Feb 19 '16 at 9:45 
  • could you share your spark_env.sh? –  rhernando  Feb 19 '16 at 9:56
  • i solve the problem apparently!!! I have a problem in spark_env.sh one of the variables are deprecated and another problem was that i have a variable with the exevutor memory but when i launched the app i see this paramater with the value0 but i launched the spark-shell with parameter --executor-memory=1g and after i launched a task and this task has executed succesfully with one of the worker.–  Miren  Feb 19 '16 at 10:14 
  • Can you tell which one was deprecated? –  Sahil Sareen  May 20 '16 at 12:15

2 Answers

The problem can be in area of ports visibility between spark cluster and client instance.

It is strange from user side but that is the feature of Spark architecture - each Spark node should see client instance and specific port defined by spark.driver.port in SparkContext configuration. This option by default is empty and it's mean that this port will be chosen randomly. As a result with default configuration each Spark node need to see any port of client instance. But you can override spark.driver.port.

It can be a problem if your client machine is behind firewall or inside docker container for example. You need to open this port outside

spark常见问题 写文章只是为了学习总结或者工作内容备忘,不保证及时性和准确性,看到的权当个参考哈! 1. 执行Broadcast大表时,等待超时异常(awaitResult) 现象:org.apache.spark.SparkException: Exception thrown in awaitResult: java.util.concurrent.TimeoutException: Futures ... 阅读详情

相关推荐

大数据常见错误及解决方案

大数据常见错误及解决方案(转载) 1、用./bin/spark-shell启动spark时遇到异常:java.net.BindException: Can’t assign requested address: Service ‘sparkDriver’ failed after 16 retries! 解决方法:add export SPARK_LOCAL_IP=“127.0.0.1” to spark-env.sh 2、java Kafka producer error:ERROR kafka.util

lv_hulk的博客 9886

Spark程序运行常见错误解决方法以及优化

Spark程序运行常见错误解决方法及优化 一.org.apache.spark.shuffle.FetchFailedException 1.问题描述 这种问题一般发生在有大量shuffle操作的时候,task不断的failed,然后又重执行,一直循环下去,非常的耗时。 2.报错提示 (1) missing output loc...

AcceptedLin的博客 5097

stm32 Can通讯过滤器寄存器设置(实验验证)

起因:在使用stm32单片机can通讯时,参考手册的介绍与寄存器封装有差别,不好理解怎么去设置寄存器。在参考一些代码时,对怎么去设置过滤器还是难以理解。 解决: 在寄存器封装库中,我们发现CAN过滤器设置寄存器封装有CAN1->sFilterRegister[ x ].FR1 和 CAN1->sFilterRegister[ x ].FR2 两个寄存器,其封装如下:type

u013984214的专栏 3290

关于spark-submit 使用yarn-client客户端提交spark任务的问题

rpc连接超时 17/07/13 16:18:48 WARN NettyRpcEndpointRef: Error sending message [message = AMRegisted(enjoyor4,container_e02_1499931395900_0009_01_000001,26009,admin)] in 1 attempts org.apache.spark.rpc.R

qq_36594677的博客 1166

从零开始!在 Windows 上安装与配置 Dify

这篇博客将详细介绍如何在 Windows 系统上部署 Dify,适合零基础用户。从 Docker 和 WSL 的安装配置开始,逐步指导用户设置 Git、Docker 环境以及 Dify 配置文件,解决可能遇到的端口冲突等问题,最终完成 Dify 的启动和测试。通过简明易懂的步骤,帮助用户在本地成功运行 Dify,实现模型供应商配置,让 Dify 项目在 Windows 平台上顺利上线。

qq_49035156的博客 5万+

在WPS/Office中免费使用AI,快速提升办公效率!​

《免费解锁WPS/Office AI办公神器教程》摘要: 本教程详解如何通过第三方插件OfficeAI免费实现WPS/Office智能办公,突破官方付费限制。从安全设置到安装配置,手把手教学,涵盖文档生成、PPT美化、Excel图表等核心功能。关键优势包括零成本、全场景支持及云端/本地双模式切换,并附常见问题解决方案。注意需使用WPS 2024+版本,安装时需临时关闭杀毒软件。教程强调工具来源合法性,建议商用购买正版授权。(149字)

杜哥无敌的博客 2307

Spark standalone模式结合虚拟机遇到的问题

在spark standalone模式启动结合虚拟机遇到的driver url获取问题

oreohhxxcsdn的博客 695

思科—OSPF多区域配置实验

实验目的:配置OSPF多区域,使得不同网段的PC互相ping通。 网络拓扑如下: R0的配置 Router>en Router#conf t Router(config)#int g0/1 Router(config-if)#ip add 192.168.1.1 255.255.255.0 Router(config-if)#no shut Router(config-if)#exit Router(config)#int g0/0 Router(config-if)#ip add 192.168.

m0_46237205的博客 1万+

collect.conf

#agent section     producer.sources = s     producer.channels = c     producer.sinks = r          #source section     producer.sources.s.type = avro   producer.sources.s.bind = 192.168.100.110

tantieshuai的博客 348

unity打包流程整理-Windows/Mac/Linux平台

1.Platform(平台)功能: 选择目标构建的目标平台选项PC, Mac & Linux Standalone: 适用于 Windows、Mac 和 Linux 平台2.Target Platform(目标平台)功能: 选择具体的操作系统版本选项Windows: 针对 Windows 操作系统Mac: 针对 macOS 操作系统Linux: 针对 Linux 操作系统3.Architecture(架构)功能: 选择应用程序的目标处理器架构选项x86: 针对 32 位系统。

weixin_42333247的博客 5141

RT-DETR升级:TGRS2026 CKConv结合RepC3 | 方向特征与跨阶段融合协同,小目标漏检率大幅下降

小目标鲁棒性提升:CKConv方向选择性抑制背景噪声,RepC3跨阶段传递保留深层微弱热信号,显著改善低对比度、低信噪比场景下的检测精度。

①答疑群聊服务;②YOLO大模型知识问答系统;③计算机视觉论文生成智能体; 158

记一次spark 任务GC超时

执行spark SQL任务,最初看到的报错日志如下: WARN netty.NettyRpcEndpointRef: Error sending message [message = Heartbeat(1,[Lscala.Tuple2;@38ab5005,BlockManagerId(1, yarn104.dc.dianrong.com, 38784))] in 1 attempts org...

激进的蜗牛 7610

基于STM32、HAL库的IP5356M快充协议芯片简介及驱动程序设计

@param hip: IP5356M句柄指针。* @param hip: IP5356M句柄指针。* @param hip: IP5356M句柄指针。* @param hip: IP5356M句柄指针。* @param hip: IP5356M句柄指针。* @param hip: IP5356M句柄指针。* @param hip: IP5356M句柄指针。* @param hip: IP5356M句柄指针。* @param hip: IP5356M句柄指针。

corlin6688的博客 1223

ERROR YarnSchedulerBackend$YarnSchedulerEndpoint: Sending RequestExecutors(1,0,Map(),Set()) to AM wa

1、猜测是数据量有增加,建议调大日志中出现的参数spark.rpc.askTimeout。2、同时建议优化下列参数。

looo000ngname的博客 536

零基础做AI漫剧:Kimi K2.5写本 + Flux生图 + Seedance 2.0动效的保姆级教程

很多零基础小伙伴想做AI漫剧,却被“写剧本、画分镜、做动效”三大难题劝退——不会写剧情、不会画插画、不会做动态,觉得门槛太高。其实不用慌!今天就给大家带来保姆级教程,全程用Kimi K2.5(写剧本)、Flux(生分镜图)、Seedance 2.0(做动效)三个工具,不用专业技能,不用手动绘画,零基础也能在1小时内做出1分钟完整AI漫剧,全程步骤拆解、示例齐全,跟着做就能出片!

远程部署调试 运行安装 项目调试 二次开发 项目技术新 持续迭代 部分源码免费分享 3044

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

Spark提交应用失败

第一种失败: TaskSchedulerImpl 调度失败 报错信息: TaskSchedulerImpl: Initial job has not accepted any resources; check your cluster UI to ensure that workers are registered and have sufficient memory 原因分析: 1. w

harli的专栏 1058

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

IDEA调试SparkSQL时报异常This timeout is controlled by spark.executor.heartbeatInterval

背景 在调试sparksql报如下异常 报错主要异常为 org.apache.spark.rpc.RpcTimeoutException: Futures timed out after [10 seconds]. This timeout is controlled by spark.executor.heartbeatInterval 发现语句的后面有张表不存在, 先解决该问题 ok解决了...

汐 朔 4576

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

Futures timed out after [10 seconds]. This timeout is controlled by spark.executor.heartbeatInterva

问题描述:提交spark-submit时,在ssh终端提交没有问题,但是在代码中ssh登陆后,再提交命令就出现以下问题了,开始怀疑是用户问题,但是如果是用户问题,那么我在ssh终端同一个用户执行又执行正确,故排除了此情况。第二感觉是环境变量,我在.sh添加环境后,还是报错。 sh文件 #!/bin/bash #调用java 程序需要添加上,否则直接跳出shell #export JAVA_HOME...

gucapg的专栏 7009

Spark shell超时

WARN netty.NettyRpcEndpointRef: Error sending message [message = RemoveExecutor(1,Command exited with code 1)] in 1 attempts org.apache.spark.rpc.RpcTimeoutException: Futures timed out after ...

dengjieyun1598的博客 497

Spark排错与优化

一. 运维 1. Master挂掉,standby重启也失效 Master默认使用512M内存,当集群中运行的任务特别多时,就会挂掉,原因是master会读取每个task的event log日志去生成spark ui,内存不足自然会OOM,可以在master的运行日志中看到,通过HA启动的master自然也会因为这个原因失败。 解决 增加Master的内存占用...

weixin_30383279的博客 925

spark 序列化错误 集群提交时_【问题解决】本地提交任务到Spark集群报错:Initial job has not accepted any resources...

本地提交任务到Spark集群报错:Initial job has not accepted any resources错误信息如下:18/04/17 18:18:14 INFO TaskSchedulerImpl: Adding task set 0.0 with 2 tasks18/04/17 18:18:29 WARN TaskSchedulerImpl: Initial job has no...

weixin_29605607的博客 769

spark问题与排查

1、spark thriftserver报以下错误,其他诸如hive/sparksql等方式均正常 ERROR ActorSystemImpl: Uncaught fatal error from thread [sparkDriverActorSystem-akka.actor.default-dispatcher-379] shutting down ActorSystem [sparkDr

6339

org.apache.spark.rpc.RpcTimeout$$anonfun$1.applyOrElse

跑sparkPis示例程序 [root@node01 bin]# ./spark-submit --master spark://node01:7077 --class org.apache.spark.examples.SparkPi ../examples/jars/spark-examples_2.11-2.0.0.jar 100 报如下错误的原因可能是分配的任务数过多导致内存不...

weixin_30756499的博客 586

Spark问题3之SparkException:Error notifying standalone scheduler's driver endpoint

更多代码请见:https://github.com/xubo245/SparkLearningSpark生态之Alluxio学习 版本:alluxio(tachyon) 0.7.1,spark-1.5.2,hadoop-2.6.01.问题描述1.1运行alluxioHDFS.sh的时候出现错误:hadoop@Master:~/disk2/xubo/project/alignment/SparkSW/

Keep Learning 2041
上一篇: 解决冲突文件 hadoop 和druid
下一篇: spark连接问题
王树民
博客等级 码龄10年 912粉丝 560原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值