This article provides steps to reduce the sizes of audit.log and auth.log-######## files. And remove java_pid####.hprof files.
Symptoms:
/var/log/vmware/loginsight/cassandra.log:Caused by: org.apache.cassandra.io.compress.CorruptBlockException: (/storage/core/loginsight/cidata/cassandra/data/machine_learning/spock_cluster_counts-#################/nb-#####-big-Data.db): corruption detected, chunk at 293732 of length 29154.ERROR : Failed to start VMware Aria Operations for Logs/usr/lib/loginsight utilizing a large amount. Here you may find one or more java_pid####.hprof large files in this directory.Note: Run the following command to check disk usage on the specific directories:
Aria Operations for Logs 8.x
Aria Operations for Logs 8.18.x
VMware vRealize Log Insight 8.x
or /usr/lib/loginsight directories consumes the majority of the space on /dev/sda-x (where "x" is typically 3, 4 or 5).hprof file is generated due to service crashes, which seem to be a trending issue when the cluster is running low on live storage and no data archiving is enabled, or when the cluster is undersized./var/log as the issue but more often due to hprof files in /usr/lib/loginsighthprof file(s)root.cd /usr/lib/loginsight rm java_pid####.hprofpasswd root command now to reset it.reboot -f (if in single user mode) or restart the loginsight service by running the command:service loginsight restart/var/log, /var/log/audit being the largest directories.
Boot into Single User mode to clear the filled log files, and configure log rotation.
Notes:
rw init=/bin/bash which adds another option to the line.Note: The virtual appliance starts in single-user mode.
rm /var/log/audit/audit.log
rm /var/log/auth.log*
Note: Skip this step on vRealize Log Insight 8.4 and later.
Note: Skip this step on vRealize Log Insight 8.1 and later.
Note: Skip this step on vRealize Log Insight 8.6 and later.
/var/log/auth.log {
daily
missingok
rotate 5
compress
delaycompress
notifempty
create 640 root root
}
Notes:
if [[ -f /var/log/auth.log && ! -s /var/log/auth.log ]]; then
systemctl restart rsyslog
fi
Example: After editing, the file should look similar to the following.
#!/bin/sh
/usr/sbin/logrotate /etc/logrotate.conf
EXITVALUE=$?
if [ $EXITVALUE != 0 ]; then
/usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
fi
if [[ -f /var/log/auth.log && ! -s /var/log/auth.log ]]; then
systemctl restart rsyslog
fi
exit $EXITVALUE
/usr/lib/loginsight/application/lib/apache-cassandra-*/data/hints being the largest directory.In the event that the space on the root partition is being consumed by hints files in the mentioned directory, refer to Error "Failed to dispatch hints file" "file is corrupted" in cassandra.log to remove the hints files.
Aria Operations for Logs (Formerly vRealize Log Insight) 8.6 and higher contain a fix to address the log rotation issues. However, this issue may still occur due to excessive logins from network and vulnerability scanners.