{"record":{"id":"e80a857bff64f65a","repo":"aeron-io/aeron","slug":"live-log-replay-failed-replaysessionid","errorCode":null,"errorMessage":"Live log replay failed (replaySessionId=${liveLogReplaySessionId}): errorMessage=${poller.errorMessage()}, errorCode=${ArchiveException.errorCodeAsString((int)poller.relevantId())}","messagePattern":"Live log replay failed \\(replaySessionId=(.+?)\\): errorMessage=(.+?), errorCode=(.+?)","errorType":"exception","errorClass":"ClusterException","httpStatus":null,"severity":"error","filePath":"aeron-cluster/src/main/java/io/aeron/cluster/ClusterBackupAgent.java","lineNumber":911,"sourceCode":"                        ControlResponseCode.ERROR == poller.code())\n                    {\n                        throwReplayFailedException(poller);\n                    }\n                }\n            }\n        }\n        else\n        {\n            timeOfLastProgressMs = nowMs;\n            state(UPDATE_RECORDING_LOG, nowMs);\n        }\n\n        return workCount;\n    }\n\n    private void throwReplayFailedException(final ControlResponsePoller poller)\n    {\n        throw new ClusterException(\"Live log replay failed (replaySessionId=\" + liveLogReplaySessionId + \"):\" +\n            \" errorMessage=\" + poller.errorMessage() + \", errorCode=\" +\n            ArchiveException.errorCodeAsString((int)poller.relevantId()));\n    }\n\n    private int updateRecordingLog(final long nowMs)\n    {\n        boolean wasRecordingLogUpdated = false;\n        try\n        {\n            final long snapshotLeadershipTermId = snapshotsRetrieved.isEmpty() ?\n                NULL_VALUE : snapshotsRetrieved.get(0).leadershipTermId();\n\n            if (null != leaderLogEntry &&\n                recordingLog.isUnknown(leaderLogEntry.leadershipTermId) &&\n                leaderLogEntry.leadershipTermId <= snapshotLeadershipTermId)\n            {\n                recordingLog.appendTerm(\n                    liveLogRecordingId,","sourceCodeStart":893,"sourceCodeEnd":929,"githubUrl":"https://github.com/aeron-io/aeron/blob/6d60124e15e35c11b49ba2e3c2c2858a09a18803/aeron-cluster/src/main/java/io/aeron/cluster/ClusterBackupAgent.java#L893-L929","documentation":"When the control poller reports ERROR during live log replay, throwReplayFailedException builds a ClusterException including the replay session id, the archive error message, and the decoded archive error code — i.e. the archive itself refused or failed the replay request.","triggerScenarios":"The archive returns an ERROR control response for the replay of the live log recording: e.g. unknown recording id, replay session limits exhausted, recording deleted, or archive-internal failure.","commonSituations":"Log recording missing from the archive (cleaned up before backup replay); archive at max concurrent replays; permission/disk errors inside the archive.","solutions":["Read errorCode/errorMessage in the exception and inspect archive logs for the underlying cause.","Ensure the log recording still exists on the archive and was not deleted; reseed/restart the backup if the recording is gone.","Check archive max concurrent replays/sessions config and raise it or wait, then retry the backup."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// ensure the live log recording exists before starting backup\nlong recId = ConsensusModule.Configuration.logRecordingId(countersReader);\nif (recId == Aeron.NULL_VALUE) { throw new IllegalStateException(\"no log recording\"); }","typeGuard":null,"tryCatchPattern":"try { ClusterBackup.launch(ctx); } catch (ClusterException e) { if (e.getMessage().contains(\"Live log replay failed\")) { inspectArchiveLogsAndRetry(); } }","preventionTips":["Monitor archive recording lifecycle so the log recording is not removed mid-backup","Keep archive replay capacity above backup replay demand"],"tags":["aeron","archive","replay"],"backgroundTag":"api-error-response","analyzedSha":"6d60124e15e35c11b49ba2e3c2c2858a09a18803","analyzedAt":"2026-09-12T11:17:07.683Z","contentChangedAt":"2026-09-12T11:17:07.683Z","schemaVersion":2},"datasetVersion":"2026-09-19T12:17:13.211Z"}