`
qihuiyong6
  • 浏览: 40878 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

安装好hadoop集群后上传文件出错

阅读更多
错误日志如下:
Java HotSpot(TM) Client VM warning: You have loaded library /root/devtools/hadoop-2.5.2/lib/native/libhadoop.so.1.0.0 which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
14/12/03 05:59:22 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
14/12/03 05:59:23 INFO hdfs.DFSClient: Exception in createBlockOutputStream
java.net.NoRouteToHostException: No route to host
        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
        at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
        at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
        at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:529)
        at org.apache.hadoop.hdfs.DFSOutputStream.createSocketForPipeline(DFSOutputStream.java:1526)
        at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.createBlockOutputStream(DFSOutputStream.java:1328)
        at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.nextBlockOutputStream(DFSOutputStream.java:1281)
        at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:526)
14/12/03 05:59:23 INFO hdfs.DFSClient: Abandoning BP-72872812-192.168.80.130-1417440595848:blk_1073741831_1007
14/12/03 05:59:23 INFO hdfs.DFSClient: Excluding datanode 192.168.80.131:50010
14/12/03 05:59:23 INFO hdfs.DFSClient: Exception in createBlockOutputStream
java.net.NoRouteToHostException: No route to host
        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
        at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
        at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
        at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:529)
        at org.apache.hadoop.hdfs.DFSOutputStream.createSocketForPipeline(DFSOutputStream.java:1526)
        at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.createBlockOutputStream(DFSOutputStream.java:1328)
        at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.nextBlockOutputStream(DFSOutputStream.java:1281)
        at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:526)
14/12/03 05:59:23 INFO hdfs.DFSClient: Abandoning BP-72872812-192.168.80.130-1417440595848:blk_1073741832_1008
14/12/03 05:59:23 INFO hdfs.DFSClient: Excluding datanode 192.168.80.132:50010
14/12/03 05:59:23 WARN hdfs.DFSClient: DataStreamer Exception
org.apache.hadoop.ipc.RemoteException(java.io.IOException): File /testData/wordCount.txt._COPYING_ could only be replicated to 0 nodes instead of minReplication (=1).  There are 2 datanode(s) running and 2 node(s) are excluded in this operation.
        at org.apache.hadoop.hdfs.server.blockmanagement.BlockManager.chooseTarget(BlockManager.java:1471)
        at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:2791)
        at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.addBlock(NameNodeRpcServer.java:606)
        at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.addBlock(ClientNamenodeProtocolServerSideTranslatorPB.java:455)
        at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java)
        at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:585)
        at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:928)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2013)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2009)
        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:1614)
        at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2007)

        at org.apache.hadoop.ipc.Client.call(Client.java:1411)
        at org.apache.hadoop.ipc.Client.call(Client.java:1364)
        at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:206)
        at com.sun.proxy.$Proxy14.addBlock(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:187)
        at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:102)
        at com.sun.proxy.$Proxy14.addBlock(Unknown Source)
        at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.addBlock(ClientNamenodeProtocolTranslatorPB.java:368)
        at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.locateFollowingBlock(DFSOutputStream.java:1449)
        at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.nextBlockOutputStream(DFSOutputStream.java:1270)
        at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:526)
put: File /testData/wordCount.txt._COPYING_ could only be replicated to 0 nodes instead of minReplication (=1).  There are 2 datanode(s) running and 2 node(s) are excluded in this operation.

我遇到这个问题的原因是因为防火墙没关闭,需要把集群的防火墙都关闭掉.
hadoop集群执行wordcount例子程序时程序进入长久等待 不往下执行的时候也是这个问题:
centos6.4关闭防火墙命令:
#/etc/init.d/iptables status                ## 查看防火墙状态
#/etc/init.d/iptable stop                    ## 本次关闭防火墙
#/etc/init.d/iptable restart                ## 重启防火墙

永久性关闭防火墙:
#chkconfig --level 35 iptables off   ## 注意中间的是两个英式小短线;重启
分享到:
评论

相关推荐

    linux-结构化成行成列-小文件循环合并成大文件--方便上传hadoop

    在IT行业中,尤其是在大数据处理领域,Linux操作...通过这种方式,我们能有效地管理和优化Hadoop集群的性能,避免小文件问题带来的困扰。同时,这样的自动化处理也有助于提升工作效率,减少手动操作的繁琐和出错概率。

    hadoop-eclipse-plugin.rar

    通过不同版本的选择,开发者可以根据实际的Hadoop集群环境来选择最适合的插件,确保代码的兼容性和运行效率。对于学习和理解Hadoop MapReduce编程模型,以及进行大数据应用开发来说,这款插件是不可或缺的。

    eclipse-hadoop-plugin-2.7.1

    - **远程集群提交**: 插件可以连接到远程Hadoop集群,将作业提交到生产环境。 - **调试工具**: 提供调试器,可以设置断点、查看变量状态、单步执行等,便于找出程序中的问题。 4. **资源管理** - **HDFS文件操作...

    hadoop-eclipse-plugin-2.7.3.zip

    安装Hadoop Eclipse Plugin 2.7.3的方法非常简单,只需将解压后的hadoop-eclipse-plugin-2.7.3.jar文件复制到Eclipse的plugins目录下。然后,重启Eclipse,该插件就会自动加载,使得Eclipse具备了Hadoop项目管理和...

    HDFS_维护手册

    安装步骤包括下载 HDFS 的安装文件、解压安装文件、配置系统参数、安装 J2sdk、上传 HDFS 目录到所有服务器上等。启动步骤包括格式化 Namenode 文件系统、启动 HDFS、启动 Namenode 和 Datanode 等。 2.1 安装 ...

    zookeeper集群搭建

    将下载好的 Zookeeper 安装包上传至目标主机 `/usr/tools` 目录。 ##### 2.1.3 安装配置 Zookeeper 1. **解压安装包**:将上传的安装包解压至指定目录。 2. **创建软链接**:方便后续管理和升级。 3. **复制配置...

    azkaban-exec-server-亲测可用

    当工作流被web服务器调度后,执行服务器会负责将任务分发到相应的执行环境,如本地、Hadoop集群或Spark集群。执行服务器会跟踪任务状态,记录日志,并在任务完成或出错时向web服务器报告。 Azkaban的另一个重要特性...

    59-数栖-离线开发v4.11.0-用户手册.pdf

    - **资源文件**:用户上传的文件,可用于作业、函数开发中。常见的资源文件类型包括jar、txt、python等。 - **函数(Function)**:指Hive、Spark、Presto等系统中的函数。平台支持用户创建基于Hive的自定义函数(UDF)...

Global site tag (gtag.js) - Google Analytics