Hadoop:Task Tracker不会启动java.io.IOException

时间:2012-03-28 02:05:29

标签: exception hadoop hdfs java-io

我设置Hadoop,格式化HDFS,运行bin / start-all.sh,运行bin / stop-all.sh并没有问题。

现在每次运行bin / start-all.sh时,Task Tracker都无法启动,我在Task Tracker日志中收到以下条目。

    2012-03-27 21:22:03,842 ERROR org.apache.hadoop.mapred.TaskTracker: Can not start task tracker because java.io.IOException: Call to localhost/127.0.0.1:9001 failed on local exception: java.io.IOException: Connection reset by peer
    at org.apache.hadoop.ipc.Client.wrapException(Client.java:1065)
    at org.apache.hadoop.ipc.Client.call(Client.java:1033)
    at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:224)
    at org.apache.hadoop.mapred.$Proxy5.getProtocolVersion(Unknown Source)
    at org.apache.hadoop.ipc.RPC.getProxy(RPC.java:364)
    at org.apache.hadoop.ipc.RPC.getProxy(RPC.java:347)
    at org.apache.hadoop.ipc.RPC.getProxy(RPC.java:389)
    at org.apache.hadoop.ipc.RPC.waitForProxy(RPC.java:319)
    at org.apache.hadoop.ipc.RPC.waitForProxy(RPC.java:295)
    at org.apache.hadoop.mapred.TaskTracker$3.run(TaskTracker.java:708)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:396)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1059)
    at org.apache.hadoop.mapred.TaskTracker.initialize(TaskTracker.java:704)
    at org.apache.hadoop.mapred.TaskTracker.(TaskTracker.java:1328)
    at org.apache.hadoop.mapred.TaskTracker.main(TaskTracker.java:3430)
Caused by: java.io.IOException: Connection reset by peer
    at sun.nio.ch.FileDispatcher.read0(Native Method)
    at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:21)
    at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:202)
    at sun.nio.ch.IOUtil.read(IOUtil.java:175)
    at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:243)
    at org.apache.hadoop.net.SocketInputStream$Reader.performIO(SocketInputStream.java:55)
    at org.apache.hadoop.net.SocketIOWithTimeout.doIO(SocketIOWithTimeout.java:142)
    at org.apache.hadoop.net.SocketInputStream.read(SocketInputStream.java:155)
    at org.apache.hadoop.net.SocketInputStream.read(SocketInputStream.java:128)
    at java.io.FilterInputStream.read(FilterInputStream.java:116)
    at org.apache.hadoop.ipc.Client$Connection$PingInputStream.read(Client.java:343)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
    at java.io.DataInputStream.readInt(DataInputStream.java:370)
    at org.apache.hadoop.ipc.Client$Connection.receiveResponse(Client.java:767)
    at org.apache.hadoop.ipc.Client$Connection.run(Client.java:712)

2012-03-27 21:22:03,843 INFO org.apache.hadoop.mapred.TaskTracker: SHUTDOWN_MSG:

我在其他地方找到了一些参考,但一直无法找到解决方案。我必须承认我是Hadoop的新手并且老老实实地不知道这个错误在说什么。

对于我可以尝试的任何想法或建议将不胜感激。我希望我已经发布了足够的信息,但不是太多。如果需要更多信息,请告诉我。

提前致谢!

1 个答案:

答案 0 :(得分:1)

您是否确认作业跟踪器正在本地计算机的端口9001上运行:

  • 找到JobTracker(jps -v or ps axww | grep JobTracker
  • 的进程ID(pid)
  • netstat -atnp | grep ${pid}
  • 检查作业跟踪器日志中是否有任何消息(ls -l /proc/${pid}/fd应列出JobTracker的所有打开文件,使日志文件的位置更容易)