Reminder bug so I don't forget to add a force option to Tomcat's init script, both 5.5.x and 6.x. That way if Java is OOM, or if for some reason can't launch another instance of Java to connect to Tomcat via TCP/IP to tell it to shutdown.
Also the stop command might benefit from a --retry=60 or other delay for when it takes a while to properly shut down and stop webapps and etc.
Updated eerror info in gjl version check of 5.5 to mention the problem might be in Tomcat dependencies and to run java-check-environment. Helps resolve issues like 192787.
Also need to capture stderr/stdout in a better manner, that doesn't require s-s-d to keep running. Like that suggested in bug 162379 comment 5. Or as robbat2 suggested, to add System.setErr, System.setOut calls to Tomcat's initial startup. Which seems to be in Bootstrap.java. Not sure if it's set elsewhere during boot, but seems not per how catalina.sh starts Tomcat. Which is what the Gentoo Tomcat init scripts are based on.
Also need to remove classpath inheritance in init when initial classpath is set. Could lead to pollution from the global env if someone sets a global classpath or etc.
Reassigning to herd since wltjr has left Gentoo, bug #135927.
Added one of these improvements to both tomcat:5.5 and tomcat:6 in [java-experimental]
The other improvements are still valid and not implemented, in progress though.
In tomcat-6.0.26-r1, thanks.
Reopening as 5.5 was not fixed.
Actually I think all start/stop/restart is broken in the newer init scripts unless your using openrc which is not stabilized yet I don't believe. When you start, it does start, but init script things it did not. When you go to stop, you can't because it never successfully started, but a forcestop works. Kinda surprised there haven't been more comments as to such, must mean more people are running ~arch, not running Tomcat, or using older versions.
A hack might be to add if statement when not using openrc, like was done in previous init scripts, but towards the end. Just to return 0, so its recorded as started regardless of s-s-d output. Not sure why it starts but s-s-d or something things it did not. Now the hack won't necessarily help if it doesn't actually start. But not sure there are many instances or chances of that. Surely not with changes to classpath and other things to ensure Tomcat has a pristine env when starting.
A temp fix is to update to openrc
echo sys-apps/baselayout >> /etc/portage/package.keywords
echo sys-apps/openrc >> /etc/portage/package.keywords
Might need udev as well can't recall.
*** Bug 355493 has been marked as a duplicate of this bug. ***
(In reply to comment #9)
> A temp fix is to update to openrc
> echo sys-apps/baselayout >> /etc/portage/package.keywords
> echo sys-apps/openrc >> /etc/portage/package.keywords
> Might need udev as well can't recall.
Thank you! That help a lot.
In my case I have migrate two machines without problems. Looking for a other solution takes me 12 hours - migration take 0.5h per machine.
In addition I suggest to read the migration guide.
(In reply to comment #11)
I forgot: My suggestion for ebuild is to depend tomcat to openrc and baselayout-2. This would save a lot of time.
*** Bug 361235 has been marked as a duplicate of this bug. ***
I experienced this problem today and commited updated versions of the init script for Tomcat 6.x. It should now start OK even on a stable env without OpenRC (that's what I am running).
Please test and report.
Thank you for your work, but where we can found the fixed script?
Just re-emerge the latest version of Tomcat (stable).
Commited again some fixes (with the previous version Tomcat did not log to catalina.out anymore).
The reworked ebuilds went stable. See https://wiki.gentoo.org/wiki/Apache_Tomcat. This should be fixed. Please file a new bug if issues persist. Thanks for the report.