{"record":{"id":"b29b548507dfdb3b","repo":"aeron-io/aeron","slug":"response-channel-from-archive-is-not-connected-channel","errorCode":null,"errorMessage":"response channel from archive is not connected, channel=<channel>, streamId=<streamId>, imageCount=<imageCount>","messagePattern":"response channel from archive is not connected, channel=<channel>, streamId=<streamId>, imageCount=<imageCount>","errorType":"exception","errorClass":"ArchiveException","httpStatus":null,"severity":"error","filePath":"aeron-archive/src/main/java/io/aeron/archive/client/AeronArchive.java","lineNumber":2399,"sourceCode":"            if (fragments > 0)\n            {\n                continue;\n            }\n\n            final Subscription subscription = poller.subscription();\n            checkForDisconnect(subscription);\n\n            checkDeadline(deadlineNs, \"awaiting response\", correlationId);\n            idleStrategy.idle(context.runInvokers());\n        }\n    }\n\n    private void checkForDisconnect(final Subscription subscription)\n    {\n        if (!subscription.isConnected())\n        {\n            state(State.DISCONNECTED);\n            throw new ArchiveException(\n                \"response channel from archive is not connected, \" +\n                \"channel=\" + subscription.channel() +\n                \", streamId=\" + subscription.streamId() +\n                \", imageCount=\" + subscription.imageCount());\n        }\n    }\n\n    private long pollForResponse(final long correlationId)\n    {\n        final long deadlineNs = nanoClock.nanoTime() + messageTimeoutNs;\n        final ControlResponsePoller poller = controlResponsePoller;\n\n        while (true)\n        {\n            pollNextResponse(correlationId, deadlineNs, poller);\n\n            if (poller.controlSessionId() != controlSessionId)\n            {","sourceCodeStart":2381,"sourceCodeEnd":2417,"githubUrl":"https://github.com/aeron-io/aeron/blob/6d60124e15e35c11b49ba2e3c2c2858a09a18803/aeron-archive/src/main/java/io/aeron/archive/client/AeronArchive.java#L2381-L2417","documentation":"ArchiveException thrown by checkForDisconnect when the control response Subscription has no connected images, i.e. the archive is no longer sending responses on the configured channel/stream. The client marks its state DISCONNECTED and fails fast rather than waiting for the message timeout.","triggerScenarios":"Any pollForResponse-driven call after the archive has stopped, the response publication closed, or the network dropped so subscription.isConnected() returns false (imageCount=0).","commonSituations":"Archive process crash or restart; firewall idle-timeout dropping the response connection; archive moved to a different endpoint; control response channel misconfigured so it never connects in the first place.","solutions":["Reconnect by creating a new AeronArchive session (AeronArchive.connect(ctx)) after confirming the archive is running.","Verify controlResponseChannel/controlResponseStreamId in the client context match the archive's response configuration.","Check network/firewall settings between client and archive for idle connection drops; add keep-alives or reconnect logic.","Monitor archive health and implement automatic session re-establishment on this exception."],"exampleFix":"// before\narchive.listRecording(recordingId); // throws if archive went away\n// after\ntry {\n    archive.listRecording(recordingId);\n} catch (ArchiveException e) {\n    if (e.getMessage().contains(\"not connected\")) {\n        archive = AeronArchive.connect(ctx);\n    }\n}","handlingStrategy":"try-catch","validationCode":"if (!archive.controlResponsePoller().subscription().isConnected()) {\n    archive = AeronArchive.connect(ctx); // pre-flight reconnect\n}","typeGuard":null,"tryCatchPattern":"try {\n    archive.listRecordingsForUri(0, 10, channelFragment, 100);\n} catch (ArchiveException e) {\n    archive = AeronArchive.connect(ctx); // session dropped\n}","preventionTips":["Implement automatic session re-establishment on disconnect.","Monitor archive liveness with heartbeats or simple queries.","Check firewall/idle timeouts on long-lived control connections."],"tags":["aeron-archive","connectivity","disconnect"],"backgroundTag":"connection-refused","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"}