You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2020/05/13 14:30:12 UTC

[Bug 64430] New: rotating catalina.out (using named pipe)

https://bz.apache.org/bugzilla/show_bug.cgi?id=64430

            Bug ID: 64430
           Summary: rotating catalina.out (using named pipe)
           Product: Tomcat 8
           Version: 8.5.54
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: harald.dunkel@aixigo.de
  Target Milestone: ----

Created attachment 37239
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37239&action=edit
patch for catalina.sh

AFAICS the code in catalina.sh to rotate catalina.out has been withdrawn with
5.8.39. #53930

Changing the system's logrotate.conf to rotate catalina.out requires root
permission. This might be not an option in some cases. 

I would like to suggest a new approach to rotate catalina.out. See attached
patch. The idea is to define CATALINA_OUT_CMD (as for 8.5.38), but this time
catalina.sh creates a named pipe on the fly, to be used instead of a plain file
"catalina.sh". The code about catalina's PID is not changed, i.e. the systemd
users should be happy with the new version.

The default behavior of catalina.sh hasn't been changed (hopefully). 

Just a suggestion, of course. Keep on your good work

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64430] rotating catalina.out (using named pipe)

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64430

--- Comment #4 from harald.dunkel@aixigo.de ---
Created attachment 37242
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37242&action=edit
even better patch

Good suggestion. I highly appreciate your effort to keep portability.

Attached is a new patch, using mkfifo. The comment about CATALINA_OUT_CMD and
the indentation style have been adjusted, too.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64430] rotating catalina.out (using named pipe)

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64430

--- Comment #1 from harald.dunkel@aixigo.de ---
Created attachment 37240
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37240&action=edit
better patch

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64430] rotating catalina.out (using named pipe)

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64430

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #6 from Mark Thomas <ma...@apache.org> ---
Thanks for the patch.

Fixed in:
- master for 10.0.0-M6 onwards
- 9.0.x for 9.0.36 onwards
- 8.5.x for 8.5.56 onwards
- 7.0.x for 7.0.105 onwards

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64430] rotating catalina.out (using named pipe)

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64430

--- Comment #2 from harald.dunkel@aixigo.de ---
Please ignore the first patch. I picked the right file from the wrong
directory.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64430] rotating catalina.out (using named pipe)

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64430

--- Comment #5 from Mark Thomas <ma...@apache.org> ---
I like the modified approach. I'll run some tests locally and if all is well,
I'll apply this for the next release round.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64430] rotating catalina.out (using named pipe)

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64430

--- Comment #3 from Michael Osipov <mi...@apache.org> ---
The shell script has to be portable, "mknod -p" is not portable. This will
require cases for various Unix systems. What about fifo with mkfifo?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org