Where does Elastic Beanstalk store log output from Tomcat on each EC2 instance?
I've configured SSH and want to tail the log file, but don't know where it's located.
Where does Elastic Beanstalk store log output from Tomcat on each EC2 instance?
I've configured SSH and want to tail the log file, but don't know where it's located.
Something seems to have changed a bit on this, as I have a new Elastic Beanstalk application where the logs are located in:
/var/log/tomcat7/
Note that the easiest way to view stuff in here is to sudo su
first, as this directory is owned by root. Whereas, I have an older instance where the logs are in:
/opt/tomcat7/logs/
I'm not sure why there is a disparity in this, as both applications use the tomcat7 container, but this seems to be the state of things to date.
By default, AWS Elastic Beanstalk log output from Tomcat is written to /opt/tomcat7/logs/tail_catalina.out
. (depends on Tomcat version)
These log messages are written by java.util.logging
configured in Tomcat from /opt/tomcat7/conf
.
edit: this was changed in late 2012 and now applies only to "Legacy" containers.
if you are working on Tomcat7 the you can ind your log at
/var/log/tomcat7
if you are working on tomcat8 then you can find here
/var/log/tomcat8
as of March 10, 2014, Tomcat 7 versions of Beanstalk log to /var/log/httpd for Apache and /var/log/tomcat7 for Tomcat logs.
-rw-rw---- 1 tomcat tomcat 12444 Mar 10 18:28 catalina.out
-rw-r--r-- 1 tomcat tomcat 13664 Mar 10 18:28 localhost_access_log.txt
-rw-r--r-- 1 tomcat tomcat 0 Feb 6 16:42 tomcat7-initd.log
They are stored in S3 server under the bucket name elasticbeanstalk-us-east-1(region name)-(appno)..
Logs are stored in folders that are organized based on the beanstalk environment name and the directory name would be the ec2-instance's id, that generated the tomcat logs.