~Melody~ 2022-08-06 09:00 采纳率: 0%
浏览 100
已结题

hadoop运行自带程序报错

问题遇到的现象和发生背景

hadoop3.3.0运行自带的程序hadoop-mapreduce-examples-3.3.0.jar报错

问题相关代码,请勿粘贴截图

hadoop jar hadoop-mapreduce-examples-3.3.0.jar pi 2 2

运行结果及报错内容

Number of Maps = 2
Samples per Map = 2
Wrote input for Map #0
Wrote input for Map #1
Starting Job
2022-08-06 08:47:52,413 INFO client.DefaultNoHARMFailoverProxyProvider: Connecting to ResourceManager at node1/192.168.88.128:8032
2022-08-06 08:47:52,806 INFO mapreduce.JobResourceUploader: Disabling Erasure Coding for path: /tmp/hadoop-yarn/staging/root/.staging/job_1659744647709_0005
2022-08-06 08:47:52,992 INFO input.FileInputFormat: Total input files to process : 2
2022-08-06 08:47:53,059 INFO mapreduce.JobSubmitter: number of splits:2
2022-08-06 08:47:53,225 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1659744647709_0005
2022-08-06 08:47:53,226 INFO mapreduce.JobSubmitter: Executing with tokens: []
2022-08-06 08:47:53,437 INFO conf.Configuration: resource-types.xml not found
2022-08-06 08:47:53,437 INFO resource.ResourceUtils: Unable to find 'resource-types.xml'.
2022-08-06 08:47:53,538 INFO impl.YarnClientImpl: Submitted application application_1659744647709_0005
2022-08-06 08:47:53,621 INFO mapreduce.Job: The url to track the job: http://node1:8088/proxy/application_1659744647709_0005/
2022-08-06 08:47:53,622 INFO mapreduce.Job: Running job: job_1659744647709_0005
2022-08-06 08:48:03,822 INFO mapreduce.Job: Job job_1659744647709_0005 running in uber mode : false
2022-08-06 08:48:03,823 INFO mapreduce.Job: map 0% reduce 0%
2022-08-06 08:48:17,518 INFO mapreduce.Job: Job job_1659744647709_0005 failed with state FAILED due to: Application application_1659744647709_0005 failed 2 times due to AM Container for appattempt_1659744647709_0005_000002 exited with exitCode: 255
Failing this attempt.Diagnostics: [2022-08-06 08:48:17.037]Exception from container-launch.
Container id: container_1659744647709_0005_02_000001
Exit code: 255

[2022-08-06 08:48:17.046]Container exited with a non-zero exit code 255. Error file: prelaunch.err.
Last 4096 bytes of prelaunch.err :
Last 4096 bytes of stderr :
Aug 06, 2022 8:48:12 AM com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory register
INFO: Registering org.apache.hadoop.mapreduce.v2.app.webapp.JAXBContextResolver as a provider class
Aug 06, 2022 8:48:12 AM com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory register
INFO: Registering org.apache.hadoop.yarn.webapp.GenericExceptionHandler as a provider class
Aug 06, 2022 8:48:12 AM com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory register
INFO: Registering org.apache.hadoop.mapreduce.v2.app.webapp.AMWebServices as a root resource class
Aug 06, 2022 8:48:12 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.19 02/11/2015 03:25 AM'
Aug 06, 2022 8:48:12 AM com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory getComponentProvider
INFO: Binding org.apache.hadoop.mapreduce.v2.app.webapp.JAXBContextResolver to GuiceManagedComponentProvider with the scope "Singleton"
Aug 06, 2022 8:48:13 AM com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory getComponentProvider
INFO: Binding org.apache.hadoop.yarn.webapp.GenericExceptionHandler to GuiceManagedComponentProvider with the scope "Singleton"
Aug 06, 2022 8:48:13 AM com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory getComponentProvider
INFO: Binding org.apache.hadoop.mapreduce.v2.app.webapp.AMWebServices to GuiceManagedComponentProvider with the scope "PerRequest"
log4j:WARN No appenders could be found for logger (org.apache.hadoop.mapreduce.v2.app.MRAppMaster).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

