Apache JK Tomcat 集群问题

这几天被集群并发问题快折腾死了,望哪位高人看下到底是哪里出现了问题。
Apache Server是正常的,各服务器的Tomcat 也是正常的,但当Apache的连接数达到 300左右的时候,JK就会出现如下的异常信息,然后整个系统就崩溃了,这些都是通过JK访问的,就无法打开了。但是各分服务器访问还是正常的。 如果把Apache重启后,访问速度又很顺畅了。所以现在初步判定是 Jk的问题。

JK work.properties的配置如下:

Set the tomcat1 for the Server

worker.list=loadbalancer,status,tomcat1,tomcat6,tomcat7
worker.tomcat1.port=8009
worker.tomcat1.host=localhost
worker.tomcat1.type=ajp13
worker.tomcat1.lbfactor=2

Set the tomcat2

worker.tomcat2.port=8009

worker.tomcat2.host=192.168.1.203

worker.tomcat2.type=ajp13

worker.tomcat2.lbfactor=1

worker.loadbalancer.type=lb

worker.loadbalancer.balance_workers=tomcat2

Set the tomcat5 for the Front

worker.tomcat5.port=9009
worker.tomcat5.host=localhost
worker.tomcat5.type=ajp13
worker.tomcat5.lbfactor=1

Set the tomcat6 for the Cluster

worker.tomcat6.port=8009
worker.tomcat6.host=110.121.211.205
worker.tomcat6.type=ajp13
worker.tomcat6.lbfactor=1

Set the tomcat7 for the Cluster

worker.tomcat7.port=7009
worker.tomcat7.host=110.144.0.154
worker.tomcat7.type=ajp13
worker.tomcat7.lbfactor=1

worker.loadbalancer.type=lb
worker.lb_s.retries=3
worker.recovery_options=3
worker.loadbalancer.balance_workers=tomcat1,tomcat7,tomcat6

worker.status.type=status

