jobtracker未运行

bfnvny8b  于 2021-06-02  发布在  Hadoop
关注(0)|答案(2)|浏览(267)

运行mapreduce jar时,我遇到以下异常:

Exception in thread "main" org.apache.hadoop.ipc.RemoteException: org.apache.hadoop.mapred.JobTrackerNotYetInitializedException: JobTracker is not yet RUNNING
    at org.apache.hadoop.mapred.JobTracker.checkJobTrackerState(JobTracker.java:5199)
    at org.apache.hadoop.mapred.JobTracker.getNewJobId(JobTracker.java:3543)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:587)
    at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1432)
    at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1428)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:415)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1190)
    at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1426)

    at org.apache.hadoop.ipc.Client.call(Client.java:1113)
    at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:229)
    at org.apache.hadoop.mapred.$Proxy2.getNewJobId(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:85)
    at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:62)
    at org.apache.hadoop.mapred.$Proxy2.getNewJobId(Unknown Source)
    at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:944)
    at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:936)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:415)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1190)
    at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:936)
    at org.apache.hadoop.mapreduce.Job.submit(Job.java:550)
    at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:580)
    at com.sreejithpillai.excel.mapreduce.ExcelDriver.main(ExcelDriver.java:49)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:160)

但是 jps 命令显示

15575 JobTracker
15471 SecondaryNameNode
15137 NameNode
16123 Jps
15733 TaskTracker
3720

我尝试格式化namenode并重新启动,但问题仍然存在。
我能在家里找到工作http://localhost:50030/jobtracker.jsp
谁来帮帮我。

zaq34kh6

zaq34kh61#

从这个问题来看,不清楚是否重新启动了jobtracker(格式化namenode之后)。
重新启动namenode时,最好重新启动jobtracker。即使jps显示进程已启动并正在运行,它的状态也可能不一致。您需要转到jobtracker日志并检查是否有任何错误

0s0u357o

0s0u357o2#

你在用什么样的配置?独立模式、伪集群模式还是完全分布式模式?同时运行 hadoop fsck / 检查hdfs是否处于健康状态或损坏状态(当多台商品机器远程访问时,主要通过伪集群应用)

[edureka@localhost ~]$ hadoop fsck /
DEPRECATED: Use of this script to execute hdfs command is deprecated.
Instead use the hdfs command for it.

15/12/03 11:07:58 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Connecting to namenode via http://localhost:50070
FSCK started by edureka (auth:SIMPLE) from /127.0.0.1 for path / at Thu Dec 03 11:07:58 IST 2015
....................................................................................................
................................................
/tmp/hadoop-yarn/staging/edureka/.staging/job_1448946364079_0184/job.jar:  Under replicated BP-1756909416-127.0.0.1-1411538715533:blk_1073781438_40623. Target Replicas is 10 but found 1 replica(s).
.
/tmp/hadoop-yarn/staging/edureka/.staging/job_1448946364079_0184/job.split:  Under replicated BP-1756909416-127.0.0.1-1411538715533:blk_1073781439_40624. Target Replicas is 10 but found 1 replica(s).
...
/tmp/hadoop-yarn/staging/edureka/.staging/job_1448946364079_0261/job.jar:  Under replicated BP-1756909416-127.0.0.1-1411538715533:blk_1073782193_41378. Target Replicas is 10 but found 1 replica(s).
.
/tmp/hadoop-yarn/staging/edureka/.staging/job_1448946364079_0261/job.split:  Under replicated BP-1756909416-127.0.0.1-1411538715533:blk_1073782194_41379. Target Replicas is 10 but found 1 replica(s).
...
/tmp/hadoop-yarn/staging/edureka/.staging/job_1448946364079_0282/job.jar:  Under replicated BP-1756909416-127.0.0.1-1411538715533:blk_1073782396_41581. Target Replicas is 10 but found 1 replica(s).
.
/tmp/hadoop-yarn/staging/edureka/.staging/job_1448946364079_0282/job.split:  Under replicated BP-1756909416-127.0.0.1-1411538715533:blk_1073782397_41582. Target Replicas is 10 but found 1 replica(s).
...........................................
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
..Status: HEALTHY
 Total size:    131322862 B
 Total dirs:    138
 Total files:   902
 Total symlinks:                0
 Total blocks (validated):      825 (avg. block size 159179 B)
 Minimally replicated blocks:   825 (100.0 %)
 Over-replicated blocks:        0 (0.0 %)
 Under-replicated blocks:       6 (0.72727275 %)
 Mis-replicated blocks:         0 (0.0 %)
 Default replication factor:    1
 Average block replication:     1.0
 Corrupt blocks:                0
 Missing replicas:              54 (6.143345 %)
 Number of data-nodes:          1
 Number of racks:               1
FSCK ended at Thu Dec 03 11:07:59 IST 2015 in 130 milliseconds

The filesystem under path '/' is HEALTHY

我使用的是伪集群模式,目前有17台机器正在访问。不知何故,当安装了vm的机器的4个内核不能提供足够的cpu来运行作业时。hdfs被破坏了。当虚拟机过载时,就会发生这种情况。
请指定您正在使用的配置。
谢谢:)

相关问题