Wei Deng created CASSANDRA-12534:
------------------------------------

             Summary: sstableverify tries to access commitlog directory and 
fails when running from a non-root/non-cassandra user
                 Key: CASSANDRA-12534
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12534
             Project: Cassandra
          Issue Type: Bug
          Components: Tools
            Reporter: Wei Deng


Reproduced this against C* 3.0.8 code. See the following output (the 
{{automaton}} user running this command is not the user that runs the cassandra 
JVM process, so it cannot have access to the commit log directory):

{noformat}
automaton@0ce59d338-1:~$ sstableverify keyspace1 standard1
ERROR 19:38:37,674 Exiting due to error while processing commit log during 
initialization.
org.apache.cassandra.io.FSWriteError: java.nio.file.AccessDeniedException: 
/var/lib/cassandra/commitlog/CommitLog-6-1472067517651.log
        at 
org.apache.cassandra.db.commitlog.CommitLogSegment.<init>(CommitLogSegment.java:163)
 ~[cassandra-all-3.0.8.1293.jar:3.0.8.1293]
        at 
org.apache.cassandra.db.commitlog.MemoryMappedSegment.<init>(MemoryMappedSegment.java:47)
 ~[cassandra-all-3.0.8.1293.jar:3.0.8.1293]
        at 
org.apache.cassandra.db.commitlog.CommitLogSegment.createSegment(CommitLogSegment.java:124)
 ~[cassandra-all-3.0.8.1293.jar:3.0.8.1293]
        at 
org.apache.cassandra.db.commitlog.CommitLogSegmentManager$1.runMayThrow(CommitLogSegmentManager.java:122)
 ~[cassandra-all-3.0.8.1293.jar:3.0.8.1293]
        at 
org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) 
[cassandra-all-3.0.8.1293.jar:3.0.8.1293]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_66]
Caused by: java.nio.file.AccessDeniedException: 
/var/lib/cassandra/commitlog/CommitLog-6-1472067517651.log
        at 
sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) 
~[na:1.8.0_66]
        at 
sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) 
~[na:1.8.0_66]
        at 
sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) 
~[na:1.8.0_66]
        at 
sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:177)
 ~[na:1.8.0_66]
        at java.nio.channels.FileChannel.open(FileChannel.java:287) 
~[na:1.8.0_66]
        at java.nio.channels.FileChannel.open(FileChannel.java:335) 
~[na:1.8.0_66]
        at 
org.apache.cassandra.db.commitlog.CommitLogSegment.<init>(CommitLogSegment.java:158)
 ~[cassandra-all-3.0.8.1293.jar:3.0.8.1293]
        ... 5 common frames omitted
{noformat}

This is the same issue that should be helped by CASSANDRA-9054.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to