apache/cassandra · warning
Failed closing
Error message
Failed closing {} What it means
FileUtils.closeQuietly(Closeable) swallows any exception thrown while closing a stream or channel, logging a warning with the object that failed to close. The operation continues because close failures during cleanup are usually non-fatal.
Solutions
- Check the log for the preceding root cause (often disk full or I/O error) and fix that first
- Ensure resources are closed once via try-with-resources instead of manual close
- Verify filesystem health (dmesg, df) if close failures recur
- If data loss is a concern, re-run the operation (compaction, streaming) that owned the resource
Example fix
null
Defensive patterns
Strategy: try-catch
Validate before calling
null
Type guard
null
Try / catch
try {
FileUtils.closeQuietly(stream);
} catch (Throwable t) { /* closeQuietly never throws; rely on its warn log for diagnosis */ }
// For resources whose close errors matter:
try { stream.close(); } catch (IOException e) { handle(e); } Prevention
- Use try-with-resources for resources where close errors are meaningful
- Monitor disks for ENOSPC, the most common cause of close failures
- Avoid double-closing streams
- Check node logs for the underlying I/O cause
When it happens
Trigger: Any code path calling FileUtils.closeQuietly(...) where the underlying close() throws (e.g. IOException flushing buffered data, already-closed stream, disk I/O error on close).
Common situations: Disk-full conditions while flushing a compaction writer; interrupted or failed sstable writes being cleaned up; double-close of a stream.
Related errors
- Failed closing stream
- Attempted skipBytes() on a closed RAR
- Attempted to seek in a closed RAR
- Ballot file corrupted
- Can't open %r for reading
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/210ccc3b0b40dcfa.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/io/util/FileUtils.java:253
{
channel.truncate(size);
}
catch (IOException e)
{
throw PathUtils.propagateUnchecked(e, file.toPath(), true);
}
}
public static void closeQuietly(Closeable c)
{
try
{
if (c != null)
c.close();
}
catch (Exception e)
{
logger.warn("Failed closing {}", c, e);
}
}
public static void closeQuietly(AutoCloseable c)
{
try
{
if (c != null)
c.close();
}
catch (Exception e)
{
logger.warn("Failed closing {}", c, e);
}
}
public static void close(Closeable... cs) throws IOException
{View on GitHub (pinned to 88fd0f6a0e)