无法启动jobtracker和tasktracker

时间:2013-05-30 14:40:56

标签: java hadoop

我可以启动namenode和secondary namenode但是我无法启动jobtracker和tasktracker。

当我检查日志时,它会显示类似这样的内容

************************************************************/
2013-05-30 07:27:50,962 FATAL org.apache.hadoop.conf.Configuration: bad conf file: top-level element not <configuration>
2013-05-30 07:27:50,963 WARN org.apache.hadoop.conf.Configuration: bad conf file: element not <property>
2013-05-30 07:27:50,963 WARN org.apache.hadoop.conf.Configuration: bad conf file: element not <property>
2013-05-30 07:27:50,963 WARN org.apache.hadoop.conf.Configuration: bad conf file: element not <property>
2013-05-30 07:27:51,204 INFO org.apache.hadoop.metrics2.impl.MetricsConfig: loaded properties from hadoop-metrics2.properties
2013-05-30 07:27:51,360 INFO org.apache.hadoop.metrics2.impl.MetricsSourceAdapter: MBean for source MetricsSystem,sub=Stats registered.
2013-05-30 07:27:51,365 INFO org.apache.hadoop.metrics2.impl.MetricsSystemImpl: Scheduled snapshot period at 10 second(s).
2013-05-30 07:27:51,365 INFO org.apache.hadoop.metrics2.impl.MetricsSystemImpl: TaskTracker metrics system started
2013-05-30 07:27:51,440 INFO org.apache.hadoop.util.NativeCodeLoader: Loaded the native-hadoop library
2013-05-30 07:27:51,587 FATAL org.apache.hadoop.conf.Configuration: bad conf file: top-level element not <configuration>
2013-05-30 07:27:51,587 WARN org.apache.hadoop.conf.Configuration: bad conf file: element not <property>
2013-05-30 07:27:51,588 WARN org.apache.hadoop.conf.Configuration: bad conf file: element not <property>
2013-05-30 07:27:51,588 WARN org.apache.hadoop.conf.Configuration: bad conf file: element not <property>
2013-05-30 07:27:51,594 INFO org.apache.hadoop.metrics2.impl.MetricsSourceAdapter: MBean for source ugi registered.
2013-05-30 07:27:51,603 WARN org.apache.hadoop.metrics2.impl.MetricsSystemImpl: Source name ugi already exists!
2013-05-30 07:27:51,773 FATAL org.apache.hadoop.conf.Configuration: bad conf file: top-level element not <configuration>
2013-05-30 07:27:51,773 WARN org.apache.hadoop.conf.Configuration: bad conf file: element not <property>
2013-05-30 07:27:51,773 WARN org.apache.hadoop.conf.Configuration: bad conf file: element not <property>
2013-05-30 07:27:51,773 WARN org.apache.hadoop.conf.Configuration: bad conf file: element not <property>
2013-05-30 07:27:51,799 ERROR org.apache.hadoop.mapred.TaskTracker: Can not start task tracker because java.lang.IllegalArgumentException: Does not contain a valid host:port authority: local
    at org.apache.hadoop.net.NetUtils.createSocketAddr(NetUtils.java:164)
    at org.apache.hadoop.net.NetUtils.createSocketAddr(NetUtils.java:130)
    at org.apache.hadoop.mapred.JobTracker.getAddress(JobTracker.java:2121)
    at org.apache.hadoop.mapred.TaskTracker.<init>(TaskTracker.java:1540)
    at org.apache.hadoop.mapred.TaskTracker.main(TaskTracker.java:3937)

2013-05-30 07:27:51,805 INFO org.apache.hadoop.mapred.TaskTracker: SHUTDOWN_MSG: 
/************************************************************
SHUTDOWN_MSG: Shutting down TaskTracker at ubuntu2/192.168.44.131
************************************************************/

1 个答案:

答案 0 :(得分:1)

配置文件存在一些问题:core-site.xml,hdfs-site.xml和mapred-site.xml。根据错误消息:

  

java.lang.IllegalArgumentException:不包含有效的host:port   权威:本地

请查找正确的值以及xml是否有效(小错误可能会破坏它)。 试试这些:hadoop job tracker cannot start upError in starting hadoop Job Tracker