logrotate not able to truncate catalina.out [duplicate]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












0
















This question already has an answer here:



  • logrotate not working

    2 answers



I'm running tomcat server in my centos machine. I've following content in my /etc/logrotate.d/tomcat file:



/log/apache-tomcat/catalina.out
copytruncate
daily
size 256M
rotate 8
missingok
maxage 7



I tried to run the logrotate command manually in debug mode.



/usr/sbin/logrotate -d /etc/logrotate.conf


In the logs, I found following content regarding the /log/apache-tomcat/catalina.out file.




rotating pattern: /log/apache-tomcat/catalina.out 268435456 bytes (8 rotations)



empty log files are rotated, old logs are removed



considering log /log/apache-tomcat/catalina.out
log needs rotating



rotating log /log/apache-tomcat/catalina.out, log->rotateCount is 8



dateext suffix '-20190206'



glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'



glob finding old rotated logs failed



copying /log/apache-tomcat/catalina.out to /log/apache-tomcat/catalina.out-20190206



truncating /log/apache-tomcat/catalina.out




But the file size didn't change after running the command. I'm not sure what went wrong here. This file size is keep on increasing and causing lot of issues.










share|improve this question















marked as duplicate by Jeff Schaller, Anthony Geoghegan, Christopher, Community Feb 6 at 16:43


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






















    0
















    This question already has an answer here:



    • logrotate not working

      2 answers



    I'm running tomcat server in my centos machine. I've following content in my /etc/logrotate.d/tomcat file:



    /log/apache-tomcat/catalina.out
    copytruncate
    daily
    size 256M
    rotate 8
    missingok
    maxage 7



    I tried to run the logrotate command manually in debug mode.



    /usr/sbin/logrotate -d /etc/logrotate.conf


    In the logs, I found following content regarding the /log/apache-tomcat/catalina.out file.




    rotating pattern: /log/apache-tomcat/catalina.out 268435456 bytes (8 rotations)



    empty log files are rotated, old logs are removed



    considering log /log/apache-tomcat/catalina.out
    log needs rotating



    rotating log /log/apache-tomcat/catalina.out, log->rotateCount is 8



    dateext suffix '-20190206'



    glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'



    glob finding old rotated logs failed



    copying /log/apache-tomcat/catalina.out to /log/apache-tomcat/catalina.out-20190206



    truncating /log/apache-tomcat/catalina.out




    But the file size didn't change after running the command. I'm not sure what went wrong here. This file size is keep on increasing and causing lot of issues.










    share|improve this question















    marked as duplicate by Jeff Schaller, Anthony Geoghegan, Christopher, Community Feb 6 at 16:43


    This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.




















      0












      0








      0









      This question already has an answer here:



      • logrotate not working

        2 answers



      I'm running tomcat server in my centos machine. I've following content in my /etc/logrotate.d/tomcat file:



      /log/apache-tomcat/catalina.out
      copytruncate
      daily
      size 256M
      rotate 8
      missingok
      maxage 7



      I tried to run the logrotate command manually in debug mode.



      /usr/sbin/logrotate -d /etc/logrotate.conf


      In the logs, I found following content regarding the /log/apache-tomcat/catalina.out file.




      rotating pattern: /log/apache-tomcat/catalina.out 268435456 bytes (8 rotations)



      empty log files are rotated, old logs are removed



      considering log /log/apache-tomcat/catalina.out
      log needs rotating



      rotating log /log/apache-tomcat/catalina.out, log->rotateCount is 8



      dateext suffix '-20190206'



      glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'



      glob finding old rotated logs failed



      copying /log/apache-tomcat/catalina.out to /log/apache-tomcat/catalina.out-20190206



      truncating /log/apache-tomcat/catalina.out




      But the file size didn't change after running the command. I'm not sure what went wrong here. This file size is keep on increasing and causing lot of issues.










      share|improve this question

















      This question already has an answer here:



      • logrotate not working

        2 answers



      I'm running tomcat server in my centos machine. I've following content in my /etc/logrotate.d/tomcat file:



      /log/apache-tomcat/catalina.out
      copytruncate
      daily
      size 256M
      rotate 8
      missingok
      maxage 7



      I tried to run the logrotate command manually in debug mode.



      /usr/sbin/logrotate -d /etc/logrotate.conf


      In the logs, I found following content regarding the /log/apache-tomcat/catalina.out file.




      rotating pattern: /log/apache-tomcat/catalina.out 268435456 bytes (8 rotations)



      empty log files are rotated, old logs are removed



      considering log /log/apache-tomcat/catalina.out
      log needs rotating



      rotating log /log/apache-tomcat/catalina.out, log->rotateCount is 8



      dateext suffix '-20190206'



      glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'



      glob finding old rotated logs failed



      copying /log/apache-tomcat/catalina.out to /log/apache-tomcat/catalina.out-20190206



      truncating /log/apache-tomcat/catalina.out




      But the file size didn't change after running the command. I'm not sure what went wrong here. This file size is keep on increasing and causing lot of issues.





      This question already has an answer here:



      • logrotate not working

        2 answers







      centos logrotate tomcat






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Feb 6 at 17:28









      Rui F Ribeiro

      40.7k1479137




      40.7k1479137










      asked Feb 6 at 14:09









      pkgajulapallipkgajulapalli

      1266




      1266




      marked as duplicate by Jeff Schaller, Anthony Geoghegan, Christopher, Community Feb 6 at 16:43


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









      marked as duplicate by Jeff Schaller, Anthony Geoghegan, Christopher, Community Feb 6 at 16:43


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






















          1 Answer
          1






          active

          oldest

          votes


















          1














          The problem got resolved after changing the permissions of /etc/logrotate.d/tomcat file.



          Before:



          $ ls -lht /etc/logrotate.d/tomcat
          -rwxr-xr-x 1 root root 308 Apr 25 2018 /etc/logrotate.d/tomcat


          After:



          $ sudo chmod -x /etc/logrotate.d/tomcat
          $ ls -lht /etc/logrotate.d/tomcat
          -rw-r--r-- 1 root root 308 Apr 25 2018 /etc/logrotate.d/tomcat


          Got to know about it after checking verbose of logrotate.



          $ /usr/sbin/logrotate -v /etc/logrotate.conf





          share|improve this answer





























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            The problem got resolved after changing the permissions of /etc/logrotate.d/tomcat file.



            Before:



            $ ls -lht /etc/logrotate.d/tomcat
            -rwxr-xr-x 1 root root 308 Apr 25 2018 /etc/logrotate.d/tomcat


            After:



            $ sudo chmod -x /etc/logrotate.d/tomcat
            $ ls -lht /etc/logrotate.d/tomcat
            -rw-r--r-- 1 root root 308 Apr 25 2018 /etc/logrotate.d/tomcat


            Got to know about it after checking verbose of logrotate.



            $ /usr/sbin/logrotate -v /etc/logrotate.conf





            share|improve this answer



























              1














              The problem got resolved after changing the permissions of /etc/logrotate.d/tomcat file.



              Before:



              $ ls -lht /etc/logrotate.d/tomcat
              -rwxr-xr-x 1 root root 308 Apr 25 2018 /etc/logrotate.d/tomcat


              After:



              $ sudo chmod -x /etc/logrotate.d/tomcat
              $ ls -lht /etc/logrotate.d/tomcat
              -rw-r--r-- 1 root root 308 Apr 25 2018 /etc/logrotate.d/tomcat


              Got to know about it after checking verbose of logrotate.



              $ /usr/sbin/logrotate -v /etc/logrotate.conf





              share|improve this answer

























                1












                1








                1







                The problem got resolved after changing the permissions of /etc/logrotate.d/tomcat file.



                Before:



                $ ls -lht /etc/logrotate.d/tomcat
                -rwxr-xr-x 1 root root 308 Apr 25 2018 /etc/logrotate.d/tomcat


                After:



                $ sudo chmod -x /etc/logrotate.d/tomcat
                $ ls -lht /etc/logrotate.d/tomcat
                -rw-r--r-- 1 root root 308 Apr 25 2018 /etc/logrotate.d/tomcat


                Got to know about it after checking verbose of logrotate.



                $ /usr/sbin/logrotate -v /etc/logrotate.conf





                share|improve this answer













                The problem got resolved after changing the permissions of /etc/logrotate.d/tomcat file.



                Before:



                $ ls -lht /etc/logrotate.d/tomcat
                -rwxr-xr-x 1 root root 308 Apr 25 2018 /etc/logrotate.d/tomcat


                After:



                $ sudo chmod -x /etc/logrotate.d/tomcat
                $ ls -lht /etc/logrotate.d/tomcat
                -rw-r--r-- 1 root root 308 Apr 25 2018 /etc/logrotate.d/tomcat


                Got to know about it after checking verbose of logrotate.



                $ /usr/sbin/logrotate -v /etc/logrotate.conf






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Feb 6 at 16:43









                pkgajulapallipkgajulapalli

                1266




                1266












                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Displaying single band from multi-band raster using QGIS

                    How many registers does an x86_64 CPU actually have?