apache/hadoop · error · IOException
Interrupted waiting for doFinalize() response
Error message
Interrupted waiting for doFinalize() response
What it means
QuorumJournalManager.doFinalize() finalizes the upgrade on every JournalNode and waits for ALL of them within dfs.qjm.operations.timeout. InterruptedException means the finalization-driving thread was cancelled, and it is converted to IOException.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/QuorumJournalManager.java:713
} catch (InterruptedException e) {
throw new IOException("Interrupted waiting for doUpgrade() response");
} catch (TimeoutException e) {
throw new IOException("Timed out waiting for doUpgrade() response");
}
}
@Override
public void doFinalize() throws IOException {
QuorumCall<AsyncLogger, Void> call = loggers.doFinalize();
try {
call.waitFor(loggers.size(), loggers.size(), 0, timeoutMs,
"doFinalize");
if (call.countExceptions() > 0) {
call.rethrowException("Could not finalize one or more JournalNodes");
}
} catch (InterruptedException e) {
throw new IOException("Interrupted waiting for doFinalize() response");
} catch (TimeoutException e) {
throw new IOException("Timed out waiting for doFinalize() response");
}
}
@Override
public boolean canRollBack(StorageInfo storage, StorageInfo prevStorage,
int targetLayoutVersion) throws IOException {
QuorumCall<AsyncLogger, Boolean> call = loggers.canRollBack(storage,
prevStorage, targetLayoutVersion);
try {
call.waitFor(loggers.size(), loggers.size(), 0, timeoutMs,
"lockSharedStorage");
if (call.countExceptions() > 0) {
call.rethrowException("Could not check if roll back possible for"
+ " one or more JournalNodes");
}View on GitHub (pinned to 2add963021)
Solutions
- Stop the interrupting source and rerun finalization to completion.
- Inspect JournalNode directory state afterwards (previous/ removal) to confirm whether finalize partially applied.
- Ensure all JournalNodes are reachable so the rerun finishes within dfs.qjm.operations.timeout.
Defensive patterns
Strategy: retry
Try / catch
try {
qjm.doFinalize();
} catch (IOException e) {
if (Thread.currentThread().isInterrupted()
|| (e.getMessage() != null && e.getMessage().contains("Interrupted waiting for doFinalize"))) {
Thread.currentThread().interrupt();
// finalization cancelled: check previous/ dirs on JNs, then rerun
throw new IllegalStateException("finalize cancelled; rerun to completion", e);
}
throw e;
} Prevention
- Let finalize-upgrade run to completion; do not script-kill it on a clock timeout.
- After an interrupted finalize, inspect each JournalNode's previous/ directory before rerunning.
When it happens
Trigger: The upgrade finalization command is interrupted while JournalNodes are still finalizing — operator cancels 'hdfs dfsadmin -finalizeUpgrade'-driven flow, automation kills the step, or the JVM shuts down.
Common situations: Cancelled or timed-out upgrade finalization scripts; interrupted maintenance windows.
Related errors
- Interrupted waiting for doPreUpgrade() response
- Interrupted waiting for doUpgrade() response
- Interrupted waiting " + timeoutMs + "ms for a quorum of node
- Timed out waiting for doPreUpgrade() response
- Timed out waiting for doUpgrade() response
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/7a13dbe0abc45220.
Report an issue: GitHub.