mod_jk 记录错误但用户没有报告任何错误

mod_jk 记录错误但用户没有报告任何错误

我们有一台 Apache 服务器,将下载请求负载均衡到两台不同的服务器。mod_jk 错误日志中充满了以下类型的错误

[Mon Feb 13 16:59:02.948 2012] [19453:139726932305664] [error] ajp_process_callback::jk_ajp_common.c (1800): ajp_unmarshal_response failed
[Mon Feb 13 16:59:02.948 2012] [19453:139726932305664] [info] ajp_service::jk_ajp_common.c (2540): (mrxdf3) sending request to tomcat failed (recoverable), because of server error (attempt=1)
[Mon Feb 13 16:59:03.048 2012] [19453:139726932305664] [info] ajp_send_request::jk_ajp_common.c (1490): (mrxdf3) did not receive END_RESPONSE, closing socket -1
[Mon Feb 13 16:59:03.054 2012] [19453:139726932305664] [error] ajp_unmarshal_response::jk_ajp_common.c (646): NULL status
[Mon Feb 13 16:59:03.054 2012] [19453:139726932305664] [error] ajp_process_callback::jk_ajp_common.c (1800): ajp_unmarshal_response failed
[Mon Feb 13 16:59:03.054 2012] [19453:139726932305664] [info] ajp_service::jk_ajp_common.c (2540): (mrxdf3) sending request to tomcat failed (recoverable), because of server error (attempt=2)
[Mon Feb 13 16:59:03.054 2012] [19453:139726932305664] [error] ajp_service::jk_ajp_common.c (2559): (mrxdf3) connecting to tomcat failed.
[Mon Feb 13 16:59:03.054 2012] [19453:139726932305664] [info] service::jk_lb_worker.c (1388): service failed, worker mrxdf3 is in error state
[Mon Feb 13 16:59:03.159 2012] [19453:139726932305664] [error] ajp_unmarshal_response::jk_ajp_common.c (646): NULL status
[Mon Feb 13 16:59:03.159 2012] [19453:139726932305664] [error] ajp_process_callback::jk_ajp_common.c (1800): ajp_unmarshal_response failed
[Mon Feb 13 16:59:03.159 2012] [19453:139726932305664] [info] ajp_service::jk_ajp_common.c (2540): (mrxdf2) sending request to tomcat failed (recoverable), because of server error (attempt=1)
[Mon Feb 13 16:59:03.259 2012] [19453:139726932305664] [info] ajp_send_request::jk_ajp_common.c (1490): (mrxdf2) did not receive END_RESPONSE, closing socket -1
[Mon Feb 13 16:59:03.263 2012] [19453:139726932305664] [error] ajp_unmarshal_response::jk_ajp_common.c (646): NULL status
[Mon Feb 13 16:59:03.264 2012] [19453:139726932305664] [error] ajp_process_callback::jk_ajp_common.c (1800): ajp_unmarshal_response failed
[Mon Feb 13 16:59:03.264 2012] [19453:139726932305664] [info] ajp_service::jk_ajp_common.c (2540): (mrxdf2) sending request to tomcat failed (recoverable), because of server error (attempt=2)
[Mon Feb 13 16:59:03.264 2012] [19453:139726932305664] [error] ajp_service::jk_ajp_common.c (2559): (mrxdf2) connecting to tomcat failed.
[Mon Feb 13 16:59:03.264 2012] [19453:139726932305664] [info] service::jk_lb_worker.c (1388): service failed, worker mrxdf2 is in local error state
[Mon Feb 13 16:59:03.264 2012] [19453:139726932305664] [info] service::jk_lb_worker.c (1457): All tomcat instances failed, no more workers left (attempt=1, retry=1)
[Mon Feb 13 16:59:03.264 2012] [19453:139726932305664] [info] service::jk_lb_worker.c (1468): All tomcat instances are busy or in error state
[Mon Feb 13 16:59:03.264 2012] [19453:139726932305664] [error] service::jk_lb_worker.c (1473): All tomcat instances failed, no more workers left
[Mon Feb 13 16:59:03.264 2012] [19453:139726932305664] [info] jk_handler::mod_jk.c (2618): Service error=0 for worker=lb_df_ajp13

我们监控状态并有点担心各个服务器从正常变为错误、再从正常变为错误.....

问题是,我们唯一能想到的错误迹象就是这个。没有报告说发生了实际错误。用户没有报告下载中断或无法访问服务器的情况。

这是 mod_jk 配置

# Minimal jk configuration
JkWorkerProperty worker.list=ajp13,api_ajp13,app_ajp13,status_ajp13,lb_df_ajp13

# web server
JkWorkerProperty worker.ajp13.type=ajp13
JkWorkerProperty worker.ajp13.host=web0.live.mbuyu.nl
JkWorkerProperty worker.ajp13.port=8009

# app
JkWorkerProperty worker.app_ajp13.type=ajp13
JkWorkerProperty worker.app_ajp13.host=app0.live.mbuyu.nl
JkWorkerProperty worker.app_ajp13.port=8009

# api server
JkWorkerProperty worker.api_ajp13.type=ajp13
JkWorkerProperty worker.api_ajp13.host=api0.live.mbuyu.nl
JkWorkerProperty worker.api_ajp13.port=8009

# DF Node0
JkWorkerProperty worker.mrxdf2.type=ajp13
JkWorkerProperty worker.mrxdf2.host=df2.live.mbuyu.nl
JkWorkerProperty worker.mrxdf2.port=8009
JkWorkerProperty worker.mrxdf2.lbfactor=1
# DF Node1
JkWorkerProperty worker.mrxdf3.type=ajp13
JkWorkerProperty worker.mrxdf3.host=df3.live.mbuyu.nl
JkWorkerProperty worker.mrxdf3.port=8009
JkWorkerProperty worker.mrxdf3.lbfactor=1

# JK Status worker
JkWorkerProperty worker.status_ajp13.type=status

# Load-balancer
JkWorkerProperty worker.lb_df_ajp13.type=lb
JkWorkerProperty worker.lb_df_ajp13.balanced_workers=mrxdf2,mrxdf3
JkWorkerProperty worker.lb_df_ajp13.sticky_session=1
JkWorkerProperty worker.lb_df_ajp13.local_worker_only=1

我们应该担心吗?我们能摆脱这种情况吗?

mod_jk 版本 = 1.2.30 apache 2.2.16 下载服务器运行 JBoss 6.1。

顺便说一句,我其实是个开发人员,不是系统管理员,但偶尔有人会要求我提供这方面的帮助。在这种情况下,系统管理员当然想知道应用程序出了什么问题。我只能说,无论是内部还是外部,我都找不到任何解决办法。我们现在处于非常不利的境地,因为我们认为实际上什么都没有出错,所以忽略了错误警告。

答案1

我不清楚你的问题到底是什么,但你应该:

1/ 在配置文件中设置超时http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html

2/ 如果尚未完成,请记录或绘制 ajp 连接池。您可以使用 jmx 控制台或 snmp 从 jboss 获取 ajp 线程和 ajp 连接的值https://community.jboss.org/wiki/JBossSNMPAdapter

相关内容