[Thu Apr 30 14:43:29 2015] [26545:14544] [info] service::jk_lb_worker.c (1098): service failed, worker tomcat1 is in error state
[Thu Apr 30 14:43:29 2015] [26586:14544] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (951): (tomcatTaohandan) can‘t receive the response message from tomcat, network problems or tomcat (10.144.211.205:8009) is down (errno=104)
[Thu Apr 30 14:43:29 2015] [26586:14544] [error] ajp_get_reply::jk_ajp_common.c (1592): (tomcatTaohandan) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Thu Apr 30 14:43:29 2015] [26586:14544] [info] ajp_service::jk_ajp_common.c (1902): (tomcatTaohandan) receiving from tomcat failed, recoverable operation attempt=0
[Thu Apr 30 14:43:29 2015] [26586:14544] [info] ajp_service::jk_ajp_common.c (1941): (tomcatTaohandan) sending request to tomcat failed, recoverable operation attempt=1
[Thu Apr 30 14:43:30 2015] [26769:14544] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (951): (tomcatTaohandan) can‘t receive the response message from tomcat, network problems or tomcat (10.144.211.205:8009) is down (errno=104)
[Thu Apr 30 14:43:30 2015] [26769:14544] [error] ajp_get_reply::jk_ajp_common.c (1592): (tomcatTaohandan) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Thu Apr 30 14:43:30 2015] [26769:14544] [info] ajp_service::jk_ajp_common.c (1902): (tomcatTaohandan) receiving from tomcat failed, recoverable operation attempt=1
[Thu Apr 30 14:43:30 2015] [26769:14544] [info] ajp_service::jk_ajp_common.c (1941): (tomcatTaohandan) sending request to tomcat failed, recoverable operation attempt=2
[Thu Apr 30 14:43:30 2015] [26769:14544] [error] ajp_service::jk_ajp_common.c (1953): (tomcatTaohandan) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
[Thu Apr 30 14:43:30 2015] [26769:14544] [info] service::jk_lb_worker.c (1098): service failed, worker tomcatTaohandan is in error state
[Thu Apr 30 14:43:31 2015] [26620:14544] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (951): (tomcat1) can‘t receive the response message from tomcat, network problems or tomcat (127.0.0.1:8009) is down (errno=104)
[Thu Apr 30 14:43:31 2015] [26620:14544] [error] ajp_get_reply::jk_ajp_common.c (1592): (tomcat1) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Thu Apr 30 14:43:31 2015] [26620:14544] [info] ajp_service::jk_ajp_common.c (1902): (tomcat1) receiving from tomcat failed, recoverable operation attempt=0
[Thu Apr 30 14:43:31 2015] [26620:14544] [info] ajp_service::jk_ajp_common.c (1941): (tomcat1) sending request to tomcat failed, recoverable operation attempt=1
[Thu Apr 30 14:43:31 2015] [26618:14544] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (951): (tomcatTaohandan) can‘t receive the response message from tomcat, network problems or tomcat (10.144.211.205:8009) is down (errno=104)
[Thu Apr 30 14:43:31 2015] [26618:14544] [error] ajp_get_reply::jk_ajp_common.c (1592): (tomcatTaohandan) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Thu Apr 30 14:43:31 2015] [26618:14544] [info] ajp_service::jk_ajp_common.c (1902): (tomcatTaohandan) receiving from tomcat failed, recoverable operation attempt=0
[Thu Apr 30 14:43:31 2015] [26618:14544] [info] ajp_service::jk_ajp_common.c (1941): (tomcatTaohandan) sending request to tomcat failed, recoverable operation attempt=1
[Thu Apr 30 14:43:32 2015] [26770:14544] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (951): (tomcatTaohandan) can‘t receive the response message from tomcat, network problems or tomcat (10.144.211.205:8009) is down (errno=104)
[Thu Apr 30 14:43:32 2015] [26770:14544] [error] ajp_get_reply::jk_ajp_common.c (1592): (tomcatTaohandan) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Thu Apr 30 14:43:32 2015] [26770:14544] [info] ajp_service::jk_ajp_common.c (1902): (tomcatTaohandan) receiving from tomcat failed, recoverable operation attempt=1
[Thu Apr 30 14:43:32 2015] [26770:14544] [info] ajp_service::jk_ajp_common.c (1941): (tomcatTaohandan) sending request to tomcat failed, recoverable operation attempt=2
[Thu Apr 30 14:43:32 2015] [26770:14544] [error] ajp_service::jk_ajp_common.c (1953): (tomcatTaohandan) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
[Thu Apr 30 14:43:32 2015] [26770:14544] [info] service::jk_lb_worker.c (1098): service failed, worker tomcatTaohandan is in error state
[Thu Apr 30 14:43:33 2015] [25203:14544] [info] ajp_send_request::jk_ajp_common.c (1215): (tomcatchangbao) error sending request. Will try another pooled connection
[Thu Apr 30 14:43:33 2015] [25203:14544] [info] ajp_send_request::jk_ajp_common.c (1241): (tomcatchangbao) all endpoints are disconnected
[Thu Apr 30 14:43:33 2015] [25203:14544] [info] ajp_send_request::jk_ajp_common.c (1244): (tomcatchangbao) increase the backend idle connection timeout or the connection_pool_minsize
[Thu Apr 30 14:43:33 2015] [25203:14544] [info] ajp_service::jk_ajp_common.c (1941): (tomcatchangbao) sending request to tomcat failed, recoverable operation attempt=1
[Thu Apr 30 14:43:33 2015] [25483:14544] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (951): (tomcat1) can‘t receive the response message from tomcat, network problems or tomcat (127.0.0.1:8009) is down (errno=104)
[Thu Apr 30 14:43:33 2015] [25483:14544] [error] ajp_get_reply::jk_ajp_common.c (1592): (tomcat1) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Thu Apr 30 14:43:33 2015] [25483:14544] [info] ajp_service::jk_ajp_common.c (1902): (tomcat1) receiving from tomcat failed, recoverable operation attempt=1
[Thu Apr 30 14:43:33 2015] [25483:14544] [info] ajp_service::jk_ajp_common.c (1941): (tomcat1) sending request to tomcat failed, recoverable operation attempt=2
[Thu Apr 30 14:43:33 2015] [25483:14544] [error] ajp_service::jk_ajp_common.c (1953): (tomcat1) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
[Thu Apr 30 14:43:33 2015] [25483:14544] [info] service::jk_lb_worker.c (1098): service failed, worker tomcat1 is in error state

时间: 2024-11-06 05:48:09

Apache JK Tomcat 集群问题的相关文章

通过Apache+mod_JK+Tomcat集群实现负载均衡

通过Apache+mod_JK+Tomcat集群实现负载均衡 1.概念 通过Apache+mod_JK+Tomcat集群搭建起来的环境主要用来实现负载均衡和高可用性.使用apache作为反向代理服务器实现负载均衡,使用mod_jk可以实现节点的故障恢复功能,达到高可用性.使用tomcat集群功能实现sessionID共享复制.用户访问数据在到达apache后,如果是静态内容,直接由apache处理,如果是动态请求,就通过mod_jk调用后端的一台tomcat服务器去处理请求,可以通过黏性Sess

