spark-shell启动报错:Yarn application has already ended! It might have been killed or unable to launch application master

时间:2023-01-06 15:57:39

spark-shell不支持yarn cluster,以yarn client方式启动

spark-shell --master=yarn --deploy-mode=client

启动日志,错误信息如下

spark-shell启动报错:Yarn application has already ended! It might have been killed or unable to launch application master

其中“Neither spark.yarn.jars nor spark.yarn.archive is set, falling back to uploading libraries under SPARK_HOME”,只是一个警告,官方的解释如下:

spark-shell启动报错:Yarn application has already ended! It might have been killed or unable to launch application master

大概是说:如果 spark.yarn.jars 和 spark.yarn.archive都没配置,会把$SPAR_HOME/jars下面所有jar打包成zip文件,上传到每个工作分区,所以打包分发是自动完成的,没配置这俩参数没关系。

"Yarn application has already ended! It might have been killed or unable to launch application master",这个可是一个异常,打开mr管理页面,我的是 http://192.168.128.130/8088 ,

spark-shell启动报错:Yarn application has already ended! It might have been killed or unable to launch application master

重点在红框处,2.2g的虚拟内存实际值,超过了2.1g的上限。也就是说虚拟内存超限,所以contrainer被干掉了,活都是在容器干的,容器被干掉了,还玩个屁。

解决方案

yarn-site.xml 增加配置:

2个配置2选一即可

 <!--以下为解决spark-shell 以yarn client模式运行报错问题而增加的配置,估计spark-summit也会有这个问题。2个配置只用配置一个即可解决问题,当然都配置也没问题-->
<!--虚拟内存设置是否生效,若实际虚拟内存大于设置值 ,spark 以client模式运行可能会报错,"Yarn application has already ended! It might have been killed or unable to l"-->
<property>
<name>yarn.nodemanager.vmem-check-enabled</name>
<value>false</value>
<description>Whether virtual memory limits will be enforced for containers</description>
</property>
<!--配置虚拟内存/物理内存的值,默认为2.,物理内存默认应该是1g,所以虚拟内存是2.1g-->
<property>
<name>yarn.nodemanager.vmem-pmem-ratio</name>
<value></value>
<description>Ratio between virtual memory to physical memory when setting memory limits for containers</description>
</property>

修改后,启动hadoop,spark-shell.

spark-shell启动报错:Yarn application has already ended! It might have been killed or unable to launch application master

spark-shell启动报错:Yarn application has already ended! It might have been killed or unable to launch application master的更多相关文章

  1. Spark on Yarn运行错误:Yarn application has already ended&excl; It might have been killed or unable to launch application master

    Spark on Yarn模式运行错误: bin/spark-shell --master yarn --deploy-mode client #报错 ​ 查看8088页面上的工作日志 错误原因:在执 ...

  2. spark 提交任务报错 Yarn application has already ended&excl; It might have been killed or unable to launch application master

    1.任务是提交在yarn上的,查看 resourceManager页面 有如下信息 Current usage: 58.4 MB of 1 GB physical memory used; 2.2 G ...

  3. hbase shell 启动报错

    启动hbase之后,发现hbase shell启动报错: version 2.0.0-alpha4, r5c4b985f89c99cc8b0f8515a4097c811a0848835, Tue Oc ...

  4. hive启动报错(整合spark)

    spark整合hive后,hive启动报错: ls: cannot access /export/servers/spark/lib/spark-assembly-*.jar: No such fil ...

  5. spring boot 启动报错&lpar;spring-boot-devtools热部署后&rpar;:The elements &lbrack;spring&period;resources&period;cache-period&rsqb; were left unbound&period; Update your application&&num;39&semi;s configuration

    详细错误代码: *************************** APPLICATION FAILED TO START *************************** Descript ...

  6. 《Springboot极简教程》问题解决:Springboot启动报错 Whitelabel Error Page: This application has no explicit mapping for&lpar;转&rpar;

    13.2 Spring Boot启动报错:Whitelabel Error Page 13.2 Spring Boot启动报错:Whitelabel Error Page 问题描述 Whitelabe ...

  7. Oracle启动报错ORA-03113解决

    环境:RHEL6.4 + Oracle 11.2.0.4 步骤摘要:1.启动报错ORA-031132.查看alert日志查找原因3.根据实际情况采取合理的措施,这里我们先增加闪回区大小,把库启动起来4 ...

  8. SpringBoot启动报错Failed to determine a suitable driver class

    SpringBoot启动报错如下 Error starting ApplicationContext. To display the conditions report re-run your app ...

  9. weblogic启动报错

    重启了一次linux服务器后,weblogic启动莫名报错,查看日志发现说部署的项目有个bean类无法加载, 1.然后手动删除 已经部署的项目,先在 domais/servers/AdminServe ...

随机推荐

  1. 泛型数组列表 ArrayList

    为什么使用泛型数组列表而不使用普通数组? 1.普通数组经常会发生容量太大以致浪费的情况 2.普通数组无法动态更改数组 基本概念: 1.采用[类型参数]的[类]---->[泛型类] 2.[泛型类型 ...

  2. matlab————矩阵输出到txt

    matlab如何输出矩阵到txt并指定数的精度 (2013-11-20 16:50:43)转载▼ 标签: matlab 输出数据 假设你的数据矩阵为a; [m n] = size(a); [filen ...

  3. 【C&num;学习笔记】类型转换

    using System; namespace ConsoleApplication { class Program { static void Main(string[] args) { &quot ...

  4. &period;Net高级进阶,WebApi和MVC进行模型验证的时候,教你如何*控制需要进行验证的字段?

    现在,你有一个MVC架构的web项目,你要完成一个注册功能. 前台传了3个值到你的控制器,分别是账号.密码.邮箱. 如图:现在你要在控制器里面判断,账号名称.密码.邮箱不能为空,并且名称和密码不超过1 ...

  5. Linux上MySQL的安装

    a.检测是否安装了mysql rpm  -qa | grep mysql b.卸载系统自带的mysql rpm -e --nodeps 卸载的包 rpm -e --nodeps mysql-libs- ...

  6. &period;net 获取配置文件AppSettings的键值

    //AppSettings.config 节点代码 <appSettings> <add key="IsUpdate" value="false&quo ...

  7. 【转】福利大放送--不止是Android,Github超高影响力开源大放送,学习开发必备教科书

    [福利大放送]不止是Android,Github超高影响力开源大放送,学习开发必备教科书   目录 一.写在前面 1.free-programming-books 2.oh-my-zsh 3.awes ...

  8. Android recording 录音功能 简单使用小实例

    package com.app.recordingtest; import java.io.File; import java.io.IOException; import android.app.A ...

  9. C&num;基础篇四数组

    using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace P01A ...

  10. &lbrack;Week17&rsqb; 个人阅读作业

      个人阅读作业Week17 reading buaa software   解决的问题 这是提出问题的博客链接:http://www.cnblogs.com/SivilTaram/p/4830893 ...