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.
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,
So these 2 files must exist and be configured correctly.
3) Cron Daily is run by process,
So this must be configured correctly.
4) anacrontab is called (run by)
In this case the customer was getting errors in,
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,
# cd /etc/cron.d
# chmod 600 *
So the flow is as belows each one calls the next,
cron.d/0hourly -> anacrontab -> cron.daily/logrotate -> logrotate.d/levelPortal