hadoop - 无法写入 HDFS:WARN hdfs.DataStreamer - Unexpected EOF
问题描述
我正在学习教程,在单个集群测试环境中运行时,我突然无法运行任何 MR 作业或将数据写入 HDFS。之前效果很好,突然我一直低于错误(重新启动没有帮助)。
我可以从 HDFS 读取和删除文件,但不能写入。
$ hdfs dfs -put war-and-peace.txt /user/hands-on/
19/03/25 18:28:29 WARN hdfs.DataStreamer: Exception for BP-1098838250-127.0.0.1-1516469292616:blk_1073742374_1550
java.io.EOFException: Unexpected EOF while trying to read response from server
at org.apache.hadoop.hdfs.protocolPB.PBHelperClient.vintPrefixed(PBHelperClient.java:399)
at org.apache.hadoop.hdfs.protocol.datatransfer.PipelineAck.readFields(PipelineAck.java:213)
at org.apache.hadoop.hdfs.DataStreamer$ResponseProcessor.run(DataStreamer.java:1020)
put: All datanodes [DatanodeInfoWithStorage[127.0.0.1:50010,DS-b90326de-a499-4a43-a66a-cc3da83ea966,DISK]] are bad. Aborting...
“hdfs dfsadmin -report”显示一切都很好,有足够的磁盘空间。我几乎没有做任何工作,只是一些测试 MR 和少量测试数据。
$ hdfs dfsadmin -report
Configured Capacity: 52710469632 (49.09 GB)
Present Capacity: 43335585007 (40.36 GB)
DFS Remaining: 43334025216 (40.36 GB)
DFS Used: 1559791 (1.49 MB)
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 (1):
Name: 127.0.0.1:50010 (localhost)
Hostname: localhost
Decommission Status : Normal
Configured Capacity: 52710469632 (49.09 GB)
DFS Used: 1559791 (1.49 MB)
Non DFS Used: 6690530065 (6.23 GB)
DFS Remaining: 43334025216 (40.36 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: 2
Last contact: Mon Mar 25 18:30:45 EDT 2019
NameNode WebUI(端口 50070)也显示一切正常,日志也没有报告任何错误。它可能是什么/我该如何正确排除故障?
CentOS Linux 6.9 最小 Apache Hadoop 2.8.1
解决方案
推荐阅读
- indexing - azure sql - 创建索引,数据库是否必须离线?
- django - DRF - 为额外的操作路由额外的 HTTP 方法
- github - 使用 gh-pages 部署到 master 分支,而不是 USER 站点的 gh-pages 分支
- javascript - 使用 paho mqtt 的 javascript 版本订阅主题时无法应用通配符
- python - Python:如何将列表中的一个元素与除自身之外的所有其他元素进行比较?
- javascript - 表“添加”行添加多于一行
- java - 在休息服务中返回动态 Json
- java - Maven:如何处理子项目上的本地文件以进行测试
- python-3.x - 输入字段不能放在 tkinter python 中的所需位置。
- r - 'rJava' 的 loadNamespace() 中的 onLoad 失败,但仅在运行 devtools::check() 时