{"record":{"id":"3a88ff6522b5e6d6","repo":"aeron-io/aeron","slug":"failed-to-send-replay-request","errorCode":null,"errorMessage":"failed to send replay request","messagePattern":"failed to send replay request","errorType":"exception","errorClass":"TimeoutException","httpStatus":null,"severity":"error","filePath":"aeron-archive/src/main/java/io/aeron/archive/ReplicationSession.java","lineNumber":731,"sourceCode":"                .fileIoMaxLength(fileIoMaxLength)\n                .replayToken(replayToken);\n\n            final ArchiveProxy archiveProxy = null != responseArchiveProxy ?\n                responseArchiveProxy : srcArchive.archiveProxy();\n\n            if (archiveProxy.replay(\n                srcRecordingId,\n                channelUri.toString(),\n                replayStreamId,\n                replayParams,\n                correlationId,\n                srcArchive.controlSessionId()))\n            {\n                workCount += trackAction(correlationId);\n            }\n            else if (epochClock.time() >= (timeOfLastActionMs + actionTimeoutMs))\n            {\n                throw new TimeoutException(\"failed to send replay request\");\n            }\n        }\n        else\n        {\n            final ControlResponsePoller poller = srcArchive.controlResponsePoller();\n            workCount += poller.poll();\n\n            if (hasResponse(poller))\n            {\n                srcReplaySessionId = poller.relevantId();\n                state(State.AWAIT_IMAGE, \"srcReplaySessionId=\" + srcReplaySessionId);\n            }\n            else if (epochClock.time() >= (timeOfLastActionMs + actionTimeoutMs))\n            {\n                throw new TimeoutException(\"failed get acknowledgement of replay request to: \" + replicationChannel);\n            }\n        }\n","sourceCodeStart":713,"sourceCodeEnd":749,"githubUrl":"https://github.com/aeron-io/aeron/blob/6d60124e15e35c11b49ba2e3c2c2858a09a18803/aeron-archive/src/main/java/io/aeron/archive/ReplicationSession.java#L713-L749","documentation":"Thrown by ReplicationSession.replay() when the archive proxy repeatedly fails to enqueue the replay request to the source archive's control endpoint, and the action timeout (default aeron.archive.replication.timeout or Archive.Configuration ACTION_TIMEOUT) elapses. archiveProxy.replay() returns false when the underlying publication cannot accept the control message (not connected, no window/credit, or back-pressured), so the state machine retries until the deadline. It signals that the replication could never get its replay request to the source archive.","triggerScenarios":"archiveProxy.replay(srcRecordingId, ...) returns false on every doWork() cycle for actionTimeoutMs while activeCorrelationId is NULL; typically because the source archive control-response/control-request publication is not connected, the media driver is down, or the UDP link between destination and source archive is down.","commonSituations":"Source archive process down or restarting; firewall/NAT dropping the control channel; replicationChannel misconfigured (wrong endpoint/port); source archive control session terminated mid-replication; severe network congestion keeping the control publication back-pressured for longer than the replication timeout; actionTimeoutMs set too low for a slow/high-latency WAN.","solutions":["Verify the source archive is running and reachable: check its control-request channel/port and test connectivity (ping/nc) from the destination host.","Check source archive logs for a control session rejection or termination around the failure time; fix auth/session issues and re-run the replication.","Increase Aeron's replication action timeout (aeron.archive.replication.timeout, or the replicationTimeout argument to AeronArchive.replicate) so transient back-pressure can clear.","Validate the replicationChannel URI (endpoint, control-mode) — ensure the endpoint resolves and wildcard ports can be resolved on both sides.","Confirm both drivers are up and sender/receiver statuses are active (use Aeronstat / driver status) before retrying."],"exampleFix":"// before: default short timeout on a slow WAN\narchive.replicate(srcRecordingId, liveChannel, liveStreamId, dstRecordingId);\n// after: explicit replication timeout of 30s\narchive.replicate(\n    srcRecordingId,\n    dstRecordingId,\n    liveChannel,\n    liveStreamId,\n    replayPosition,\n    AeronArchive.NULL_LENGTH,\n    replicationChannel,\n    replicationChannelStreamId,\n    TimeUnit.SECONDS.toNanos(30) /* replicationTimeout */);","handlingStrategy":"retry","validationCode":"// Before starting replication, check source archive reachability\ntry (AeronArchive archive = AeronArchive.connect(archiveCtx))\n{\n    // throws if the control channel is not usable\n    archive.listRecording(srcRecordingId, (c, l, d) -> {});\n}","typeGuard":null,"tryCatchPattern":"int attempts = 3;\nwhile (attempts-- > 0)\n{\n    try\n    {\n        long replicationId = archive.replicate(srcRecordingId, replicationChannel, replayStreamId);\n        break;\n    }\n    catch (io.aeron.exceptions.TimeoutException e)\n    {\n        if (attempts == 0) throw e;\n        Thread.sleep(1000);\n    }\n}","preventionTips":["Monitor source archive health (conductor alive, control channel connected) before initiating replication","Set aeron.archive.replication.timeout appropriately for your WAN latency, not the default","Keep both Aeron drivers running under supervision (systemd) so a driver restart does not strand in-flight replication","Alert on archive control publication back-pressure metrics"],"tags":["network","timeout","aeron-archive","replication"],"backgroundTag":"request-timeout","analyzedSha":"6d60124e15e35c11b49ba2e3c2c2858a09a18803","analyzedAt":"2026-09-12T11:17:07.683Z","contentChangedAt":"2026-09-12T11:17:07.683Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}