apache/hadoop · error · IOException
No journals available to flush
Error message
No journals available to flush
What it means
Error "No journals available to flush" thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java:710
// included in the sync - ie. batched. if this is the only edit
// synced then the batched count is 0
lastJournalledTxId = editLogStream.getLastJournalledTxId();
LOG.debug("logSync(tx) synctxid={} lastJournalledTxId={} mytxid={}",
synctxid, lastJournalledTxId, mytxid);
assert lastJournalledTxId <= txid : "lastJournalledTxId exceeds txid";
// The stream has already been flushed, or there are no active streams
// We still try to flush up to mytxid
if(lastJournalledTxId <= synctxid) {
lastJournalledTxId = mytxid;
}
editsBatchedInSync = lastJournalledTxId - synctxid - 1;
isSyncRunning = true;
sync = true;
// swap buffers
try {
if (journalSet.isEmpty()) {
throw new IOException("No journals available to flush");
}
editLogStream.setReadyToFlush();
} catch (IOException e) {
final String msg =
"Could not sync enough journals to persistent storage " +
"due to " + e.getMessage() + ". " +
"Unsynced transactions: " + (txid - synctxid);
LOG.error(msg, new Exception());
synchronized(journalSetLock) {
IOUtils.cleanupWithLogger(LOG, journalSet);
}
terminate(1, msg);
}
} finally {
// Prevent RuntimeException from blocking other log edit write
doneWithAutoSyncScheduling();
}
//editLogStream may become null,View on GitHub (pinned to 2add963021)
Solutions
- Ensure at least one edits journal (dfs.namenode.edits.dir / shared edits) is configured and available before flushing.
- Check NameNode logs for failed journals and restore them.
When it happens
Trigger: Flushing or syncing the edit log when no journal (edit log storage directory or shared edits dir) is available.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/c61e2317c473f6d2.
Report an issue: GitHub.