cancel
Showing results for 
Search instead for 
Did you mean: 
JohnAdams
Flight Engineer
Flight Engineer
  • 1,601 Views

logrotate falsely claims "log does not exist -- skipping"

Jump to solution

Hi, folks,

     This is a real puzzler. The logrotate command is falsely claiming that my log files don't exist and thus is not rotating them. Here's my config file from /etc/logrotate.d:

{

su tomcat tomcat

daily

rotate 30

compress

notifempty

missingok

copytruncate

}

     And here's what happens when I run logrotate -f -v <config file>

[root@degreeworksapp3 log]# logrotate -f -v /etc/logrotate.d/degreeworks

reading config file /etc/logrotate.d/degreeworks

Reading state from file: /var/lib/logrotate/logrotate.status

Allocating hash table for state file, size 64 entries

Creating new state

Creating new state

Creating new state

Creating new state

Creating new state

Creating new state

Creating new state

Creating new state

Creating new state

Creating new state

Creating new state

Creating new state

Creating new state

Creating new state

Creating new state

Creating new state

Creating new state

Creating new state

Creating new state

Creating new state

Creating new state

Creating new state

Creating new state

Creating new state

Creating new state

 

Handling 1 logs

 

rotating pattern: /u01/app/tomcat/dwtest/degreeworks/logs/catalina.out

/u01/app/tomcat/dwtest/degreeworks/logs/localhost.log

/u01/app/tomcat/dwtest/degreeworks/logs/StudentPlanner.log

 forced from command line (30 rotations)

empty log files are not rotated, old logs are removed

switching euid to 91 and egid to 91

considering log /u01/app/tomcat/dwtest/degreeworks/logs/catalina.out

  log /u01/app/tomcat/dwtest/degreeworks/logs/catalina.out does not exist -- skipping

considering log /u01/app/tomcat/dwtest/degreeworks/logs/localhost.log

  log /u01/app/tomcat/dwtest/degreeworks/logs/localhost.log does not exist -- skipping

considering log /u01/app/tomcat/dwtest/degreeworks/logs/StudentPlanner.log

  log /u01/app/tomcat/dwtest/degreeworks/logs/StudentPlanner.log does not exist -- skipping

switching euid to 0 and egid to 0

set default create context to system_u:object_r:logrotate_var_lib_t:s0

     But those files certainly do exist:

[root@degreeworksapp3 log]# find / -type f -ls | egrep -i "(catalina|localhost|StudentPlanner).(out|log)$"

 104670524  193300 -rw-r-----   1  tomcat             tomcat                   197932510 May 10 13:59 /u01/app/tomcat/dwprod/degreeworks/logs/catalina.out

 107747857    1236 -rw-r-----   1  tomcat             tomcat                     1261149 May 10 03:13 /u01/app/tomcat/dwprod/degreeworks/logs/localhost.log

 107747866   86704 -rw-r-----   1  tomcat             tomcat                    88777058 May 10 13:59 /u01/app/tomcat/dwprod/degreeworks/logs/StudentPlanner.log

     Your thoughts?

Thanks,

     John A

0 Kudos
1 Solution

Accepted Solutions
ipalagin
Flight Engineer Flight Engineer
Flight Engineer
  • 1,590 Views

Hi,

logrotate says the files don't exist in /dwtest/, while "find" locates them in /dwprod/.

Regards,

Ilya.

View solution in original post

2 Replies
ipalagin
Flight Engineer Flight Engineer
Flight Engineer
  • 1,591 Views

Hi,

logrotate says the files don't exist in /dwtest/, while "find" locates them in /dwprod/.

Regards,

Ilya.

JohnAdams
Flight Engineer
Flight Engineer
  • 1,559 Views

How embarrassing! Thanks!

0 Kudos
Join the discussion
You must log in to join this conversation.