Tomcat view catalina.out log file

LinuxTomcat

Linux Problem Overview


In Red Hat,

cd /var/lib/tomcat
tail -f logs/catalina.out

I can see the log in the console.

In Ubuntu,

cd /var/lib/tomcat6
tail -f logs/catalina.out

Nothing show out in the console.

May I know what is the problem? Which configuration that I need to look to?

Linux Solutions


Solution 1 - Linux

Tomcat 7 Ubuntu Server 12.04 LTS:

tail -f /var/log/tomcat7/catalina.out

Solution 2 - Linux

locate catalina.out and find out where is your catalina out. Because it depends.

If there is several, look at their sizes: that with size 0 are not what you want.

Solution 3 - Linux

 cd /usr/local/tomcat/logs
 tail -f catalina.out

Solution 4 - Linux

Sometimes it is located in different places. It depends on the server. You can use find to find it:

 find / -name catalina.out 

If you encounter permission issues, add sudo to the command:

sudo find / -name catalina.out

That's all.

I hope this helps

Solution 5 - Linux

I found mine at

~/apache-tomcat-7.0.25/logs/catalina.out

Solution 6 - Linux

Try using this:

sudo tail -f /opt/tomcat/logs/catalina.out

Solution 7 - Linux

It works for me on Ubuntu...
cd var/lib/tomcat7
sudo nano logs/catalina.out

Solution 8 - Linux

I have used this command to check the logs and 10000 is used to show the number of lines

sudo tail  -10000f catalina.out

Solution 9 - Linux

Just logged in to the server and type below command

locate catalina.out

It will show all the locations where catalina file exist within this server.

Solution 10 - Linux

Just be aware also that catalina.out can be renamed - it can be set in /bin/catalina.sh with the CATALINA_OUT environment variable.

Solution 11 - Linux

If you are in the home directory first move to apache tomcat use below command

cd apache-tomcat/

then move to logs

cd logs/

then open the catelina.out use the below command

tail -f catalina.out

Solution 12 - Linux

If you type in the command line

catalina

you will see some message about it, look for this:

CATALINA_BASE: /usr/local/Cellar/tomcat/9.0.27/libexec

cd /usr/local/Cellar/tomcat/9.0.27/libexec/logs
tail -f catalina.out

You will then see the live logs.

NOTE: My Tomcat installation was done via Homebrew

Solution 13 - Linux

I found logs of Apache Tomcat/9.0.33 version in below path:

In tail -f /opt/tomcat/logs/catalina.out

Thanks.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionfslokeView Question on Stackoverflow
Solution 1 - Linuxfusion27View Answer on Stackoverflow
Solution 2 - LinuxAndrey RegentovView Answer on Stackoverflow
Solution 3 - LinuxHEATView Answer on Stackoverflow
Solution 4 - Linuxjfhfhf839View Answer on Stackoverflow
Solution 5 - LinuxRoger C S WernerssonView Answer on Stackoverflow
Solution 6 - Linuxfirdaus nandaView Answer on Stackoverflow
Solution 7 - LinuxLetItRockView Answer on Stackoverflow
Solution 8 - LinuxRahulView Answer on Stackoverflow
Solution 9 - LinuxNarendra KharelView Answer on Stackoverflow
Solution 10 - LinuxKory LovreView Answer on Stackoverflow
Solution 11 - LinuxChameera W. AshanView Answer on Stackoverflow
Solution 12 - LinuxMr TView Answer on Stackoverflow
Solution 13 - LinuxTushar BapteView Answer on Stackoverflow