Hadoop 搭建好,运行 PI 实例检查集群,发现卡在了INFO mapreduce.Job: Running job: job_1574151057051_0002

[hyc@master ~]hadoop jar ~/hadoop-2.5.1/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.5.1.jar pi 10 10 
Number of Maps  = 10
Samples per Map = 10
Wrote input for Map #0
Wrote input for Map #1
Wrote input for Map #2
Wrote input for Map #3
Wrote input for Map #4
Wrote input for Map #5
Wrote input for Map #6
Wrote input for Map #7
Wrote input for Map #8
Wrote input for Map #9
Starting Job
19/11/19 16:19:39 INFO client.RMProxy: Connecting to ResourceManager at master/192.168.16.4:18040
19/11/19 16:19:41 INFO input.FileInputFormat: Total input paths to process : 10
19/11/19 16:19:42 INFO mapreduce.JobSubmitter: number of splits:10
19/11/19 16:19:43 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1574151057051_0002
19/11/19 16:19:43 INFO impl.YarnClientImpl: Submitted application application_1574151057051_0002
19/11/19 16:19:43 INFO mapreduce.Job: The url to track the job: http://master:18088/proxy/application_1574151057051_0002/
19/11/19 16:19:43 INFO mapreduce.Job: Running job: job_1574151057051_0002

先说一下我这个是云服务器上搭建的hadoop集群,在PI检测的时候,到这里一直卡住不动,它也不给你直接报错,不要着急,看一下日志文件resourcemanager-master,一般在hadoop-2.5.1/logs 目录下:

2019-11-19 16:19:30,288 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: slave/*.*.*.*:45163. Already tried 23 time(s); maxRetries=45
2019-11-19 16:19:39,402 INFO org.apache.hadoop.yarn.server.resourcemanager.ClientRMService: Allocated new applicationId: 2
2019-11-19 16:19:43,525 INFO org.apache.hadoop.yarn.server.resourcemanager.ClientRMService: Application with id 2 submitted by user hyc
2019-11-19 16:19:43,525 INFO org.apache.hadoop.yarn.server.resourcemanager.RMAuditLogger: USER=hyc	IP=192.168.16.4	OPERATION=Submit Application Request	TARGET=ClientRMService	RESULT=SUCCESS	APPID=application_1574151057051_0002
2019-11-19 16:19:43,525 INFO org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppImpl: Storing application with id application_1574151057051_0002
2019-11-19 16:19:43,525 INFO org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppImpl: application_1574151057051_0002 State change from NEW to NEW_SAVING
2019-11-19 16:19:43,525 INFO org.apache.hadoop.yarn.server.resourcemanager.recovery.RMStateStore: Storing info for app: application_1574151057051_0002
2019-11-19 16:19:43,526 INFO org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppImpl: application_1574151057051_0002 State change from NEW_SAVING to SUBMITTED
2019-11-19 16:19:43,526 INFO org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.ParentQueue: Application added - appId: application_1574151057051_0002 user: hyc leaf-queue of parent: root #applications: 2
2019-11-19 16:19:43,526 INFO org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler: Accepted application application_1574151057051_0002 from user: hyc, in queue: default
2019-11-19 16:19:43,526 INFO org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppImpl: application_1574151057051_0002 State change from SUBMITTED to ACCEPTED
2019-11-19 16:19:43,527 INFO org.apache.hadoop.yarn.server.resourcemanager.ApplicationMasterService: Registering app attempt : appattempt_1574151057051_0002_000001
2019-11-19 16:19:43,527 INFO org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttemptImpl: appattempt_1574151057051_0002_000001 State change from NEW to SUBMITTED
2019-11-19 16:19:43,530 INFO org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.LeafQueue: Application added - appId: application_1574151057051_0002 user: org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.LeafQueue$User@17e58cf5, leaf-queue: default #user-pending-applications: 1 #user-active-applications: 1 #queue-pending-applications: 1 #queue-active-applications: 1
2019-11-19 16:19:43,530 INFO org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler: Added Application Attempt appattempt_1574151057051_0002_000001 to scheduler from user hyc in queue default
2019-11-19 16:19:43,532 INFO org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttemptImpl: appattempt_1574151057051_0002_000001 State change from SUBMITTED to SCHEDULED
2019-11-19 16:19:50,303 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: slave/*.*.*.*:45163. Already tried 24 time(s); maxRetries=45
2019-11-19 16:20:10,318 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: slave/*.*.*.*:45163. Already tried 25 time(s); maxRetries=45
2019-11-19 16:20:30,328 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: slave/*.*.*.*:45163. Already tried 26 time(s); maxRetries=45
2019-11-19 16:20:50,349 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: slave/*.*.*.*:45163. Already tried 27 time(s); maxRetries=45
2019-11-19 16:21:10,368 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: slave/*.*.*.*:45163. Already tried 28 time(s); maxRetries=45
2019-11-19 16:21:30,388 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: slave/*.*.*.*:45163. Already tried 29 time(s); maxRetries=45
2019-11-19 16:21:50,398 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: slave/*.*.*.*:45163. Already tried 30 time(s); maxRetries=45
2019-11-19 16:22:10,419 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: slave/*.*.*.*:45163. Already tried 31 time(s); maxRetries=45
2019-11-19 16:22:30,439 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: slave/*.*.*.*:45163. Already tried 32 time(s); maxRetries=45
2019-11-19 16:22:50,443 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: slave/*.*.*.*:45163. Already tried 33 time(s); maxRetries=45
2019-11-19 16:23:10,464 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: slave/*.*.*.*:45163. Already tried 34 time(s); maxRetries=45
2019-11-19 16:23:30,484 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: slave/*.*.*.*:45163. Already tried 35 time(s); maxRetries=45

从日志文件中可以看出,一直在尝试连接从服务器的45163端口,然后我测试了一下端口发现连不上(测试端口的命令curl ip:port)

原因:云服务器的安全组端口没有开,放开安全组端口就可以了。

如果还是没有解决的话可能是cpu、内存资源分配问题,请看这个博客写的https://blog.csdn.net/dai451954706/article/details/50464036

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值