简体   繁体   中英

console output for tomcat 8 server on linux

I have been trying all day, searching on stackoverflow, serverfault, etc, but I can't find out how I can access the console output (stdout, stderr) from my tomcat 8 server

I have checked, but there is no catalina.out, stdout.log or stderr.log file in $CATALINA_HOME/logs

Can anyone help me?

Look for the process ID of the java process running Tomcat, then look into /proc/<pid>/fd - there should be symbolic links to files and sockets open by that process. Specifically, look for symbolic links named 1 and 2, these two represent stdout and stderr .

$ pgrep -fl java | grep -i tomcat

Using Deryck's technique, I found out that the log file was stored in /var/log/upstart/tomcat.log

Even though after the fact it seems like a reasonable place to find that file, I know that given my lack of experience I would have never found it without using find on the whole filesystem. Thanks Deryck, you're a live saver!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM