大网数据广告活动
服务器运维问答

Tomcat localhost access log does not contain failed requests

· 52CE 我爱测

Default Tomcat 8.5 logs do not appear to show any failed requests, or anything about the SSL handshakes. Specifically the localhost log and catalina.out See this question for context about the type of failed request: Intermittent…

问题原文

原帖链接 · atlas_scoffed · CC BY-SA 4.0

Default Tomcat 8.5 logs do not appear to show any failed requests, or anything about the SSL handshakes. Specifically the localhost log and catalina.out

See this question for context about the type of failed request: Intermittent Curl 35 error when using self signed certificate on Tomcat

This question seems to indicate that it is not possible....? Tomcat access logs - are failed requests included?

I tried turning on debug, but still couldn't find anything related to a failed request.

已采纳解答

原帖链接 · Piotr P. Karwasz · CC BY-SA 4.0

If you want to log the connection details, you need to increase to log levels of loggers org.apache.coyote and org.apache.tomcat.util.net, by putting:

org.apache.tomcat.util.net.level = FINE
org.apache.coyote.level = FINE

in $CATALINA_BASE/conf/logging.properties and increasing the log level of some handler, e.g.:

java.util.logging.ConsoleHandler.level = FINE

whose messages eventually end up in catalina.out.

This requires a server restart. You should be able to do the same thing through JMX (e.g. jconsole), without a restart.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-01-20)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。