title: logrotate doesn't rotate catalina.out
body: <p>I am trying to use logrotate to rotate out tomcat's catalina.out automatically on a daily basis even though I can manually call logrotate and it works fine.  I am using I have tried every solution out there, but I cannot get it to rotate.  I am on Oracle Linux 7.5 which is basically RHEL 7.  </p>
  
  <p>Here are the steps I have taken:</p>
  
  <p>I created a file /etc/logrotate.d/tomee.conf that looks like this:</p>
  
  <pre><code>    /apache-tomee-plus-7.0.4/logs/catalina.out
      {
          su opc opc
          daily
          rotate 7
          compress
          notifempty
          missingok
          copytruncate
      }
  </code></pre>
  
  <p>I can manually execute the logrotate and it works just fine using <code>sudo /usr/sbin/logrotate  /etc/logrotate.conf</code></p>
  
  <p>I also attempt to debug using <code>sudo /usr/sbin/logrotate -d /etc/logrotate.conf</code> and the output has no errors</p>
  
  <pre><code>    ...
      rotating pattern: /apache-tomee-plus-7.0.4/logs/catalina.out
       after 1 days (7 rotations)
      empty log files are not rotated, old logs are removed
      switching euid to 1000 and egid to 1000
      considering log /apache-tomee-plus-7.0.4/logs/catalina.out
        log needs rotating
      rotating log /apache-tomee-plus-7.0.4/logs/catalina.out, log-&gt;rotateCount is 7
      dateext suffix '-20181211'
      glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
      copying /apache-tomee-plus-7.0.4/logs/catalina.out to /apache-tomee-plus-7.0.4/logs/catalina.out-20181211
      truncating /apache-tomee-plus-7.0.4/logs/catalina.out
      compressing log with: /bin/gzip
      switching euid to 0 and egid to 0
      ...
  </code></pre>
  
  <p>But it still doesn't do it automatically daily.</p>
  
  <p>I also know that logrotate is running because according to <code>/var/lib/logrotate/logrotate.status</code>, other logs are being rotated, but not catalina.out</p>
  
  <pre><code>    cat /var/lib/logrotate/logrotate.status
      logrotate state -- version 2
      "/var/log/yum.log" 2018-11-29-18:44:14
      "/var/log/up2date" 2018-9-17-19:0:0
      "/apache-tomee-plus-7.0.4/logs/catalina.out" 2018-12-8-0:37:14
      "/var/log/chrony/*.log" 2018-9-17-19:0:0
      "/var/log/wtmp" 2018-12-3-17:48:49
      "/var/log/spooler" 2018-11-29-18:44:14
      "/var/log/btmp" 2018-12-3-17:48:49
      "/var/log/iscsiuio.log" 2018-9-17-19:0:0
      "/var/log/maillog" 2018-12-11-3:7:1
      "/var/log/secure" 2018-12-11-3:7:1
      "/var/log/messages" 2018-12-11-3:7:1
      "/var/account/pacct" 2018-9-17-19:0:0
      "/var/log/cron" 2018-12-11-3:7:1
  </code></pre>
  
  <p>notice that there are multiple entries that say it was rotated on 12-11, but catalina.out wasn't rotated since 12-8, but it still isn't rotating.</p>
  
  <p>Any help is greatly appreciated.  Thanks.</p>