hadoop 3.x 运行Mapreduce集群遇到的问题Container exited with a non-zero exit code 1. Error file: prelaunch.err

运行Mapreduce集群时候出现报错:

Container exited with a non-zero exit code 1. Error file: prelaunch.err.
Last 4096 bytes of prelaunch.err :
Last 4096 bytes of stderr :
错误: 找不到或无法加载主类 org.apache.hadoop.mapreduce.v2.app.MRAppMaster

hadoop 3.x 运行Mapreduce集群遇到的问题Container exited with a non-zero exit code 1. Error file: prelaunch.err_第1张图片

解决方法:

在主机中运行:

hadoop classpath

记下返回的结果

在这里插入图片描述

添加一个配置:

vi $HADOOP_HOME/etc/hadoop/yarn-site.xml

加入返回的信息:
hadoop 3.x 运行Mapreduce集群遇到的问题Container exited with a non-zero exit code 1. Error file: prelaunch.err_第2张图片

<property>
        <name>yarn.application.classpath</name>
        <value>hadoop classpath返回信息</value>
</property>

加入之后如下图:
hadoop 3.x 运行Mapreduce集群遇到的问题Container exited with a non-zero exit code 1. Error file: prelaunch.err_第3张图片
再次运行Mapreduce成功解决问题:
hadoop 3.x 运行Mapreduce集群遇到的问题Container exited with a non-zero exit code 1. Error file: prelaunch.err_第4张图片

hadoop 3.x 运行Mapreduce集群遇到的问题Container exited with a non-zero exit code 1. Error file: prelaunch.err_第5张图片

你可能感兴趣的:(大数据,hadoop,mapreduce,大数据,centos)