我在启动cassandra时面临问题。我正在使用Datastax版本。当我开始cassandra时,它正在以下面的问题结束。
ERROR [main] 2017-08-10 20:42:04,999 CassandraDaemon.java:654 - Exception encountered during startup
org.apache.cassandra.io.FSWriteError: java.nio.file.AccessDeniedException: C:\Program Files\DataStax Community\data\commitlog\CommitLog-5-1502421528137.log
at org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:131) ~[apache-cassandra-2.2.8.jar:2.2.8]
at org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:148) ~[apache-cassandra-2.2.8.jar:2.2.8]
at org.apache.cassandra.db.commitlog.CommitLogSegmentManager.recycleSegment(CommitLogSegmentManager.java:365) ~[apache-cassandra-2.2.8.jar:2.2.8]
at org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:165) ~[apache-cassandra-2.2.8.jar:2.2.8]
at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:284) [apache-cassandra-2.2.8.jar:2.2.8]
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:532) [apache-cassandra-2.2.8.jar:2.2.8]
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:641) [apache-cassandra-2.2.8.jar:2.2.8]
Caused by: java.nio.file.AccessDeniedException: C:\Program Files\DataStax Community\data\commitlog\CommitLog-5-1502421528137.log
at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83) ~[na:1.7.0_40]
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97) ~[na:1.7.0_40]
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102) ~[na:1.7.0_40]
at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:269) ~[na:1.7.0_40]
at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) ~[na:1.7.0_40]
at java.nio.file.Files.delete(Files.java:1077) ~[na:1.7.0_40]
at org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:125) ~[apache-cassandra-2.2.8.jar:2.2.8]
... 6 common frames omitted
我尝试将所有权限保留到以下文件夹并重新启动多次。
C:\Program Files\DataStax Community\data
但仍然遇到同样的错误,我正在使用windows 10
。
请建议。
答案 0 :(得分:1)
我遇到了同样的问题,在我的情况下,源代码是可执行代码的运行配置中不兼容的 JRE 版本。
我已经解决了将 11.0.2 JRE 版本替换为 1.8.0_181
的问题Here是文档,您可以在其中确保Cassandra的兼容性。