{"record":{"id":"49bffadc1628bb5d","repo":"aeron-io/aeron","slug":"failed-to-send-get-recording-position-request","errorCode":null,"errorMessage":"failed to send get recording position request","messagePattern":"failed to send get recording position request","errorType":"exception","errorClass":"ArchiveException","httpStatus":null,"severity":"error","filePath":"aeron-archive/src/main/java/io/aeron/archive/client/AeronArchive.java","lineNumber":1552,"sourceCode":"     * Get the position recorded for an active recording. If no active recording then return {@link #NULL_POSITION}.\n     *\n     * @param recordingId of the active recording for which the position is required.\n     * @return the recorded position for the active recording or {@link #NULL_POSITION} if recording not active.\n     * @see #getStopPosition(long)\n     */\n    public long getRecordingPosition(final long recordingId)\n    {\n        lock.lock();\n        try\n        {\n            ensureConnected();\n            ensureNotReentrant();\n\n            lastCorrelationId = aeron.nextCorrelationId();\n\n            if (!archiveProxy.getRecordingPosition(recordingId, lastCorrelationId, controlSessionId))\n            {\n                throw new ArchiveException(\"failed to send get recording position request\");\n            }\n\n            return pollForResponse(lastCorrelationId);\n        }\n        finally\n        {\n            lock.unlock();\n        }\n    }\n\n    /**\n     * Get the stop position for a recording.\n     *\n     * @param recordingId of the recording for which the position is required.\n     * @return the stop position, or {@link #NULL_POSITION} if still active.\n     * @see #getRecordingPosition(long)\n     */\n    public long getStopPosition(final long recordingId)","sourceCodeStart":1534,"sourceCodeEnd":1570,"githubUrl":"https://github.com/aeron-io/aeron/blob/6d60124e15e35c11b49ba2e3c2c2858a09a18803/aeron-archive/src/main/java/io/aeron/archive/client/AeronArchive.java#L1534-L1570","documentation":"AeronArchive.getRecordingPosition() throws this ArchiveException when the get-recording-position request could not be offered to the archive control-request publication. archiveProxy.getRecordingPosition() returned false (publication not connected, closed, or back-pressured for the whole retry window), so pollForResponse never executes and no position is returned.","triggerScenarios":"Calling getRecordingPosition(recordingId) while the archive control stream cannot accept requests: archive process down, control session expired or closed by the archive, control-request buffer full, or misconfigured control channel/endpoint.","commonSituations":"Live-progress monitors polling recording positions during an archive restart; long-lived clients whose session was reaped; bursts of position queries queuing on a saturated control publication.","solutions":["Check that the archive is running and the control channel settings match between client and archive.","Retry the call after a short backoff; the failed offer is often transient back-pressure.","Reconnect with AeronArchive.connect() if the control session has been closed server-side.","Slow down polling loops so the control publication buffer does not fill.","Review archive logs for session timeouts or publication errors preceding this failure."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"if (!archive.archiveProxy().controlPublication().isConnected()) {\n    throw new IllegalStateException(\"archive control publication not connected\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    long pos = archive.getRecordingPosition(recordingId);\n} catch (ArchiveException e) {\n    if (e.getMessage().contains(\"failed to send get recording position request\")) {\n        Thread.sleep(backoffMs); // retry or reconnect\n    } else { throw e; }\n}","preventionTips":["Add liveness checks around position-polling monitors.","Batch or debounce position queries to limit control-stream load.","Retry rejected offers with backoff before surfacing the failure.","Track control-session expiry and reconnect before commands fail."],"tags":["aeron-archive","backpressure","control-channel","position"],"backgroundTag":"api-request-failed","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"}