APM Java Agent - manual setup

I'm not sure about it, but where did you created the setenv.sh file ? Is it in $CATALINA_BASE/bin/setenv.sh or $CATALINA_HOME/bin/setenv.sh

org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /var/lib/tomcat9
org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /usr/share/tomcat9