我有一个带有Apache 1.3(启用SSL)+ mod_jk + Tomcat 5.5的Linux Redhad设置的网站。最近,我的网站出现了停机问题。每天一次,我的网站在80端口上挂起。但是,如果我直接通过8080访问Tomcat响应,网站就可以正常工作。80和8080端口都可访问,但是Apache和Tomcat与mod_jk的连接已经断开。只有在重新启动Tomcat后,事情才会恢复正常。
我刚刚配置了Apache mod_Jk来记录错误,所以我将查看下一次挂起是否有任何错误。
Apache mod_js配置:
我检查了Tomcat上的Web应用程序错误/警告日志,发现有一些“内存不足”的Java异常。应用程序错误会导致此问题吗?这可能是网站超载问题或内存泄漏吗?目前
我还得到了这个日志条目,它与服务器挂起时间相匹配:
/var/log/messages: possible SYN flooding on port 8009. Sending cookies
更新: 我刚刚又遇到了一个故障,mod_jk日志显示如下:
[Sun Nov 14 00:57:03 2010] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (961): Can't receive the response message from tomcat, network problems or tomcat is$ [Sun Nov 14 00:57:03 2010] [error] ajp_get_reply::jk_ajp_common.c (1503): Tomcat is down or refused connection. No response has been sent to the client (yet) [Sun Nov 14 00:57:08 2010] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (961): Can't receive the response message from tomcat, network problems or tomcat is$ [Sun Nov 14 00:57:08 2010] [error] ajp_get_reply::jk_ajp_common.c (1503): Tomcat is down or refused connection. No response has been sent to the client (yet) [Sun Nov 14 00:57:12 2010] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (961): Can't receive the response message from tomcat, network problems or tomcat is$ [Sun Nov 14 00:57:12 2010] [error] ajp_get_reply::jk_ajp_common.c (1503): Tomcat is down or refused connection. No response has been sent to the client (yet) [Sun Nov 14 00:57:12 2010] [error] ajp_service::jk_ajp_common.c (1758): Error connecting to tomcat. Tomcat is probably not started or is listening on the wrong port. w$ [Sun Nov 14 00:57:12 2010] worker1 mydomain.com 50.999342
看起来我的网站在8009端口上挂了。AJP 1.3连接器在8009端口上提供Apache mod_jk。
非常感谢您的帮助和建议。
我刚刚配置了Apache mod_Jk来记录错误,所以我将查看下一次挂起是否有任何错误。
Apache mod_js配置:
JkShmSize 1000M
Apache工作进程配置:
worker.list=worker1
worker.worker1.type=ajp13
worker.worker1.host=127.0.0.1
worker.worker1.port=8009
worker.worker1.lbfactor=1
worker.worker1.socket_keepalive=1
worker.worker1.recycle_timeout=180
worker.worker1.sticky_session=False
我检查了Tomcat上的Web应用程序错误/警告日志,发现有一些“内存不足”的Java异常。应用程序错误会导致此问题吗?这可能是网站超载问题或内存泄漏吗?目前
dev/mapper/VolGroup00-LogVol00
只有4%的可用空间。这可能是问题的原因吗?我还得到了这个日志条目,它与服务器挂起时间相匹配:
/var/log/messages: possible SYN flooding on port 8009. Sending cookies
更新: 我刚刚又遇到了一个故障,mod_jk日志显示如下:
[Sun Nov 14 00:57:03 2010] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (961): Can't receive the response message from tomcat, network problems or tomcat is$ [Sun Nov 14 00:57:03 2010] [error] ajp_get_reply::jk_ajp_common.c (1503): Tomcat is down or refused connection. No response has been sent to the client (yet) [Sun Nov 14 00:57:08 2010] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (961): Can't receive the response message from tomcat, network problems or tomcat is$ [Sun Nov 14 00:57:08 2010] [error] ajp_get_reply::jk_ajp_common.c (1503): Tomcat is down or refused connection. No response has been sent to the client (yet) [Sun Nov 14 00:57:12 2010] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (961): Can't receive the response message from tomcat, network problems or tomcat is$ [Sun Nov 14 00:57:12 2010] [error] ajp_get_reply::jk_ajp_common.c (1503): Tomcat is down or refused connection. No response has been sent to the client (yet) [Sun Nov 14 00:57:12 2010] [error] ajp_service::jk_ajp_common.c (1758): Error connecting to tomcat. Tomcat is probably not started or is listening on the wrong port. w$ [Sun Nov 14 00:57:12 2010] worker1 mydomain.com 50.999342
看起来我的网站在8009端口上挂了。AJP 1.3连接器在8009端口上提供Apache mod_jk。
非常感谢您的帮助和建议。