我试图为hadoop-1.1.2运行map reduce示例程序。但我有以下错误

时间:2013-12-20 06:39:55

标签: hadoop

Warning: $HADOOP_HOME is deprecated.  

Exception in thread "main" java.lang.IllegalArgumentException: Does not contain a valid host:port authority:  localhost:54311
    at org.apache.hadoop.net.NetUtils.createSocketAddr(NetUtils.java:149)
    at org.apache.hadoop.net.NetUtils.createSocketAddr(NetUtils.java:130)
    at org.apache.hadoop.mapred.JobTracker.getAddress(JobTracker.java:2312)
    at org.apache.hadoop.mapred.JobClient.init(JobClient.java:490)  at org.apache.hadoop.mapred.JobClient.<init>(JobClient.java:473)
    at org.apache.hadoop.mapreduce.Job$1.run(Job.java:513)
    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:1149)
    at org.apache.hadoop.mapreduce.Job.connect(Job.java:511)
    at org.apache.hadoop.mapreduce.Job.submit(Job.java:499)
    at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:530) 
    at WordCount.main(WordCount.java:62)
    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:601)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:156) 

请任何人帮助我

1 个答案:

答案 0 :(得分:0)

通过运行&#34; jps&#34;来检查每个进程是否已启动。 jobtracker必须已启动并显示在localhost计算机列表中

  • 的Namenode
  • 的JobTracker
  • 的TaskTracker
  • 的Datanode
  • SecondaryNamenode

如果它没有启动,可能是另一个进程使用相同的端口(54311)或仅仅是防火墙问题

我希望它有所帮助