In order to install Cassandra, I've done the following: 1. Downloaded the TAR file. 2. Extracted the file. 3. Set the path for data and commitlog directories in the yaml file.
Now when I run Cassandra, I'm getting the following error: "Java HotSpot (TM) 64-Bit Server VM warning: Cannot open file. /..logs/gc.log due to No such file or directory"
What's causing this problem? Do I need to do something else before running it.
OS: RHEL 6.5 Cassandra version: 3.11.1
Cassandra logs are stored in the /<inst_root>/apigee/var/log/cassandra directory on each node. By default, a maximum of 50 log files, each with a maximum size of 20 MB, can be created; once this limit is reached older logs are deleted when newer logs are created.
These logs by default live in ${CASSANDRA_HOME}/logs , but most Linux distributions relocate logs to /var/log/cassandra . Operators can tune this location as well as what levels are logged using the provided logback. xml file.
Cassandra logs all gcs in a log file called gc.log. The path of this file is defined in cassandra-env.sh:
#GC log path has to be defined here because it needs to access CASSANDRA_HOME
JVM_OPTS="$JVM_OPTS -Xloggc:${CASSANDRA_HOME}/logs/gc.log"
Make sure you have a folder in your cassandra folder called logs and that whatever user you're running cassandra with has write permisssions to this folder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With