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

Tomcat RequestProcessor errorCount - what counts as an error?

· 52CE 我爱测

We have a Zabbix server that reports on Tomcat's errorCount, from the GlobalRequestProcessor. I'm trying to figure out exactly what gets counted in this errorCount. Is it any request to Tomcat the results in an error? If so, how …

问题原文

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

We have a Zabbix server that reports on Tomcat's errorCount, from the GlobalRequestProcessor. I'm trying to figure out exactly what gets counted in this errorCount. Is it any request to Tomcat the results in an error? If so, how are these measured? Any request that results in an HTTP error response code (4xx/5xx)? Are there other conditions that would also affect errorCount that would not affect the HTTP response code?

Basically, if someone sees a chart showing that the error rate is increasing, what should they look at to see where the errors are coming from: Application logs? Tomcat logs? Apache web logs? Something else?

已采纳解答

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

Your hypothesis is correct: as the comment in the org.apache.coyote.RequestInfo class says:

// number of response codes >= 400
private int errorCount;

the errorCount is incremented for each request that results in a 4xx/5xx status code and nothing more. SSL handshake errors will not get counted, as reported in this question, since they don't create a request.

The 4xx/5xx errors will certainly leave a trace in the access log (localhost_access.log in the default config) and if the error was caused by an exception, it will probably find its way to catalina.<date>.log.

I don't know, which role plays Apache2 in your installation, but if it serves as reverse proxy it will mirror Tomcat's access log with some errors of its own.

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

资料来源与适用范围

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

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

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