{"record":{"id":"3eba5d6d6069f408","repo":"aeron-io/aeron","slug":"egresspoller-detail","errorCode":null,"errorMessage":"<egressPoller.detail()>","messagePattern":"<egressPoller\\.detail\\(\\)>","errorType":"exception","errorClass":"ClusterException","httpStatus":null,"severity":"error","filePath":"aeron-cluster/src/main/java/io/aeron/cluster/client/AeronCluster.java","lineNumber":2512,"sourceCode":"                    correlationId = NULL_VALUE;\n                    clusterSessionId = egressPoller.clusterSessionId();\n                    prepareChallengeResponse(ctx.credentialsSupplier().onChallenge(egressPoller.encodedChallenge()));\n                    return;\n                }\n\n                switch (egressPoller.eventCode())\n                {\n                    case OK:\n                        leadershipTermId = egressPoller.leadershipTermId();\n                        leaderMemberId = egressPoller.leaderMemberId();\n                        clusterSessionId = egressPoller.clusterSessionId();\n                        leaderHeartbeatTimeoutNs = egressPoller.leaderHeartbeatTimeoutNs();\n                        egressImage = egressPoller.egressImage();\n                        state(State.CONCLUDE_CONNECT);\n                        break;\n\n                    case ERROR:\n                        throw new ClusterException(egressPoller.detail());\n\n                    case REDIRECT:\n                        updateMembers();\n                        break;\n\n                    case AUTHENTICATION_REJECTED:\n                        throw new AuthenticationException(egressPoller.detail());\n\n                    case CLOSED:\n                    case NULL_VAL:\n                        break;\n                }\n            }\n        }\n\n        private void prepareChallengeResponse(final byte[] encodedCredentials)\n        {\n            correlationId = ctx.aeron().nextCorrelationId();","sourceCodeStart":2494,"sourceCodeEnd":2530,"githubUrl":"https://github.com/aeron-io/aeron/blob/6d60124e15e35c11b49ba2e3c2c2858a09a18803/aeron-cluster/src/main/java/io/aeron/cluster/client/AeronCluster.java#L2494-L2530","documentation":"While polling the egress subscription during connect(), the EgressPoller may report an ERROR event from the cluster (e.g. session rejected or authentication/consensus failure). AeronCluster propagates the poller's detail string as a ClusterException, so connect fails with the cluster's own error description.","triggerScenarios":"EgressPoller transitions to State.ERROR during connect, typically because the cluster rejected the connect request (invalid session, cluster unavailable for service, auth failure) and sent an error detail back.","commonSituations":"Client connecting while the cluster has no leader or is in election; max sessions reached; authentication rejected (different credentials than expected); snapshot/consensus issues on the cluster side.","solutions":["Read the exception message (egressPoller.detail()) — it states the cluster-side cause; fix that on the cluster or client","Ensure the cluster has an elected leader and services are caught up before connecting clients","Check cluster session limits and authentication configuration (Context.credentials() / authenticator server-side)","Retry connect after the cluster recovers from election/replay"],"exampleFix":"// before\nAeronCluster cluster = AeronCluster.connect(ctx); // ClusterException: <cluster detail>\n// after\ntry {\n    AeronCluster cluster = AeronCluster.connect(ctx);\n} catch (ClusterException e) {\n    LOG.error(\"Cluster rejected connect: \" + e.getMessage()); // act on cluster-side detail\n    throw e;\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    AeronCluster cluster = AeronCluster.connect(ctx);\n} catch (ClusterException e) {\n    LOG.error(\"Cluster rejected connect: {}\", e.getMessage());\n    // branch on detail: wait for leader, fix auth credentials, or honor session limits\n    throw e;\n}","preventionTips":["Wait for the cluster to have an elected leader before connecting clients","Ensure client credentials match the cluster's authenticator configuration","Respect max session limits; close idle sessions before opening new ones","Log egressPoller.detail() server-side cause and alert on repeated rejections"],"tags":["cluster-client","cluster-error","connectivity"],"backgroundTag":"api-error-response","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"}