aeron-io/aeron · error · ArchiveException
connection to the archive is no longer available
Error message
connection to the archive is no longer available
What it means
ArchiveProxy.offer() throws this ArchiveException when the control publication's offer() returned Publication.NOT_CONNECTED, meaning the control-request channel to the archive no longer has an active subscriber connection. The archive side (or the intermediary) has dropped the image, so the command cannot be enqueued. It is thrown eagerly from offer() rather than silently returning false so the caller fails fast with a diagnosable error.
Solutions
- Check that the Aeron Archive process is running and reachable on the configured control channel before issuing commands
- Reconnect the archive client (close and recreate AeronArchive / re-establish the control session) after this error
- Verify keepAlive interval is shorter than the archive's session timeout so the session is not dropped
- Inspect network/firewall stability between client and archive control-request/replay channels
Example fix
// before
archiveProxy.startRecording(channel, streamId, LOCAL);
// after
if (archive == null || archiveArchiveClientIsStale) {
aeronArchive.close();
aeronArchive = AeronArchive.connect(ctx); // re-establish control session
}
aeronArchive.startRecording(channel, streamId, LOCAL); Defensive patterns
Strategy: retry
Validate before calling
if (controlPublication.isConnected()) { proxyCommand(...); } else { reconnectArchiveClient(); } Type guard
boolean archiveControlConnected(ExclusivePublication p) { return p != null && !p.isClosed() && p.isConnected(); } Try / catch
try {
archiveProxy.startRecording(channel, streamId, LOCAL);
} catch (ArchiveException e) {
if (e.getMessage().contains("no longer available")) {
reconnectArchive(); // recreate AeronArchive session
}
} Prevention
- Send keepAlive at an interval well below the archive session timeout
- Monitor publication.isConnected()/isClosed() before sending commands
- Wrap archive clients in a reconnect-on-failure wrapper
- Alert on archive process health to catch outages before clients fail
When it happens
Trigger: Any ArchiveProxy command that sends a control message — keepAlive, closeSession, startRecording, stopRecording, stopRecordingByIdentity, stopReplay — when the underlying control publication reports NOT_CONNECTED on offer (archive process stopped/restarted, archive session closed, or network partition removing the connected image).
Common situations: The Aeron Archive server was shut down or crashed between establishing the client and issuing a command; an idle keepAlive raced with session expiry; the archive client's control publication lost its destination connectivity (e.g. archive restarted without the client reconnecting).
Understand the failure class
Background: ECONNREFUSED and "connection refused" / "could not connect to server" errors: what they mean and how to fix them — this error's family across 44 libraries.
Related errors
- not connected
- failed to send list recordings request
- failed to send list recording request
- failed to send get start position request
- failed to send get recording position request
AI-assisted analysis of aeron-io/aeron@6d60124e15 (2026-09-12).
Data as JSON: /api/errors/1035e7921dc8d0d4.
Report an issue: GitHub.
Appendix: source
Thrown at aeron-archive/src/main/java/io/aeron/archive/client/ArchiveProxy.java:1488
retryIdleStrategy.reset();
int attempts = retryAttempts;
while (true)
{
final long position = publication.offer(buffer, 0, MessageHeaderEncoder.ENCODED_LENGTH + length);
if (position > 0)
{
return true;
}
if (position == Publication.CLOSED)
{
throw new ArchiveException("connection to the archive has been closed");
}
if (position == Publication.NOT_CONNECTED)
{
throw new ArchiveException("connection to the archive is no longer available");
}
if (position == Publication.MAX_POSITION_EXCEEDED)
{
throw new ArchiveException(
"offer failed due to max position being reached: term-length=" + publication.termBufferLength());
}
if (--attempts <= 0)
{
return false;
}
retryIdleStrategy.idle();
}
}
private boolean offerWithTimeout(final int length, final AgentInvoker aeronClientInvoker)View on GitHub (pinned to 6d60124e15)