I am putting together a custom Debian distribution which contains Tomcat, Sun JVM and a few other things.
The purpose of this distro is to make it easy to add Tomcat based applications to the distribution and have them automatically installed by tasksel during the "baseconfig new" invocation which is part of the install process. This thing would be deployed by others off-site. Tomcat and any custom stuff on top of it need to already be running after baseconfig new is finished. I've accomplished this by setting Priority: standard on any packages which must be installed by baseconfig for the product to be considered whole. So far everything works great except for one thing, tomcat won't start when it is installed during baseconfig new. It says it starts, and it even generates some log information. But sometime after startup the logs simply end abruptly, and there is not sign of a java process running anywhere. I can manually get it to work a number of ways. After installing, I can log in as root and run /etc/init.d/tomcat5 start, and it stays running. Before baseconfig runs, (pick recovery mode from grub menu after first reboot) I can apt-cdrom add; apt-get install tomcat5. Tomcat works fine. Now here's the real oddness: Before baseconfig runs I can dpkg-divert the catalina.sh script and install a custom one. In this custom script the raw java invocation which starts tomcat is not backgrounded. My purpose in trying this was that the shell would wait on the dying process, giving me more information, like an exit value and maybe even a signal name. And wouldn't you know it, if I don't background java, it lives. @[EMAIL PROTECTED]@!!! Instead of dying, it hung up the postinst, even when installed under baseconfig. I've tried a number of things to diagnose what is happening here. I've compared the environments of the failing and successful catalina scripts near the java invocation. While there are differences, I have never been able to duplicate the process death by manipulating the environment. I've looked at the output of the tty command in the successful and failing situation. They are the same, "not a tty". I've compared set -o, reams of strace output, etc. No smoking gun anywhere. The only way I can make this process die: * Install tomcat under base-config/tasksel. * The java invocation must be backgrounded with "&" It is running under kernel-2.6.8-2-386, version 2.6.8-16sarge1. The JVM is sun-j2sdk1.5 produced by make-jpkg from sarge. Tomcat is pulled from etch 5.0.30-10, all deps pulled from sarge if possible. I'm really in need of help here. I'll be happy to elaborate on anything I've said here. -- Darrin -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

