{"record":{"id":"c61e2317c473f6d2","repo":"apache/hadoop","slug":"no-journals-available-to-flush","errorCode":null,"errorMessage":"No journals available to flush","messagePattern":"No journals available to flush","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java","lineNumber":710,"sourceCode":"          // included in the sync - ie. batched.  if this is the only edit\n          // synced then the batched count is 0\n          lastJournalledTxId = editLogStream.getLastJournalledTxId();\n          LOG.debug(\"logSync(tx) synctxid={} lastJournalledTxId={} mytxid={}\",\n              synctxid, lastJournalledTxId, mytxid);\n          assert lastJournalledTxId <= txid : \"lastJournalledTxId exceeds txid\";\n          // The stream has already been flushed, or there are no active streams\n          // We still try to flush up to mytxid\n          if(lastJournalledTxId <= synctxid) {\n            lastJournalledTxId = mytxid;\n          }\n          editsBatchedInSync = lastJournalledTxId - synctxid - 1;\n          isSyncRunning = true;\n          sync = true;\n\n          // swap buffers\n          try {\n            if (journalSet.isEmpty()) {\n              throw new IOException(\"No journals available to flush\");\n            }\n            editLogStream.setReadyToFlush();\n          } catch (IOException e) {\n            final String msg =\n                \"Could not sync enough journals to persistent storage \" +\n                \"due to \" + e.getMessage() + \". \" +\n                \"Unsynced transactions: \" + (txid - synctxid);\n            LOG.error(msg, new Exception());\n            synchronized(journalSetLock) {\n              IOUtils.cleanupWithLogger(LOG, journalSet);\n            }\n            terminate(1, msg);\n          }\n        } finally {\n          // Prevent RuntimeException from blocking other log edit write \n          doneWithAutoSyncScheduling();\n        }\n        //editLogStream may become null,","sourceCodeStart":692,"sourceCodeEnd":728,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java#L692-L728","documentation":"Error \"No journals available to flush\" thrown in apache/hadoop.","triggerScenarios":"Flushing or syncing the edit log when no journal (edit log storage directory or shared edits dir) is available.","commonSituations":"See trigger scenarios.","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."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}