一.问题描述:

[root@master sbin]# hdfs dfsadmin -report

Configured Capacity: 0 (0 B)

Present Capacity: 0 (0 B)

DFS Remaining: 0 (0 B)

DFS Used: 0 (0 B)

DFS Used%: NaN%

Under replicated blocks: 0

Blocks with corrupt replicas: 0

Missing blocks: 0

Missing blocks (with replication factor 1): 0

Pending deletion blocks: 0

二.问题导致可能原因:

1)多次格式化导致的,可以尝试删除hdfs下的data目录、name目录、tmp目录后格式,然后重新启动;

2)没有关闭防火墙,可以通过以下命令检查是否关闭了防火墙,如果没有关闭先关闭对应节点的防火墙

[root@slave1 data]# service iptables status

iptables: Firewall is not running.

3)不在同一个网络,需要相互ping通

4)检查namenode节点上的cat /etc/hosts下有没有注释127.0.0.1映射表,如果没有先注释再重新启动

[root@master hadoop-3.0.0-alpha4]# cat /etc/hosts

127.0.0.1   master localhost

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.28.130 www

192.168.28.130 master

192.168.28.136 slave1

192.168.28.137 slave2

发现有127.0.0.1映射,先注释掉再启动hadoop相关服务

[root@master sbin]# ./start-all.sh

Starting namenodes on [master]

Starting datanodes

Starting secondary namenodes [master]

Starting resourcemanager

Starting nodemanagers

三.问题解决后,运行结果如下:

[root@master sbin]# hdfs dfsadmin -report

Configured Capacity: 202921664512 (188.99 GB)

Present Capacity: 166830989312 (155.37 GB)

DFS Remaining: 166830940160 (155.37 GB)

DFS Used: 49152 (48 KB)

DFS Used%: 0.00%

Under replicated blocks: 0

Blocks with corrupt replicas: 0

Missing blocks: 0

Missing blocks (with replication factor 1): 0

Pending deletion blocks: 0

-------------------------------------------------

Live datanodes (2):

Name: 192.168.28.136:9866 (slave1)

Hostname: slave1

Decommission Status : Normal

Configured Capacity: 101460832256 (94.49 GB)

DFS Used: 24576 (24 KB)

Non DFS Used: 12891869184 (12.01 GB)

DFS Remaining: 83415031808 (77.69 GB)

DFS Used%: 0.00%

DFS Remaining%: 82.21%

Configured Cache Capacity: 0 (0 B)

Cache Used: 0 (0 B)

Cache Remaining: 0 (0 B)

Cache Used%: 100.00%

Cache Remaining%: 0.00%

Xceivers: 1

Last contact: Thu Jun 07 10:52:01 CST 2018

Last Block Report: Thu Jun 07 10:51:14 CST 2018

Name: 192.168.28.137:9866 (slave2)

Hostname: slave2

Decommission Status : Normal

Configured Capacity: 101460832256 (94.49 GB)

DFS Used: 24576 (24 KB)

Non DFS Used: 12890992640 (12.01 GB)

DFS Remaining: 83415908352 (77.69 GB)

DFS Used%: 0.00%

DFS Remaining%: 82.21%

Configured Cache Capacity: 0 (0 B)

Cache Used: 0 (0 B)

Cache Remaining: 0 (0 B)

Cache Used%: 100.00%

Cache Remaining%: 0.00%

Xceivers: 1

Last contact: Thu Jun 07 10:52:01 CST 2018

Last Block Report: Thu Jun 07 10:51:14 CST 2018

最新文章

  1. Javascript 优化项目代码技巧之语言基础(二)
  2. 笔记:html 拾遗之一
  3. linux中,常用的账号管理命令
  4. Python TCP客户端
  5. Arduino小车学习与研究
  6. spring 主题使用详解[转]
  7. 求a,b在区间上的公倍数个数
  8. mindmanager2012打开文件出现runtime error r6025 解决方式
  9. 三白话经典算法系列 Shell排序实现
  10. python中文编码问题深入分析(一):字符编码基础
  11. WPF MVVM模式的一些理解
  12. 注销/etc/passwd带来的系统登陆不上
  13. linkin大话面向对象--方法详解
  14. 在Python中使用Redis
  15. 在 Mac OS X 下,如何向 sudoers 文件添加新用户
  16. js中split()方法得到的数组长度
  17. 【Python】【容器 | 迭代对象 | 迭代器 | 生成器 | 生成器表达式 | 协程 | 期物 | 任务】
  18. Easy to use cross-platform 3D engines
  19. Java虚拟机--线程安全和锁优化
  20. HDU 5836 Rubik's Cube BFS

热门文章

  1. Ajax && json(原始)
  2. meta标签集
  3. DBCP,C3P0与Tomcat jdbc pool 连接池的比较
  4. String的引用传递
  5. Spring 详解(一)------- AOP前序
  6. 关于ios异步加载图片的几个开源项目
  7. 一起学习CMake – 01
  8. palindrome-partitioning I&II——回文切割、深度遍历
  9. leetcode第一刷_Best Time to Buy and Sell Stock III
  10. 转移iOS App常见问题和回答