{"record":{"id":"b35f5595206f35a8","repo":"apache/cassandra","slug":"could-not-fetch-log-entries-from-peer-remote","errorCode":null,"errorMessage":"Could not fetch log entries from peer, remote = {}, await = {}","messagePattern":"Could not fetch log entries from peer, remote = (.+?), await = (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/java/org/apache/cassandra/tcm/PeerLogFetcher.java","lineNumber":71,"sourceCode":"     * fetch log entries from the given remote, we have already seen a message from this replica with epoch awaitAtleast.\n     */\n    public ClusterMetadata fetchLogEntriesAndWait(InetAddressAndPort remote, Epoch awaitAtleast)\n    {\n        ClusterMetadata metadata = ClusterMetadata.current();\n        if (metadata.epoch.isEqualOrAfter(awaitAtleast))\n            return metadata;\n\n        try\n        {\n            return asyncFetchLog(remote, awaitAtleast).get(DatabaseDescriptor.getRpcTimeout(TimeUnit.MILLISECONDS), TimeUnit.MILLISECONDS);\n        }\n        catch (InterruptedException e)\n        {\n            throw new RuntimeException(\"Can not fetch log entries during shutdown\", e);\n        }\n        catch (ExecutionException | TimeoutException e)\n        {\n            logger.warn(\"Could not fetch log entries from peer, remote = {}, await = {}\", remote, awaitAtleast);\n            logger.debug(\"Exception while fetching log entries from peer, remote = {}\", remote, e);\n        }\n        return metadata;\n    }\n\n    public Future<ClusterMetadata> asyncFetchLog(InetAddressAndPort remote, Epoch awaitAtleast)\n    {\n        return EpochAwareDebounce.instance.getAsync(() -> fetchLogEntriesAndWaitInternal(remote, awaitAtleast), awaitAtleast);\n    }\n\n    private Future<ClusterMetadata> fetchLogEntriesAndWaitInternal(InetAddressAndPort remote, Epoch awaitAtleast)\n    {\n        Epoch before = ClusterMetadata.current().epoch;\n        if (before.isEqualOrAfter(awaitAtleast))\n        {\n            Promise<ClusterMetadata> res = new AsyncPromise<>();\n            res.setSuccess(ClusterMetadata.current());\n            return res;","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/tcm/PeerLogFetcher.java#L53-L89","documentation":"PeerLogFetcher.fetchLogEntriesAndWait logs this warning when a synchronous fetch of log entries from a peer fails via ExecutionException or TimeoutException. The exception itself is only logged at debug level; the method returns the last-known metadata rather than the awaited epoch.","triggerScenarios":"Calling fetchLogEntriesAndWait(remote, awaitAtleast) when the remote peer is unreachable, slow, or times out before responding with log entries up to the awaited epoch.","commonSituations":"Peer restarting or overloaded during topology changes; network partitions; remote node decommissioned but still referenced; RPC timeouts set too low for large log gaps.","solutions":["Verify the remote peer is up and reachable (ping/nodetool status).","Check the debug-level log line 'Exception while fetching log entries from peer' for the real cause.","Increase RPC/request timeouts if log gaps are large.","Retry the fetch; if persistent, remove or repair the dead peer."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"if (!FailureDetector.instance.isAlive(remote)) throw new IllegalStateException(\"peer \" + remote + \" not alive; skip fetch\");","typeGuard":null,"tryCatchPattern":"try { return fetchLogEntriesAndWait(remote, epoch); } catch (RuntimeException e) { logger.warn(\"retrying fetch from another peer\"); return fetchFromOtherPeer(epoch); }","preventionTips":["Set RPC timeouts proportional to expected log gap","Remove decommissioned peers from fetch candidates","Check debug logs for the suppressed exception"],"tags":["peer-fetch","timeout","network"],"backgroundTag":"request-timeout","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}