hadoop错误解决办法:-------HDFS上传文件保存错误或速度很慢

出现症状:
2018-11-22 11:28:12,711 WARN hdfs.DataStreamer: Abandoning BP-2142139802-10.20.2.1-1536240602405:blk_1073765062_24289
2018-11-22 11:28:12,712 WARN hdfs.DataStreamer: Excluding datanode DatanodeInfoWithStorage[10.20.2.12:9866,DS-e03c5ebb-4e4f-48fd-9434-2ad52e1f277e,DISK]
2018-11-22 11:28:14,155 INFO hdfs.DataStreamer: Exception in createBlockOutputStream blk_1073765064_24291
java.io.IOException: Got error, status=ERROR, status message , ack with firstBadLink as 10.20.2.12:9866
at org.apache.hadoop.hdfs.protocol.datatransfer.DataTransferProtoUtil.checkBlockOpStatus(DataTransferProtoUtil.java:134)
at org.apache.hadoop.hdfs.protocol.datatransfer.DataTransferProtoUtil.checkBlockOpStatus(DataTransferProtoUtil.java:110)
at org.apache.hadoop.hdfs.DataStreamer.createBlockOutputStream(DataStreamer.java:1778)
at org.apache.hadoop.hdfs.DataStreamer.nextBlockOutputStream(DataStreamer.java:1679)
at org.apache.hadoop.hdfs.DataStreamer.run(DataStreamer.java:716)
2018-11-22 11:28:14,155 WARN hdfs.DataStreamer: Abandoning BP-2142139802-10.20.2.1-1536240602405:blk_1073765064_24291
2018-11-22 11:28:14,156 WARN hdfs.DataStreamer: Excluding datanode DatanodeInfoWithStorage[10.20.2.12:9866,DS-e03c5ebb-4e4f-48fd-9434-2ad52e1f277e,DISK]
2018-11-22 11:28:18,129 INFO hdfs.DataStreamer: Exception in createBlockOutputStream blk_1073765068_24295
java.io.IOException: Got error, status=ERROR, status message , ack with firstBadLink as 10.20.2.11:9866
at org.apache.hadoop.hdfs.protocol.datatransfer.DataTransferProtoUtil.checkBlockOpStatus(DataTransferProtoUtil.java:134)
at org.apache.hadoop.hdfs.protocol.datatransfer.DataTransferProtoUtil.checkBlockOpStatus(DataTransferProtoUtil.java:110)
at org.apache.hadoop.hdfs.DataStreamer.createBlockOutputStream(DataStreamer.java:1778)
at org.apache.hadoop.hdfs.DataStreamer.nextBlockOutputStream(DataStreamer.java:1679)
at org.apache.hadoop.hdfs.DataStreamer.run(DataStreamer.java:716)
2018-11-22 11:28:18,129 WARN hdfs.DataStreamer: Abandoning BP-2142139802-10.20.2.1-1536240602405:blk_1073765068_24295
2018-11-22 11:28:18,130 WARN hdfs.DataStreamer: Excluding datanode DatanodeInfoWithStorage[10.20.2.11:9866,DS-e8a937f8-f0d2-408c-8d90-d15fbb543b2f,DISK]
^C2018-11-22 11:28:33,039 INFO fs.FileSystem: Ignoring failure to deleteOnExit for path hdfs://mycluster/study/spark/Spark-The-Definitive-Guide/data/activity-data/part-00036-tid-730451297822678341-1dda7027-2071-4d73-a0e2-7fb6a91e1d1f-0-c000.json.COPYING

原因分析:
防火墙导致的,通讯不正常。关闭namenode 和datanode 上的防火墙服务。

systemctl disable firewalld;systemctl stop firewalld

cat $HADOOP_PREFIX/etc/hadoop/datanode-hosts-exclude | xargs -i -t ssh root@{} “systemctl disable firewalld;systemctl stop firewalld”

cat $HADOOP_PREFIX/etc/hadoop/slaves | xargs -i -t ssh root@{} “systemctl disable firewalld;systemctl stop firewalld”

你可能感兴趣的:(hadoop,大数据,经验分享)