{"record":{"id":"496dc9d7f1699e3a","repo":"aeron-io/aeron","slug":"live-log-replay-failed-poller-code","errorCode":null,"errorMessage":"Live log replay failed: ${poller.code()}","messagePattern":"Live log replay failed: (.+?)","errorType":"exception","errorClass":"ClusterException","httpStatus":null,"severity":"error","filePath":"aeron-cluster/src/main/java/io/aeron/cluster/ClusterBackupAgent.java","lineNumber":869,"sourceCode":"                }\n            }\n            else if (NULL_VALUE == liveLogReplaySessionId)\n            {\n                final ControlResponsePoller poller = clusterArchive.controlResponsePoller();\n                if (0 != poller.poll() && poller.isPollComplete() &&\n                    poller.controlSessionId() == clusterArchive.controlSessionId() &&\n                    poller.correlationId() == correlationId)\n                {\n                    switch (poller.code())\n                    {\n                        case OK ->\n                        {\n                            liveLogReplaySessionId = poller.relevantId();\n                            timeOfLastProgressMs = nowMs;\n                            workCount++;\n                        }\n                        case ERROR -> throwReplayFailedException(poller);\n                        default -> throw new ClusterException(\"Live log replay failed: \" + poller.code());\n                    }\n                }\n            }\n            else if (NULL_COUNTER_ID == liveLogRecordingCounterId)\n            {\n                final CountersReader countersReader = aeron.countersReader();\n\n                liveLogRecordingCounterId = RecordingPos.findCounterIdBySession(\n                    countersReader, (int)liveLogReplaySessionId, backupArchive.archiveId());\n                if (NULL_COUNTER_ID != liveLogRecordingCounterId)\n                {\n                    liveLogPositionCounter.setRelease(countersReader.getCounterValue(liveLogRecordingCounterId));\n                    liveLogRecordingId = RecordingPos.getRecordingId(countersReader, liveLogRecordingCounterId);\n                    timeOfLastBackupQueryMs = nowMs;\n                    timeOfLastProgressMs = nowMs;\n                    state(UPDATE_RECORDING_LOG, nowMs);\n                    workCount++;\n                }","sourceCodeStart":851,"sourceCodeEnd":887,"githubUrl":"https://github.com/aeron-io/aeron/blob/6d60124e15e35c11b49ba2e3c2c2858a09a18803/aeron-cluster/src/main/java/io/aeron/cluster/ClusterBackupAgent.java#L851-L887","documentation":"During live log replay the agent polls archive control responses via a ControlResponsePoller. Allowed outcomes advance the state; an ERROR delegates to a detailed exception, and any other unexpected response code makes the agent throw ClusterException 'Live log replay failed: <code>'.","triggerScenarios":"The archive control poller returns a response code the replay state machine does not expect (not OK, ERROR, or the replay-session code) while awaiting live log replay for the backup.","commonSituations":"Archive returning protocol responses from a mismatched archive version; unexpected control channel traffic; archive misconfiguration serving the wrong recording.","solutions":["Check archive logs for the control interaction that produced the unexpected code.","Align the archive client version with the archive server (control protocol change).","Retry the backup; if persistent, inspect poller.code() against ControlResponseCode and fix archive configuration."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// pre-check archive reachable and recording present before backup\narchiveClient.listRecordings(0, 10, (c, i) -> {}, (c, i) -> {});","typeGuard":null,"tryCatchPattern":"try { ClusterBackup.launch(ctx); } catch (ClusterException e) { if (e.getMessage().startsWith(\"Live log replay failed\")) { scheduleRetryWithBackoff(); } }","preventionTips":["Keep archive and cluster on matching versions","Ensure stable, dedicated control channels for the backup"],"tags":["aeron","archive","replay"],"backgroundTag":"unexpected-response-shape","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"}