开发者社区> 问答> 正文

hadoop2.4.1的" Job jar is not present"?报错

在我在两台装有hadoop的机器上运行hadoop 2.4.1自带的例子:hadoop-mapreduce-examples-2.4.1.jar时,报下面的错误:

 [root@localhost hadoop-2.4.1]# hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.4.1.jar grep /user/hadoop/input output 'dfs[a-z.]+'
执行结果报错:
14/11/22 11:58:58 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
14/11/22 11:58:59 INFO client.RMProxy: Connecting to ResourceManager at master/10.40.7.201:8032
14/11/22 11:59:00 WARN mapreduce.JobSubmitter: No job jar file set.  User classes may not be found. See Job or Job#setJar(String).
14/11/22 11:59:00 INFO input.FileInputFormat: Total input paths to process : 25
14/11/22 11:59:00 INFO mapreduce.JobSubmitter: number of splits:25
14/11/22 11:59:01 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1416578485511_0031
14/11/22 11:59:01 INFO mapred.YARNRunner: Job jar is not present. Not adding any jar to the list of resources.
14/11/22 11:59:01 INFO impl.YarnClientImpl: Submitted application application_1416578485511_0031
14/11/22 11:59:01 INFO mapreduce.Job: The url to track the job:  http://master:8088/proxy/application_1416578485511_0031/
14/11/22 11:59:01 INFO mapreduce.Job: Running job: job_1416578485511_0031
14/11/22 11:59:23 INFO mapreduce.Job: Job job_1416578485511_0031 running in uber mode : false
14/11/22 11:59:23 INFO mapreduce.Job:  map 0% reduce 0%
14/11/22 11:59:23 INFO mapreduce.Job: Job job_1416578485511_0031 failed with state FAILED due to: Application application_1416578485511_0031 failed 2 times due to Error launching appattempt_1416578485511_0031_000002. Got exception: java.net.ConnectException: Call From localhost.localdomain/127.0.0.1 to localhost.localdomain:57025 failed on connection exception: java.net.ConnectException: 拒绝连接; For more details see:   http://wiki.apache.org/hadoop/ConnectionRefused
at sun.reflect.GeneratedConstructorAccessor52.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.apache.hadoop.net.NetUtils.wrapWithMessage(NetUtils.java:783)
at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:730)
at org.apache.hadoop.ipc.Client.call(Client.java:1414)
at org.apache.hadoop.ipc.Client.call(Client.java:1363)
at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:206)
at com.sun.proxy.$Proxy28.startContainers(Unknown Source)
at org.apache.hadoop.yarn.api.impl.pb.client.ContainerManagementProtocolPBClientImpl.startContainers(ContainerManagementProtocolPBClientImpl.java:96)
at org.apache.hadoop.yarn.server.resourcemanager.amlauncher.AMLauncher.launch(AMLauncher.java:118)
at org.apache.hadoop.yarn.server.resourcemanager.amlauncher.AMLauncher.run(AMLauncher.java:249)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.net.ConnectException: 拒绝连接
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:735)
at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:529)
at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:493)
at org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:604)
at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:699)
at org.apache.hadoop.ipc.Client$Connection.access$2800(Client.java:367)
at org.apache.hadoop.ipc.Client.getConnection(Client.java:1462)
at org.apache.hadoop.ipc.Client.call(Client.java:1381)
... 9 more
请问大家,这个问题如何解决?

展开
收起
爱吃鱼的程序员 2020-06-14 20:03:05 723 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    目测是使用hadoop的权限问题,将hadoop安装文件夹用户权限更改成当前使用用户

    2020-06-14 20:03:22
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
《构建Hadoop生态批流一体的实时数仓》 立即下载
零基础实现hadoop 迁移 MaxCompute 之 数据 立即下载
CIO 指南:如何在SAP软件架构中使用Hadoop 立即下载

相关实验场景

更多