Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-12534

sstableverify tries to access commitlog directory and fails when running from a non-root/non-cassandra user

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Normal
    • Resolution: Unresolved
    • None
    • Legacy/Tools
    • None
    • Normal

    Description

      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):

      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
      

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

      Attachments

        Issue Links

          Activity

            People

              eduard.tudenhoefner Eduard Tudenhoefner
              weideng Wei Deng
              Eduard Tudenhoefner
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: