{"record":{"id":"e742044921e4223e","repo":"aeron-io/aeron","slug":"archive-is-not-connected","errorCode":null,"errorMessage":"archive is not connected","messagePattern":"archive is not connected","errorType":"exception","errorClass":"ArchiveException","httpStatus":null,"severity":"error","filePath":"aeron-archive/src/main/java/io/aeron/archive/client/ReplayMerge.java","lineNumber":615,"sourceCode":"        final int pollCount = poller.poll();\n        if (poller.isPollComplete())\n        {\n            if (poller.controlSessionId() == archive.controlSessionId())\n            {\n                if (poller.code() == ControlResponseCode.ERROR)\n                {\n                    throw new ArchiveException(\"archive response for correlationId=\" + poller.correlationId() +\n                        \", error: \" + poller.errorMessage(),\n                        (int)poller.relevantId(),\n                        poller.correlationId());\n                }\n\n                return poller.correlationId() == correlationId;\n            }\n        }\n        else if (pollCount == 0 && !poller.subscription().isConnected())\n        {\n            throw new ArchiveException(\"archive is not connected\");\n        }\n\n        return false;\n    }\n\n    private static long polledRelevantId(final AeronArchive archive)\n    {\n        return archive.controlResponsePoller().relevantId();\n    }\n\n    /**\n     * {@inheritDoc}\n     */\n    @Override\n    public String toString()\n    {\n        return \"ReplayMerge{\" +\n            \"state=\" + state +","sourceCodeStart":597,"sourceCodeEnd":633,"githubUrl":"https://github.com/aeron-io/aeron/blob/6d60124e15e35c11b49ba2e3c2c2858a09a18803/aeron-archive/src/main/java/io/aeron/archive/client/ReplayMerge.java#L597-L633","documentation":"If pollForResponse makes no progress (pollCount == 0) and the control-response subscription is not connected, ReplayMerge throws ArchiveException 'archive is not connected'. This means the client cannot reach the archive control endpoint at all, so pending requests cannot complete.","triggerScenarios":"The control subscription has no active image — archive process down, wrong control channel/stream in AeronArchive.Context, or network partition — while polling for a request response.","commonSituations":"Firewall or DNS preventing UDP connectivity to the archive control port; archive started later than the client; control-request/control-response channel misconfiguration.","solutions":["Verify the archive is running and listening on the control-request endpoint","Check control-request and control-response channel/stream configuration in AeronArchive.Context match the archive's","Test network connectivity (firewall, UDP routes) to the archive host","Retry once the archive reconnects, or recreate the AeronArchive connection"],"exampleFix":"// before\nAeronArchive archive = AeronArchive.connect(new AeronArchive.Context().aeron(ctx.aeron())); // default channels\n// after: explicit archive endpoints\nAeronArchive archive = AeronArchive.connect(new AeronArchive.Context()\n    .controlRequestChannel(\"aeron:udp?endpoint=archivehost:8010\")\n    .controlResponseChannel(\"aeron:udp?endpoint=archivehost:0\"));","handlingStrategy":"retry","validationCode":"if (!archive.controlResponsePoller().subscription().isConnected()) { waitForArchiveConnection(timeoutMs); }","typeGuard":null,"tryCatchPattern":"try { merge.doWork(); }\ncatch (ArchiveException e) { if (e.getMessage().equals(\"archive is not connected\")) { awaitArchiveAvailability(); retryMerge(); } }","preventionTips":["Ensure the archive starts before clients issue requests","Match control-request/control-response channels in client context and archive config","Add connection-state health checks before long merge operations"],"tags":["network","connectivity","archive","control-channel"],"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"}