[2022-08-06 08:48:17.047]Container exited with a non-zero exit code 255. Error file: prelaunch.err.
Last 4096 bytes of prelaunch.err :
Last 4096 bytes of stderr :
Aug 06, 2022 8:48:12 AM com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory register
INFO: Registering org.apache.hadoop.mapreduce.v2.app.webapp.JAXBContextResolver as a provider class
Aug 06, 2022 8:48:12 AM com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory register
INFO: Registering org.apache.hadoop.yarn.webapp.GenericExceptionHandler as a provider class
Aug 06, 2022 8:48:12 AM com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory register
INFO: Registering org.apache.hadoop.mapreduce.v2.app.webapp.AMWebServices as a root resource class
Aug 06, 2022 8:48:12 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.19 02/11/2015 03:25 AM'
Aug 06, 2022 8:48:12 AM com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory getComponentProvider
INFO: Binding org.apache.hadoop.mapreduce.v2.app.webapp.JAXBContextResolver to GuiceManagedComponentProvider with the scope "Singleton"
Aug 06, 2022 8:48:13 AM com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory getComponentProvider
INFO: Binding org.apache.hadoop.yarn.webapp.GenericExceptionHandler to GuiceManagedComponentProvider with the scope "Singleton"
Aug 06, 2022 8:48:13 AM com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory getComponentProvider
INFO: Binding org.apache.hadoop.mapreduce.v2.app.webapp.AMWebServices to GuiceManagedComponentProvider with the scope "PerRequest"
log4j:WARN No appenders could be found for logger (org.apache.hadoop.mapreduce.v2.app.MRAppMaster).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

For more detailed output, check the application tracking page: http://node1:8088/cluster/app/application_1659744647709_0005 Then click on links to logs of each attempt.
. Failing the application.
2022-08-06 08:48:17,548 INFO mapreduce.Job: Counters: 0
Job job_1659744647709_0005 failed!

我的解答思路和尝试过的方法

配置mapred-site.xml文件无果

<configuration>
<!-- 设置MR程序默认运行模式: yarn集群模式 local本地模式 -->
<property>
 <name>mapred.job.tracker</name>
 <value>node1:9001</value>
</property>
<property>
  <name>mapreduce.framework.name</name>
  <value>yarn</value>
</property>
<!-- MR程序历史服务器端地址 -->
<property>
  <name>mapreduce.jobhistory.address</name>
  <value>node1:10020</value>
</property>
<!-- 历史服务器web端地址 -->
<property>
  <name>mapreduce.jobhistory.webapp.address</name>
  <value>node1:19888</value>
</property>
<property>
  <name>yarn.app.mapreduce.am.env</name>
  <value>HADOOP_MAPRED_HOME=${HADOOP_HOME}</value>
</property>
<property>
  <name>mapreduce.map.env</name>
  <value>HADOOP_MAPRED_HOME=${HADOOP_HOME}</value>
</property>
<property>
  <name>mapreduce.reduce.env</name>
  <value>HADOOP_MAPRED_HOME=${HADOOP_HOME}</value>
</property>
</configuration>

预览有问题,附上截图

img

我想要达到的结果

找出问题所在,使得程序运行成功

  • 写回答

3条回答

      报告相同问题?

      相关推荐 更多相似问题

      问题事件

      • 系统已结题 8月14日
      • 修改了问题 8月6日
      • 创建了问题 8月6日

      悬赏问题

      • ¥15 类的继承,综合输出学生信息并析构
      • ¥15 js 使用contenteditable属性模拟富文本框的时候如何定位光标到指定位置
      • ¥15 怎么激活组态王的Touchvew菜单和Touchmak 菜单
      • ¥15 Meta分析中,如何在只有样本量的情况下用cma处理效应量r值。
      • ¥15 关于#OpenCV#的问题,如何解决?(语言-qt|开发工具-visual studio)
      • ¥15 centos环境中引入jsoncpp后,编译工程报错,找不到基本库。
      • ¥15 vue3为什么请求在这边获取不到数据呢(关键词-select)
      • ¥20 Multisim仿真设计三路智力抢答装置
      • ¥15 用UML制作简单的语音计算机
      • ¥15 综合的类,这个类里面里面又有构造方法,重载方法,有继承,有重写,有接口