Support Questions
Find answers, ask questions, and share your expertise

All datanodes are bad. Aborting...). Closing file

Hi ,

Am getting the error stating that All datanodes are bad. Aborting...). Closing file
2014-09-02 18:03:04,276 WARN hdfs.HDFSEventSink: HDFS IO error All datanodes are bad. Aborting...
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.processDatanodeError(
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.access$2100(
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream$
2014-09-02 18:03:09,277 WARN hdfs.BucketWriter: Caught IOException writing to HDFSWriter (All datanodes are bad. Aborting...). Closing file (hdfs:// and rethrowing exception.
2014-09-02 18:03:09,277 WARN hdfs.BucketWriter: Caught IOException while closing file (hdfs:// Exception follows. DFSOutputStream is closed
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.sync(
at org.apache.hadoop.fs.FSDataOutputStream.sync(
at org.apache.flume.sink.hdfs.HDFSDataStream.sync(
at org.apache.flume.sink.hdfs.BucketWriter.doFlush(
at org.apache.flume.sink.hdfs.BucketWriter.access$500(
at org.apache.flume.sink.hdfs.BucketWriter$
at org.apache.flume.sink.hdfs.BucketWriter$
at org.apache.flume.sink.hdfs.BucketWriter.runPrivileged(
at org.apache.flume.sink.hdfs.BucketWriter.flush(
at org.apache.flume.sink.hdfs.BucketWriter.close(
at org.apache.flume.sink.hdfs.BucketWriter.append(
at org.apache.flume.sink.hdfs.HDFSEventSink$
at org.apache.flume.sink.hdfs.HDFSEventSink$
at java.util.concurrent.FutureTask$Sync.innerRun(
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
at java.util.concurrent.ThreadPoolExecutor$

What steps did you take prior to this error occurring? Is it happening with any access to HDFS is done or for specific ones?
Gautam Gopalakrishnan

Am phasing this problem when flume-ng agent writes the data from web-server to HDFS(Sink)


Were you able to solve this issue? if yes how?




Rising Star

In the OP's case, it looks like the file has replication factor = 1. In that case if the DataNode was shutdown (crashed or a normal restart) then you'd see it, because of the replication factor. If that's your setup please consider making replication factor 2 or more.