Bug#427948: tomcat5

Maarten van der Hoef maarten at cyso.nl
Thu Jun 7 14:50:00 UTC 2007


Package: tomcat5
Version: 5.0.30-12	
Desc: /etc/init.d/tomcat5 line 126..

=====================================================================

The problem:

/etc/init.d/tomcat5 does not start if too many files 
reside in $CATALINA_BASE/tomcat/temp/ as the 
"rm -rf command goes beyond ARG_MAX."

rm -rf "$CATALINA_BASE"/temp/* \
  "$CATALINA_BASE/logs/catalina.out"

# /etc/init.d/tomcat5-server14.example.com start
Starting Tomcat 5 servlet engine using Java from /usr/lib/j2sdk1.4-sun: 
/etc/init.d/tomcat5-server14.example.com: line 127: /bin/rm: Argument
list too long
#

=====================================================================

I suggest the usage of the find.

find $CATALINA_BASE/tomcat/temp/ -name '*.tmp' -print0 | xargs -0 rm
find $CATALINA_BASE/tomcat/temp/ -exec rm -rf {} \;

=====================================================================

sh --version
GNU bash, version 3.1.17(1)-release (i486-pc-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.

getconf ARG_MAX
131072

uname -a
Linux example11.example.example.net 2.6.21.3pe860 #1 SMP Fri May 25
12:25:35 CEST 2007 i686 GNU/Linux

=====================================================================

Kind regards,

Maarten




More information about the pkg-java-maintainers mailing list