{"record":{"id":"f0e160fcffb814c4","repo":"aeron-io/aeron","slug":"failed-to-join-live-log","errorCode":null,"errorMessage":"failed to join live log","messagePattern":"failed to join live log","errorType":"exception","errorClass":"TimeoutException","httpStatus":null,"severity":"warning","filePath":"aeron-cluster/src/main/java/io/aeron/cluster/Election.java","lineNumber":1160,"sourceCode":"            if (consensusModuleAgent.tryJoinLogAsFollower(image, isLeaderStartup, nowNs))\n            {\n                updateRecordingLog(nowNs);\n                state(FOLLOWER_READY, nowNs, \"\");\n                workCount++;\n            }\n            else if (nowNs >= (timeOfLastStateChangeNs + ctx.leaderHeartbeatTimeoutNs()))\n            {\n                throw new TimeoutException(\"failed to join live log as follower\", AeronException.Category.WARN);\n            }\n        }\n        else if (ChannelEndpointStatus.ERRORED == logSubscription.channelStatus())\n        {\n            final String message = \"failed to add live log as follower - \" + logSubscription.channel();\n            throw new ClusterException(message, AeronException.Category.WARN);\n        }\n        else if (nowNs >= (timeOfLastStateChangeNs + ctx.leaderHeartbeatTimeoutNs()))\n        {\n            throw new TimeoutException(\"failed to join live log\", AeronException.Category.WARN);\n        }\n\n        return workCount;\n    }\n\n    private int followerReady(final long nowNs)\n    {\n        if (consensusPublisher.appendPosition(\n            leaderMember.publication(), leadershipTermId, logPosition, thisMember.id(), APPEND_POSITION_FLAG_NONE))\n        {\n            consensusModuleAgent.electionComplete(nowNs);\n            state(CLOSED, nowNs, \"\");\n        }\n        else if (nowNs >= (timeOfLastStateChangeNs + ctx.leaderHeartbeatTimeoutNs()))\n        {\n            throw new TimeoutException(\"ready follower failed to notify leader\", AeronException.Category.WARN);\n        }\n","sourceCodeStart":1142,"sourceCodeEnd":1178,"githubUrl":"https://github.com/aeron-io/aeron/blob/6d60124e15e35c11b49ba2e3c2c2858a09a18803/aeron-cluster/src/main/java/io/aeron/cluster/Election.java#L1142-L1178","documentation":"TimeoutException (WARN) thrown when a follower never joins the live log at all: before a subscription was even created or any branch of the live-log state made progress, ctx.leaderHeartbeatTimeoutNs elapsed since the last state change. It is the outer timeout guarding the follower live-log join path.","triggerScenarios":"In followerLiveLog (early branch, e.g. subscription not yet added): if neither the new leadership term/appender arrives nor any progress happens within timeOfLastStateChangeNs + leaderHeartbeatTimeoutNs, this is thrown.","commonSituations":"Elected leader died before starting the live log; severe network partition; leaderHeartbeatTimeoutNs too small; follower's driver stalled so the new-leadership-term message is never processed.","solutions":["Check whether the elected leader is alive; the cluster should re-canvas after this timeout","Verify inter-member connectivity on the log channels","Increase ctx.leaderHeartbeatTimeoutNs() in slow environments","Restart the member/driver to re-enter the election cleanly"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"catch (TimeoutException e) {\n    // no live log joined before deadline; leader probably gone; election re-canvas handles retry\n}","preventionTips":["Ensure leader stability (adequate resources, no aggressive restarts)","Keep leaderHeartbeatTimeoutNs > max election step latency","Monitor member heartbeat exchange"],"tags":["timeout","election","live-log"],"backgroundTag":"request-timeout","analyzedSha":"6d60124e15e35c11b49ba2e3c2c2858a09a18803","analyzedAt":"2026-09-12T11:17:07.683Z","contentChangedAt":"2026-09-12T11:17:07.683Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}