ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.
Catalina log file growing big
Article ID: 106876
STARTER PACK-7CA Rapid App SecurityCA API Gateway
It was suggested that the logrotate should automatically kick in, but it is not happening so. What was done temporarily, 1. SSH to the root prompt of the API Portal 2. Run the following command: chmod 644 /etc/logrotate.d/levelPortal 3. You can force the log rotation by running this command: logrotate -f /etc/logrotate.d/levelPortal This will force a log rotation instantly, and will create a gzip of the current catalina.out in the same directory.
But the log rotation in not working properly running on its own. It only works when you force the command again.
Release: Component: APIESM
Below is the Reverse flow of cron calling logrotate
1) The file /etc/logrotate.d/levelPortal must exist and have correct permissions. chmod 644 /etc/logrotate.d/levelPortal
2) The file levelPortal is called by the following 2 items, /etc/cron.daily/logrotate /etc/logrotate.conf
So these 2 files must exist and be configured correctly.
3) Cron Daily is run by process, /etc/anacrontab So this must be configured correctly.
4) anacrontab is called (run by) /etc/cron.d/0hourly
In this case the customer was getting errors in, /var/log/cron Jul 10 20:09:04 <HOSTNAME> crond: (root) BAD FILE MODE (/etc/cron.d/0hourly)
In review the customer had to many premissions for configuration files, Did the following process,