lixiaoliang7 发表于 2016-6-4 16:04:30

【求助】CDH5.3中balancer报错

本帖最后由 lixiaoliang7 于 2016-6-4 12:05 编辑

执行的脚本如下:
sudo -u hdfs hdfs balancer

报错信息如下:
16/06/04 15:59:11 INFO balancer.Balancer: namenodes=
16/06/04 15:59:11 INFO balancer.Balancer: parameters = Balancer.Parameters
Time Stamp               Iteration#Bytes Already MovedBytes Left To MoveBytes Being Moved
16/06/04 15:59:12 INFO net.NetworkTopology: Adding a new node: /default/192.168.22.101:50010
16/06/04 15:59:12 INFO net.NetworkTopology: Adding a new node: /default/192.168.22.102:50010
16/06/04 15:59:12 INFO net.NetworkTopology: Adding a new node: /default/192.168.22.103:50010
16/06/04 15:59:12 INFO net.NetworkTopology: Adding a new node: /default/192.168.22.105:50010
16/06/04 15:59:12 INFO net.NetworkTopology: Adding a new node: /default/192.168.22.104:50010
16/06/04 15:59:12 INFO balancer.Balancer: 0 over-utilized: []
16/06/04 15:59:12 INFO balancer.Balancer: 0 underutilized: []
The cluster is balanced. Exiting...
16/06/04 15:59:12 INFO net.NetworkTopology: Adding a new node: /default/192.168.22.105:50010
16/06/04 15:59:12 INFO net.NetworkTopology: Adding a new node: /default/192.168.22.101:50010
16/06/04 15:59:12 INFO net.NetworkTopology: Adding a new node: /default/192.168.22.104:50010
16/06/04 15:59:12 INFO net.NetworkTopology: Adding a new node: /default/192.168.22.102:50010
16/06/04 15:59:12 INFO net.NetworkTopology: Adding a new node: /default/192.168.22.103:50010
16/06/04 15:59:12 INFO balancer.Balancer: 0 over-utilized: []
16/06/04 15:59:12 INFO balancer.Balancer: 0 underutilized: []
The cluster is balanced. Exiting...
16/06/04 15:59:12 WARN hdfs.DFSClient: DataStreamer Exception
org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.hdfs.server.namenode.LeaseExpiredException): No lease on /system/balancer.id (inode 7007615): File does not exist. Holder DFSClient_NONMAPREDUCE_-1151547087_1 does not have any open files.
      at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkLease(FSNamesystem.java:3416)
      at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.analyzeFileState(FSNamesystem.java:3218)
      at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:3100)
      at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.addBlock(NameNodeRpcServer.java:636)
      at org.apache.hadoop.hdfs.server.namenode.AuthorizationProviderProxyClientProtocol.addBlock(AuthorizationProviderProxyClientProtocol.java:188)
      at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.addBlock(ClientNamenodeProtocolServerSideTranslatorPB.java:476)
      at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java)
      at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:587)
      at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1026)
      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:1642)
      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.$Proxy11.addBlock(Unknown Source)
      at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.addBlock(ClientNamenodeProtocolTranslatorPB.java:391)
      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.$Proxy12.addBlock(Unknown Source)
      at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.locateFollowingBlock(DFSOutputStream.java:1473)
      at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.nextBlockOutputStream(DFSOutputStream.java:1290)
      at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:536)
Jun 4, 2016 3:59:12 PM   Balancing took 2.153 seconds
16/06/04 15:59:12 ERROR hdfs.DFSClient: Failed to close inode 7007615
org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.hdfs.server.namenode.LeaseExpiredException): No lease on /system/balancer.id (inode 7007615): File does not exist. Holder DFSClient_NONMAPREDUCE_-1151547087_1 does not have any open files.
      at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkLease(FSNamesystem.java:3416)
      at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.analyzeFileState(FSNamesystem.java:3218)
      at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:3100)
      at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.addBlock(NameNodeRpcServer.java:636)
      at org.apache.hadoop.hdfs.server.namenode.AuthorizationProviderProxyClientProtocol.addBlock(AuthorizationProviderProxyClientProtocol.java:188)
      at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.addBlock(ClientNamenodeProtocolServerSideTranslatorPB.java:476)
      at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java)
      at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:587)
      at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1026)
      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:1642)
      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.$Proxy11.addBlock(Unknown Source)
      at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.addBlock(ClientNamenodeProtocolTranslatorPB.java:391)
      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.$Proxy12.addBlock(Unknown Source)
      at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.locateFollowingBlock(DFSOutputStream.java:1473)
      at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.nextBlockOutputStream(DFSOutputStream.java:1290)
      at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:536)


搞了几天都没有解决,所以来求助了……

easthome001 发表于 2016-6-4 16:31:00

1.首先检查:checkpoint是否存在了相同的路径
2.balancer命令是否在多处执行

easthome001 发表于 2016-6-4 16:32:16

hdfs://dlhtHadoop101:8022
hdfs://dlhtHadoop101:8020

这两个应该冲突了

lixiaoliang7 发表于 2016-6-4 16:33:01

easthome001 发表于 2016-6-4 12:31
1.首先检查:checkpoint是否存在了相同的路径
2.balancer命令是否在多处执行非常感谢

1.首先检查:checkpoint是否存在了相同的路径
你说checkpoint哪个路径的文件哈?



2.balancer命令是否在多处执行

我每个节点都ps -aux | grep balancer 了,都没有发现执行的节点。。

lixiaoliang7 发表于 2016-6-4 16:43:35

easthome001 发表于 2016-6-4 12:32
hdfs://dlhtHadoop101:8022
hdfs://dlhtHadoop101:8020



我刚才查了这两个端口对应的进程,一个是namenode,一个是datanode……

lixiaoliang7 发表于 2016-6-4 16:52:00

easthome001 发表于 2016-6-4 12:32
hdfs://dlhtHadoop101:8022
hdfs://dlhtHadoop101:8020



我将这台机子的DataNode下线 了。。。依然balancer时还报这个问题

einhep 发表于 2016-6-4 18:59:42

lixiaoliang7 发表于 2016-6-4 16:43
我刚才查了这两个端口对应的进程,一个是namenode,一个是datanode……

配置肯定有问题的,不可能存在两种访问方式
hdfs://dlhtHadoop101:8022
hdfs://dlhtHadoop101:8020

xw2016 发表于 2016-6-4 21:47:58

看不懂

lixiaoliang7 发表于 2016-6-5 09:07:12

einhep 发表于 2016-6-4 14:59
配置肯定有问题的,不可能存在两种访问方式
hdfs://dlhtHadoop101:8022
hdfs://dlhtHadoop101:8020

我看了以前balancer正常的日志,当时就是这样的两个节点……
这个配置应该是修改哪里的呢? 我找了没有找到。。。。。
页: [1]
查看完整版本: 【求助】CDH5.3中balancer报错