You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jon Meredith (Jira)" <ji...@apache.org> on 2025/02/05 00:22:00 UTC

[jira] [Created] (CASSANDRA-20289) sstabledump throws permissions exception on startup while trying to load default configuration

Jon Meredith created CASSANDRA-20289:
----------------------------------------

             Summary: sstabledump throws permissions exception on startup while trying to load default configuration
                 Key: CASSANDRA-20289
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-20289
             Project: Apache Cassandra
          Issue Type: Improvement
          Components: Tool/sstable
            Reporter: Jon Meredith
            Assignee: Jon Meredith


After CASSANDRA-19812 using sstabledump throws exceptions on startup in deployments
where the conf file is not relative to {{path/to/cassandra/tools/bin}} or with a process that does not have permissions to create the commit log directory or files within it. It presumably applies to other offline tools, but I haven't tested yet.

The new block size check for DirectIO makes the dirs/files, but isn't needed for tools, so can be skipped on tool initialization.

Elided exception
{code}
$ path/to/cassandra/tools/bin/sstabledump system/tbl-uuid/sstable-Data.db
Exception in thread "main" FSWriteError in /path/to/cassandra/tools/bin/../../data/commitlog
       at org.apache.cassandra.io.util.PathUtils.propagateUnchecked(PathUtils.java)
       at org.apache.cassandra.io.util.PathUtils.propagateUnchecked(PathUtils.java)
       at org.apache.cassandra.io.util.PathUtils.ifNotExists(PathUtils.java)
       at org.apache.cassandra.io.util.PathUtils.createDirectoriesIfNotExists(PathUtils.java)
       at org.apache.cassandra.config.DatabaseDescriptor.resolveCommitLogWriteDiskAccessMode(DatabaseDescriptor.java)
       at org.apache.cassandra.config.DatabaseDescriptor.initializeCommitLogDiskAccessMode(DatabaseDescriptor.java)
       at org.apache.cassandra.config.DatabaseDescriptor.applySimpleConfig(DatabaseDescriptor.java)
       at org.apache.cassandra.config.DatabaseDescriptor.toolInitialization(DatabaseDescriptor.java)
       at org.apache.cassandra.tools.SSTableExport.<clinit>(SSTableExport.java)
Caused by: java.nio.file.AccessDeniedException: path/to/cassandra/tools/bin/../../data
       at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java)
       at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java)
       at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java)
       at java.base/sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java)
       at java.base/java.nio.file.Files.createDirectory(Files.java)
       at java.base/java.nio.file.Files.createAndCheckIsDirectory(Files.java)
       at java.base/java.nio.file.Files.createDirectories(Files.java)
       at org.apache.cassandra.io.util.PathUtils.lambda$createDirectoriesIfNotExists$5(PathUtils.java)
       at org.apache.cassandra.io.util.PathUtils.ifNotExists(PathUtils.java)
       ... 6 more
{code}




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org