On 04.07.24 15:27, Zerro wrote:
On 7/4/24 2:46 PM, Bryan Buchanan wrote:
I'm running Tomcat 9.0.14 on Centos 8 with JDK 15.

Tomcat is loaded in /opt/tomcat, the directory owned by "joe". If I
login as "joe" and start Tomcat, everything is fine.

We have people login to the Centos system to run the business
application as "mary", "jane", "fred" etc. Sometimes they want to
shutdown Tomcat, for example if they wish to load a price update to
the DBMS or whatever. To enable them to do this from within the
business application, I wrote a setuid() C program which sets the
effective user as "joe" and executes /opt/tomcat/bin/shutdown.sh or
/opt/tomcat/bin/startup.sh. This does startup Tomcat, but 10 minutes
later it dies. Nothing is logged that is unusual. These are the last
few lines when it dies:

If I understand you correctly, debugging why tomcat terminates probably
has nothing to do with the way that you start it (e.g. your C program).

Instead, to begin with, I'd start with utilizing software that has known
bugs fixed: Java 15 is unsupported since March 2021, Tomcat 9.0.14 was
released in December 2018 - 9.0.90 is current. There's simply no need to
hunt issues that somebody else might have found during the past many
years - plus, you might be interested in the security updates that came
in since then.

If the issue still appears on current versions, you can dive deeper and
likely have to debug your own application. It's hard to say where a
non-logged termination appears, but my first attempt of finding a low
hanging fruit would be to grep for System.exit. Sounds stupid, but the
probability to find this is greater than zero. (Don't ask 🫣)

Olaf



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to