Johann,

On 11/2/22 14:02, aon.913111...@aon.at wrote:
I have installed a Tomcat 9.0.68 now on a CentOS vm, following actual 
recommendations how to do this on CentOS (means on RHEL as well).

Following command,

find / -name catalina.sh

normally will be able to locate that core Tomcat shell script.
setenv.sh needs to be located in same directory.

No, it doesn't. It should be in CATALINA_BASE/bin. Please read the catalina.sh script for the meaning of CATALINA_BASE.

And don’t forget to apply

chmod -x setenv.sh

after you have created it!

(Assumed you have created the script as/or changed ownership to same user which 
is owner of all other files in the bin directory.)

And regarding my proposed debug statement to be inserted into setenv.sh: This 
has to be corrected to

echo "setenv.sh successfully loaded" > $CATALINA_HOME/logs/debug.txt

you may also want to include a timestamp so you know when that happened, and/or use ">>" to append to the log file instead of just overwriting it each time.

-chris

Von: Ivano Luberti
Gesendet: Mittwoch, 2. November 2022 14:08
An: users@tomcat.apache.org
Betreff: Re: setenv.sh not loaded

Tomcat ahas benne installed using yum

I cannot find any catalina.sh file on the system.

So I have to check with the sysadmin how  he configured tomcat.

Il 02/11/2022 13:46, Olaf Kock ha scritto:

On 02.11.22 12:43, Ivano Luberti wrote:
Hi, I have been given an Oracle Linux instance with tomcat 9.0.65
installed as a service.

Tomcat is running correctly

I have tried to create a setenv.sh file to tune the JVM, but using
the tomcat manager application and the catalina.log file it seems
that my java configuration is not loaded.

Any suggestion on how to debug this?

You're saying "installed as a service". This might mean that
tomcat/bin/catalina.sh is also never executed, or that it has been
altered from the default.

Ivano's suggestion is great already. On top, you might want to

* check how Tomcat is started by the system (e.g. does it go through
catalina.sh at all?)

* check if anything in its installation directory is altered from
default. Just inspect a diff between stock 9.0.65 and what you find in
your installation.

Olaf







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


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


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

Reply via email to