aeron-io/aeron · error · ArchiveException
response channel from archive is not connected, channel=
Error message
response channel from archive is not connected, channel=<channel>, streamId=<streamId>, imageCount=<imageCount>
What it means
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.
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.
Example fix
// before
archive.listRecording(recordingId); // throws if archive went away
// after
try {
archive.listRecording(recordingId);
} catch (ArchiveException e) {
if (e.getMessage().contains("not connected")) {
archive = AeronArchive.connect(ctx);
}
} Defensive patterns
Strategy: try-catch
Validate before calling
if (!archive.controlResponsePoller().subscription().isConnected()) {
archive = AeronArchive.connect(ctx); // pre-flight reconnect
} Try / catch
try {
archive.listRecordingsForUri(0, 10, channelFragment, 100);
} catch (ArchiveException e) {
archive = AeronArchive.connect(ctx); // session dropped
} Prevention
- Implement automatic session re-establishment on disconnect.
- Monitor archive liveness with heartbeats or simple queries.
- Check firewall/idle timeouts on long-lived control connections.
When it happens
Trigger: Any pollForResponse-driven call after the archive has stopped, the response publication closed, or the network dropped so subscription.isConnected() returns false (imageCount=0).
Common situations: 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.
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
- ACTIVE_RECORDING
- aeronArchiveContext must be set
- Archive.Context.controlChannel must be set
- Archive.Context.controlChannel must be UDP media: uri=
- Archive.Context.recordingEventsChannel must be set if…
AI-assisted analysis of aeron-io/aeron@6d60124e15 (2026-09-12).
Data as JSON: /api/errors/b29b548507dfdb3b.
Report an issue: GitHub.
Appendix: source
Thrown at aeron-archive/src/main/java/io/aeron/archive/client/AeronArchive.java:2399
if (fragments > 0)
{
continue;
}
final Subscription subscription = poller.subscription();
checkForDisconnect(subscription);
checkDeadline(deadlineNs, "awaiting response", correlationId);
idleStrategy.idle(context.runInvokers());
}
}
private void checkForDisconnect(final Subscription subscription)
{
if (!subscription.isConnected())
{
state(State.DISCONNECTED);
throw new ArchiveException(
"response channel from archive is not connected, " +
"channel=" + subscription.channel() +
", streamId=" + subscription.streamId() +
", imageCount=" + subscription.imageCount());
}
}
private long pollForResponse(final long correlationId)
{
final long deadlineNs = nanoClock.nanoTime() + messageTimeoutNs;
final ControlResponsePoller poller = controlResponsePoller;
while (true)
{
pollNextResponse(correlationId, deadlineNs, poller);
if (poller.controlSessionId() != controlSessionId)
{View on GitHub (pinned to 6d60124e15)