{"record":{"id":"9ffc5cc582943ddc","repo":"apache/cassandra","slug":"unable-to-fetch-log-entries-from","errorCode":null,"errorMessage":"Unable to fetch log entries from ","messagePattern":"Unable to fetch log entries from ","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/tcm/PeerLogFetcher.java","lineNumber":123,"sourceCode":"        });\n\n        logger.info(\"Fetching log from {}, at least {}\", remote, awaitAtleast);\n        try (Timer.Context ctx = TCMMetrics.instance.fetchPeerLogLatency.time())\n        {\n            RemoteProcessor.sendWithRetries(Verb.TCM_FETCH_PEER_LOG_REQ,\n                                            new FetchPeerLog(before),\n                                            fetchFromRemote,\n                                            new RemoteProcessor.CandidateIterator(Collections.singletonList(remote), false),\n                                            Retry.untilElapsed(DatabaseDescriptor.getCmsAwaitTimeout().to(TimeUnit.NANOSECONDS), TCMMetrics.instance.fetchLogRetries));\n            return appendToLog;\n        }\n        catch (Throwable t)\n        {\n            fetchFromRemote.cancel(true);\n            appendToLog.cancel(true);\n            JVMStabilityInspector.inspectThrowable(t);\n\n            logger.warn(\"Unable to fetch log entries from \" + remote, t);\n            Promise<ClusterMetadata> res = new AsyncPromise<>();\n            res.setFailure(new IllegalStateException(\"Unable to fetch log entries from \" + remote, t));\n            return res;\n        }\n    }\n}\n","sourceCodeStart":105,"sourceCodeEnd":130,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/tcm/PeerLogFetcher.java#L105-L130","documentation":"PeerLogFetcher.fetchLogEntriesAndWaitInternal cancels the remote fetch and local log append and returns a failed promise when any Throwable occurs while pulling log entries from a peer. The warning names the peer; the returned IllegalStateException carries the same message plus the cause.","triggerScenarios":"The internal fetch future or append-to-log future completes exceptionally — connection failure, serialization error, rejection due to shutdown, or local log append failure — during asyncFetchLog against `remote`.","commonSituations":"Remote peer crashing mid-response; mismatched message versions between nodes; node shutting down while a fetch is in flight; disk/local log issues during append.","solutions":["Read the chained cause in the IllegalStateException for the root failure.","Verify node version compatibility (serialization failures often mean mixed versions).","Check whether the node was shutting down; if so retry after it is up.","Confirm the remote peer is healthy and retry the fetch."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if (!FailureDetector.instance.isAlive(remote)) return Futures.immediateFailedFuture(new IllegalStateException(\"peer down: \" + remote));","typeGuard":null,"tryCatchPattern":"try { return asyncFetchLog(remote, epoch).get(); } catch (ExecutionException e) { logger.error(\"fetch from \" + remote + \" failed\", e.getCause()); }","preventionTips":["Avoid mixed-version clusters (serialization failures)","Retry with a different peer on failure","Handle node shutdown windows gracefully before issuing fetches"],"tags":["peer-fetch","failed-promise","network"],"backgroundTag":"network-request-failed","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"}