Linux下通过apache实现tomcat集群

对于WEB应用集群的技术实现而言,最大的难点就是如何能在集群中的多个节点之间保持数据的一致性,会话(Session)信息是这些数据中最重要的一块.要实现这一点,大体上有两种方式,一种是把所有Session数据放到一台服务器上或者数据库中,集群中的所有节点通过访问这台Session服务器来获取数据:另一种就是在集群中的所有节点间进行Session数据的同步拷贝,任何一个节点均保存了所有的Session数据.两种方式都各有优点,第一种方式简单.易于实现,但是存在着Session服务器发生故障会导致全

基于apache实现tomcat集群的负载均衡

概述 Tomcat是一个完全功能的HTTP服务器,能够独立完成接收客户端请求,处理请求,然后封装响应报文响应客户端.但是Tomcat的并发响应能力并不强,所以往往使用httpd或nginx服务器用于在前端接收客户端请求,然后将请求调度至后端多个Tomcat节点.本文介绍的是利用httpd作为反向代理服务器,实现Tomcat的负载均衡. httpd连接后端的Tomcat服务器,需要启用对应的模块.能够实现该功能的有两个模块:mod_proxy,mod_jk.mod_proxy是新出的模块,只有在a

apache+多tomcat集群

一台服务器安装apache+tomcat   另一台安装tomcat(192.168.1.200) 1 安装软件 安装基本配置apache+tomcat见上一篇 2 配置两台服务器的tomcat , 配置tomcat/conf/server.xml 1 找到 <Engine name="Catalina" defaultHost="localhost" > 添加改为  <Engine name="Catalina" defaul

Apache+Tomcat集群配置

本文Apache+Tomcat集群配置 基于最新的Apache和Tomcat,具体是2011年4月20日最新的Tomcat和Apache集群和负载均衡配置. 准备环境 Apache[下载地址] 企业框架源码 Apache是http服务器,我们利用其对Tomcat进行负载均衡.目前最新版本为2.2.17,下载地址为http://httpd.apache.org/download.cgi#apache22.如下图: 目前已经出现Apache2.3.11,但是为beta版本,所以没有使用. 下载后直接

apache+tomcat集群、负载均衡

在开发测试环境中,可能硬件资源不够情况下,要怎么实现集群呢,以下就举一例: 环境: win7 工具: apache 一枚 tomcat 两枚 分别命名为tomcat1.tomcat2 mod_jk 一枚(尽量和apache同一个版本) 一路安装,mod_jk不是安装的.这个文件要拷贝到Apache目录的modules目录里面. 配置Tomcat集群 打开tomcat下conf/server.xml文件,找到<Engine name="Catalina" defaultHost=&

Apache+tomcat或Nginx+tomcat集群搭建

Apache+tomcat集群搭建 1.http://httpd.apache.org/下载apache,本博客以httpd-2.4.12-x86-vc11-r2版本为例(第一个发行版中的) 2.http://mirror.bjtu.edu.cn/apache/tomcat/tomcat-connectors/jk/binaries/windows/ 下载mod_jk 3.注意Apache和mod_jk的版本,32bit后者64bit要统一 4.apache的httpd.conf文件可能有点问题

Tomcat集群搭建超详细(apache+mod_jk+tomcat)

TOMCAT集群 目录 TOMCAT集群 1 1 集群 1 1.1 什么是集群 1 1.2 集群的特性 1 1.3 集群的分类 1 1.4 TOMCAT集群配置的优缺点 2 1.5 APACHE+TOMCAT 2 1.6 环境说明 2 2 软件安装 3 2.1 安装说明 3 2.2 JDK安装 3 2.3 APACHE安装 4 2.4 TOMCAT安装 4 3 集群配置 6 3.1 APACHE+MOD_JK+TOMCAT配置 6 3.2 测试 7 4 SESSION复制 8 4.1 SESSI

(apache+tomcat集群+memcached番外篇)单台tomcat的session信息的2种持久化方式

为什么要实现搭建tomcat集群环境呢?主要因为单个tomcat无论从吞吐量和并发数上,会达到一定的极限.如果访问量超过单个tomcat的承受能力的话,tomcat一般要么拒绝提供服务,要么直接宕掉.所以,必须要依靠tomcat集群技术.举个最简单的例子,拿"送快件"比喻,如果一个人,5分钟送一件,一小时之内,送10个,一个人完全能胜任这项工作.假设现在到了双十一,要求1小时,送100个, 那怎么办?只能安排更多的人加入"送快件"这项工作中来.这其实和集群一个道理.