/ var/logファイルは何に役立ちますか?Ubuntu 16.04でcassandraを実行しようとすると
OpenJDK 64-Bit Server VM warning: Cannot open file /var/log/cassandra/gc.log due to Permission denied
後
19:47:58,887 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[SYSTEMLOG] - Active log file name: /var/log/cassandra/system.log
19:47:58,887 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[SYSTEMLOG] - File property is set to [/var/log/cassandra/system.log]
19:47:58,889 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[SYSTEMLOG] - openFile(/var/log/cassandra/system.log,true) call failed. Java.io.FileNotFoundException: /var/log/cassandra/system.log (Permission denied)
at Java.io.FileNotFoundException: /var/log/cassandra/system.log (Permission denied)
これらの問題があるのはなぜですか?これは私のJavaです
Java -version
openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
これらは許可です
/var/log$ ls -la cassandra/
total 300
drwxr-xr-x 2 cassandra cassandra 4096 jan. 25 15:50 .
drwxrwxr-x 14 root syslog 4096 jan. 25 15:49 ..
-rw-r--r-- 1 cassandra cassandra 184448 jan. 25 19:50 debug.log
-rw-r--r-- 1 cassandra cassandra 59956 jan. 25 19:50 gc.log.0.current
-rw-r--r-- 1 cassandra cassandra 41363 jan. 25 19:50 system.log
私は同じ問題に直面していましたが、次のコマンドを使用して修正しました:
Sudo chown -R $USER:$GROUP /var/lib/cassandra/
Sudo chown -R $USER:$GROUP /var/log/cassandra/