Im trying to upgrade beanstalk version from "64bit Amazon Linux 2018.03 v3.4.0 running Tomcat 8.5 Java 8" to "64bit Amazon Linux 2 v4.1.2 running Tomcat 8.5 Corretto 8". I have my app deployed an running successfully on the new platform version (its a simple app - I dont have any ebextension scripts).
However Im missing the logs file "var/log/tomcat/catalina.out". Its missing and Im running blind!
Beanstalk Log Export Before Upgrade:
Beanstalk Log Export After Upgrade:
Comparing the beanstalk log exports its seems the log directory on an ec2 instance has changed from "var/log/tomcat8" to "var/log/tomcat" and "var/log/tomcat/catalina.out" is missing.
And tips or ideas much appreciated how to get back catalina.out file.
By default, the catalina. out file is located in the logs directory under Tomcat's root directory. For example, /opt/netiq/idm/apps/tomcat/logs/catalina.
Catalina. out simply contains everything that is written to Tomcat's "System. out" and "System.
Just in case someone stumbles upon the same issue. I conclude (assumption) that the missing catalina.out is due to the beanstalk platform upgrade which logging configuration is defined under "/usr/libexec/tomcat/server" & has no output redirection to catalina.out.
You can get back catalina.out with an .ebextension script:
.ebextensions cat catlina.config
files:
"/etc/rsyslog.d/catalina.conf":
mode: "0655"
owner: root
group: root
content: |
#redirect tomcat logs to /var/log/tomcat/catalina.out discarding timestamps since the messages already have them
template(name="catalinalog" type="string"
string="%msg%\n")
if $programname == 'server' then {
*.=warning;*.=err;*.=crit;*.=alert;*.=emerg /var/log/tomcat/catalina.out;catalinalog
*.=info;*.=notice /var/log/tomcat/catalina.out;catalinalog
}
commands:
restart_rsyslog:
command: systemctl restart rsyslog
Redeploy the app and you can see catalina.out under "/var/log/tomcat/"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With