The rc.d script provided by the www/tomcat6 port don't work as expected. It starts alright, but it's not able to stop the java process. Using: diablo-jdk-1.6.0.07.02_6 tomcat-6.0.20_1 How-To-Repeat: How to repeat: Install tomcat6 from ports, and add tomcat60_enable="YES" to rc.conf. tomcat# /usr/local/etc/rc.d/tomcat6 start Starting tomcat60. tomcat# /usr/local/etc/rc.d/tomcat6 stop tomcat60 not running? (check /var/run/tomcat60.pid). tomcat# ps waux | grep java www 1681 0.0 1.0 1247408 80528 ?? IsJ 1:25PM 0:02.52 /usr/local/diablo-jdk1.6.0/bin/java -Djava.endorsed.dirs=/usr/local/apache-tomcat-6.0/endorsed -classpath /usr/local/ap
Responsible Changed From-To: freebsd-bugs->nemoliu Make this a ports PR, fix synopsis, and assign.
Patch attached to fix /usr/local/etc/rc.d/tomcat6 -- Roger Gujord
2009/12/2 Roger Gujord <roger@gujord.com>: > Patch attached to fix /usr/local/etc/rc.d/tomcat6 > -- Still no go, I'm afraid -- chs,
New patch attached. -- Roger Gujord
On Wed, Dec 2, 2009 at 7:55 PM, Roger Gujord <roger@gujord.com> wrote: > New patch attached. I still get tomcat60 not running? (check /var/run/tomcat60.pid) But why not use tomcats own shutdown.sh (and startup.sh) instead of killing the pid the most fantastic way :) (using tomcat6s own startup.sh and shutdown.sh works) -- chs,
Sorry... the latest patch is just some rubbish and will most likely not = help at all. You may also want to put the following in your /etc/rc.conf: tomcat60_enable=3D"YES" tomcat60_user=3D"www" tomcat60_java_version=3D"1.6" Check that your /var/run/tomcat6.pid has the correct ownership and that = your tomcat user can read and write to it. The chmod changes (as in the first patch) in /usr/local/etc/rc.d/tomcat6 = solved the problem for me. -- Roger Gujord=
On Wed, Dec 2, 2009 at 8:28 PM, Roger Gujord <roger@gujord.com> wrote: > Sorry... the latest patch is just some rubbish and will most likely not help at all. > > You may also want to put the following in your /etc/rc.conf: > > tomcat60_enable="YES" > tomcat60_user="www" > tomcat60_java_version="1.6" > > Check that your /var/run/tomcat6.pid has the correct ownership and that your tomcat user can read and write to it. > > The chmod changes (as in the first patch) in /usr/local/etc/rc.d/tomcat6 solved the problem for me. > But not for me :( tomcat# /usr/local/etc/rc.d/tomcat6 start Starting tomcat60. tomcat# /usr/local/etc/rc.d/tomcat6 stop tomcat60 not running? (check /var/run/tomcat60.pid). tomcat# ls -la /var/run/tomcat60.pid -rw-r--r-- 1 www wheel 5 Dec 2 20:34 /var/run/tomcat60.pid tomcat# cat /var/run/tomcat60.pid 39953 tomcat# ps aux | grep tom www 39953 0.0 0.9 1421152 72240 ?? IsJ 8:34PM 0:02.06 /usr/local/diablo-jdk1.6.0/bin/java -XX:MaxPermSize=256m -Djava.endorsed.dirs=/usr/local/apache-tomcat-6.0/endorsed -cl -- chs,
The attached patch should solve the problem. Thank you in advance for testing and reporting back :-) -- Roger Gujord
On Wed, Dec 2, 2009 at 11:32 PM, Roger Gujord <roger@gujord.com> wrote: > The attached patch should solve the problem. > Thank you in advance for testing and reporting back :-) I was unable to use that patch. tomcat# patch -p0 < patch Hmm... Looks like a new-style context diff to me... The text leading up to this was: -------------------------- |*** ../tomcat6 2009-12-02 13:08:51.000000000 +0000 |--- tomcat6 2009-12-02 22:20:57.000000000 +0000 -------------------------- Patching file tomcat6 using Plan A... Hunk #1 failed at 116. 1 out of 1 hunks failed--saving rejects to tomcat6.rej Hmm... Ignoring the trailing garbage. done -- chs,
Make sure you patch against the clean orginal file. Attached you'll find my "/usr/local/etc/rc.d/tomcat6" file with the patched already applied. Thanks again for testing :-)
On Thu, Dec 3, 2009 at 12:27 AM, Roger Gujord <roger@gujord.com> wrote: > Make sure you patch against the clean orginal file. > Attached you'll find my "/usr/local/etc/rc.d/tomcat6" file with the patched already applied. > Thanks again for testing :-) > Much better, this one works! :) Thanks for your time. -- chs
Responsible Changed From-To: nemoliu->freebsd-ports-bus Maintainer was reset due to inactivity.
Responsible Changed From-To: freebsd-ports-bus->freebsd-ports-bugs Don't laugh, the new keyboard is on order.
Responsible Changed From-To: freebsd-ports-bugs->ale Over to new maintainer.
Use the original rc script and set rc_debug="YES". Then report to me the output of the stop command. -- Alex Dupre
On Thu, Dec 17, 2009 at 11:16 AM, Alex Dupre <ale@freebsd.org> wrote: > Use the original rc script and set rc_debug="YES". Then report to me the > output of the stop command. > /usr/local/etc/rc.d/tomcat6: DEBUG: checkyesno: tomcat60_enable is set to YES. /usr/local/etc/rc.d/tomcat6: DEBUG: run_rc_command: start_precmd: pid_touch Starting tomcat60. /usr/local/etc/rc.d/tomcat6: DEBUG: run_rc_command: doit: su -m www -c 'sh -c "/usr/sbin/daemon -p /var/run/tomcat60.pid /usr/local/bin/java -Djava.endorsed.dirs=/usr/local/apache-tomcat-6.0/endorsed -classpath /usr/local/apache-tomcat-6.0/bin/bootstrap.jar: -Dcatalina.base=/usr/local/apache-tomcat-6.0 -Dcatalina.home=/usr/local/apache-tomcat-6.0 -Djava.io.tmpdir=/usr/local/apache-tomcat-6.0/temp org.apache.catalina.startup.Bootstrap start >> /usr/local/apache-tomcat-6.0/logs/stdout.log 2>> /usr/local/apache-tomcat-6.0/logs/stderr.log "' tomcat# ps waux | grep java www 34257 54.9 0.8 1421152 69292 ?? SsJ 12:29PM 0:02.12 /usr/local/diablo-jdk1.6.0/bin/java -XX:MaxPermSize=256m -Djava.endorsed.dirs=/usr/local/apache-tomcat-6.0/endorsed -classpath /usr/local/apach root 34345 0.0 0.0 8004 1092 7 RL+J 12:29PM 0:00.00 grep java tomcat# /usr/local/etc/rc.d/tomcat6 stop /usr/local/etc/rc.d/tomcat6: DEBUG: checkyesno: tomcat60_enable is set to YES. /usr/local/etc/rc.d/tomcat6: DEBUG: run_rc_command: doit: tomcat60_stop tomcat60 not running? (check /var/run/tomcat60.pid). cat /var/run/tomcat60.pid 34257 -- chs,
/usr/local/etc/rc.d/tomcat6: ... procname="java" ... tomcat60_stop() { rc_pid=$(check_pidfile $pidfile $procname) ... The command "check_pidfile" (from /etc/rc.subr) doesn't find "java" in the list of processes. If I change procname="java" to procname="/usr/local/diablo-jdk1.6.0/bin/java" the script shuts tomcat down as expected. Sure, no solution, but I hope this helps to solve this nasty problem. The pidfile with it's permissions seems fine anyway. Eric
Anyone up for commiting the patch?
ale 2010-03-01 15:36:47 UTC FreeBSD ports repository Modified files: www/tomcat6 Makefile distinfo www/tomcat6/files tomcat6.sh.in Log: - Update to 6.0.24 release [1] - Fix rc.d stop script [2] PR: ports/144274 [1], ports/140015 [2] Submitted by: wen [1], Christer Solskogen <christer.solskogen@gmail.com> [2] Feature safe: yes Revision Changes Path 1.55 +1 -2 ports/www/tomcat6/Makefile 1.26 +3 -3 ports/www/tomcat6/distinfo 1.6 +27 -9 ports/www/tomcat6/files/tomcat6.sh.in _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
State Changed From-To: open->closed Should be fixed now.