jk2跳转总是报错

jk2跳转总是报错



[Copy to clipboard] [ - ]
CODE:
[Thu Jun 12 10:05:10 2008] [error] channelApr.open() attempt to connect to 127.0.0.1:8009 (127.0.0.1) failed 110
[Thu Jun 12 10:05:10 2008] [error] ajp13.connect() failed ajp13:127.0.0.1:8009
[Thu Jun 12 10:05:10 2008] [error] ajp13.service() failed to connect endpoint errno=9 Bad file descriptor
[Thu Jun 12 10:05:10 2008] [error] ajp13.service() Error  forwarding ajp13:127.0.0.1:8009 1 1
[Thu Jun 12 10:05:10 2008] [error] mod_jk2.handler() Error connecting to tomcat 120000, status 0
[Thu Jun 12 10:05:10 2008] [error] channelApr.open() attempt to connect to 127.0.0.1:8009 (127.0.0.1) failed 110
[Thu Jun 12 10:05:10 2008] [error] ajp13.connect() failed ajp13:127.0.0.1:8009
[Thu Jun 12 10:05:10 2008] [error] ajp13.service() failed to connect endpoint errno=9 Bad file descriptor
[Thu Jun 12 10:05:10 2008] [error] ajp13.service() Error  forwarding ajp13:127.0.0.1:8009 1 1
[Thu Jun 12 10:05:10 2008] [error] mod_jk2.handler() Error connecting to tomcat 120000, status 0
[Thu Jun 12 10:05:10 2008] [error] channelApr.open() attempt to connect to 127.0.0.1:8009 (127.0.0.1) failed 110
[Thu Jun 12 10:05:10 2008] [error] ajp13.connect() failed ajp13:127.0.0.1:8009
[Thu Jun 12 10:05:10 2008] [error] ajp13.service() failed to connect endpoint errno=9 Bad file descriptor
[Thu Jun 12 10:05:10 2008] [error] ajp13.service() Error  forwarding ajp13:127.0.0.1:8009 1 1
[Thu Jun 12 10:05:10 2008] [error] mod_jk2.handler() Error connecting to tomcat 120000, status 0
[Thu Jun 12 10:05:10 2008] [error] channelApr.open() attempt to connect to 127.0.0.1:8009 (127.0.0.1) failed 110
[Thu Jun 12 10:05:10 2008] [error] ajp13.connect() failed ajp13:127.0.0.1:8009
[Thu Jun 12 10:05:10 2008] [error] ajp13.service() failed to connect endpoint errno=9 Bad file descriptor
[Thu Jun 12 10:05:10 2008] [error] ajp13.service() Error  forwarding ajp13:127.0.0.1:8009 1 1
[Thu Jun 12 10:05:10 2008] [error] mod_jk2.handler() Error connecting to tomcat 120000, status 0
[Thu Jun 12 10:05:10 2008] [error] msgAjp.receive(): Bad signature 00
[Thu Jun 12 10:05:10 2008] [error] channelApr.receive(): Bad header
[Thu Jun 12 10:05:10 2008] [error] workerEnv.processCallbacks() Error reading reply
[Thu Jun 12 10:05:10 2008] [error] ajp13.service() ajpGetReply recoverable error 120000
[Thu Jun 12 10:05:10 2008] [error] channelApr.open() attempt to connect to 127.0.0.1:8009 (127.0.0.1) failed 110
[Thu Jun 12 10:05:10 2008] [error] ajp13.connect() failed ajp13:127.0.0.1:8009
[Thu Jun 12 10:05:10 2008] [error] ajp13.service() failed to connect endpoint errno=9 Bad file descriptor
[Thu Jun 12 10:05:10 2008] [error] ajp13.service() Error  forwarding ajp13:127.0.0.1:8009 1 1
[Thu Jun 12 10:05:10 2008] [error] mod_jk2.handler() Error connecting to tomcat 120000, status 0
[Thu Jun 12 10:05:10 2008] [error] channelApr.open() attempt to connect to 127.0.0.1:8009 (127.0.0.1) failed 110
[Thu Jun 12 10:05:10 2008] [error] ajp13.connect() failed ajp13:127.0.0.1:8009
[Thu Jun 12 10:05:10 2008] [error] ajp13.service() failed to connect endpoint errno=9 Bad file descriptor
[Thu Jun 12 10:05:10 2008] [error] ajp13.service() Error  forwarding ajp13:127.0.0.1:8009 1 1
[Thu Jun 12 10:05:10 2008] [error] mod_jk2.handler() Error connecting to tomcat 120000, status 0
[Thu Jun 12 10:05:10 2008] [error] channelApr.open() attempt to connect to 127.0.0.1:8009 (127.0.0.1) failed 110
[Thu Jun 12 10:05:10 2008] [error] ajp13.connect() failed ajp13:127.0.0.1:8009
[Thu Jun 12 10:05:10 2008] [error] ajp13.service() failed to connect endpoint errno=9 Bad file descriptor
[Thu Jun 12 10:05:10 2008] [error] ajp13.service() Error  forwarding ajp13:127.0.0.1:8009 1 1
[Thu Jun 12 10:05:10 2008] [error] mod_jk2.handler() Error connecting to tomcat 120000, status 0
[Thu Jun 12 10:05:10 2008] [error] channelApr.open() attempt to connect to 127.0.0.1:8009 (127.0.0.1) failed 110
[Thu Jun 12 10:05:10 2008] [error] ajp13.connect() failed ajp13:127.0.0.1:8009
[Thu Jun 12 10:05:10 2008] [error] ajp13.service() failed to connect endpoint errno=9 Bad file descriptor
[Thu Jun 12 10:05:10 2008] [error] ajp13.service() Error  forwarding ajp13:127.0.0.1:8009 1 1
[Thu Jun 12 10:05:10 2008] [error] mod_jk2.handler() Error connecting to tomcat 120000, status 0
[Thu Jun 12 10:05:10 2008] [error] channelApr.open() attempt to connect to 127.0.0.1:8009 (127.0.0.1) failed 110
[Thu Jun 12 10:05:10 2008] [error] ajp13.connect() failed ajp13:127.0.0.1:8009
[Thu Jun 12 10:05:10 2008] [error] ajp13.service() failed to connect endpoint errno=9 Bad file descriptor
[Thu Jun 12 10:05:10 2008] [error] ajp13.service() Error  forwarding ajp13:127.0.0.1:8009 1 1
[Thu Jun 12 10:05:10 2008] [error] mod_jk2.handler() Error connecting to tomcat 120000, status 0
[Thu Jun 12 10:05:11 2008] [error] msgAjp.receive(): Bad signature 00
[Thu Jun 12 10:05:11 2008] [error] channelApr.receive(): Bad header
[Thu Jun 12 10:05:11 2008] [error] workerEnv.processCallbacks() Error reading reply
[Thu Jun 12 10:05:11 2008] [error] ajp13.service() ajpGetReply recoverable error 120000
[Thu Jun 12 10:05:11 2008] [error] channelApr.open() attempt to connect to 127.0.0.1:8009 (127.0.0.1) failed 110
[Thu Jun 12 10:05:11 2008] [error] ajp13.connect() failed ajp13:127.0.0.1:8009
[Thu Jun 12 10:05:11 2008] [error] ajp13.service() failed to connect endpoint errno=9 Bad file descriptor
[Thu Jun 12 10:05:11 2008] [error] ajp13.service() Error  forwarding ajp13:127.0.0.1:8009 1 1
[Thu Jun 12 10:05:11 2008] [error] mod_jk2.handler() Error connecting to tomcat 120000, status 0
[Thu Jun 12 10:05:11 2008] [error] channelApr.open() attempt to connect to 127.0.0.1:8009 (127.0.0.1) failed 110
[Thu Jun 12 10:05:11 2008] [error] ajp13.connect() failed ajp13:127.0.0.1:8009
[Thu Jun 12 10:05:11 2008] [error] ajp13.service() failed to connect endpoint errno=9 Bad file descriptor
[Thu Jun 12 10:05:11 2008] [error] ajp13.service() Error  forwarding ajp13:127.0.0.1:8009 1 1
[Thu Jun 12 10:05:11 2008] [error] mod_jk2.handler() Error connecting to tomcat 120000, status 0
[Thu Jun 12 10:05:11 2008] [error] channelApr.open() attempt to connect to 127.0.0.1:8009 (127.0.0.1) failed 110
[Thu Jun 12 10:05:11 2008] [error] ajp13.connect() failed ajp13:127.0.0.1:8009
[Thu Jun 12 10:05:11 2008] [error] ajp13.service() failed to connect endpoint errno=9 Bad file descriptor
[Thu Jun 12 10:05:11 2008] [error] ajp13.service() Error  forwarding ajp13:127.0.0.1:8009 1 1
[Thu Jun 12 10:05:11 2008] [error] mod_jk2.handler() Error connecting to tomcat 120000, status 0
[Thu Jun 12 10:05:11 2008] [error] channelApr.open() attempt to connect to 127.0.0.1:8009 (127.0.0.1) failed 110
[Thu Jun 12 10:05:11 2008] [error] ajp13.connect() failed ajp13:127.0.0.1:8009
[Thu Jun 12 10:05:11 2008] [error] ajp13.service() failed to connect endpoint errno=9 Bad file descriptor
[Thu Jun 12 10:05:11 2008] [error] ajp13.service() Error  forwarding ajp13:127.0.0.1:8009 1 1
[Thu Jun 12 10:05:11 2008] [error] mod_jk2.handler() Error connecting to tomcat 120000, status 0
[Thu Jun 12 10:05:11 2008] [error] msgAjp.receive(): Bad signature 00
[Thu Jun 12 10:05:11 2008] [error] channelApr.receive(): Bad header
[Thu Jun 12 10:05:11 2008] [error] workerEnv.processCallbacks() Error reading reply
[Thu Jun 12 10:05:11 2008] [error] ajp13.service() ajpGetReply recoverable error 120000
[Thu Jun 12 10:05:11 2008] [error] channelApr.open() attempt to connect to 127.0.0.1:8009 (127.0.0.1) failed 110
[Thu Jun 12 10:05:11 2008] [error] ajp13.connect() failed ajp13:127.0.0.1:8009
[Thu Jun 12 10:05:11 2008] [error] ajp13.service() failed to connect endpoint errno=9 Bad file descriptor
[Thu Jun 12 10:05:11 2008] [error] ajp13.service() Error  forwarding ajp13:127.0.0.1:8009 1 1
[Thu Jun 12 10:05:11 2008] [error] mod_jk2.handler() Error connecting to tomcat 120000, status 0
[Thu Jun 12 10:05:11 2008] [error] channelApr.open() attempt to connect to 127.0.0.1:8009 (127.0.0.1) failed 110
[Thu Jun 12 10:05:11 2008] [error] ajp13.connect() failed ajp13:127.0.0.1:8009
[Thu Jun 12 10:05:11 2008] [error] ajp13.service() failed to connect endpoint errno=9 Bad file descriptor
[Thu Jun 12 10:05:11 2008] [error] ajp13.service() Error  forwarding ajp13:127.0.0.1:8009 1 1
[Thu Jun 12 10:05:11 2008] [error] mod_jk2.handler() Error connecting to tomcat 120000, status 0
[Thu Jun 12 10:05:11 2008] [error] channelApr.open() attempt to connect to 127.0.0.1:8009 (127.0.0.1) failed 110
[Thu Jun 12 10:05:11 2008] [error] ajp13.connect() failed ajp13:127.0.0.1:8009
[Thu Jun 12 10:05:11 2008] [error] ajp13.service() failed to connect endpoint errno=9 Bad file descriptor
[Thu Jun 12 10:05:11 2008] [error] ajp13.service() Error  forwarding ajp13:127.0.0.1:8009 1 1
[Thu Jun 12 10:05:11 2008] [error] mod_jk2.handler() Error connecting to tomcat 120000, status 0
[Thu Jun 12 10:05:12 2008] [error] channelApr.open() attempt to connect to 127.0.0.1:8009 (127.0.0.1) failed 110
[Thu Jun 12 10:05:12 2008] [error] ajp13.connect() failed ajp13:127.0.0.1:8009
[Thu Jun 12 10:05:12 2008] [error] ajp13.service() failed to connect endpoint errno=9 Bad file descriptor
[Thu Jun 12 10:05:12 2008] [error] ajp13.service() Error  forwarding ajp13:127.0.0.1:8009 1 1
[Thu Jun 12 10:05:12 2008] [error] mod_jk2.handler() Error connecting to tomcat 120000, status 0
[Thu Jun 12 10:05:12 2008] [error] msgAjp.receive(): Bad signature 00
[Thu Jun 12 10:05:12 2008] [error] channelApr.receive(): Bad header
[Thu Jun 12 10:05:12 2008] [error] workerEnv.processCallbacks() Error reading reply
[Thu Jun 12 10:05:12 2008] [error] ajp13.service() ajpGetReply recoverable error 120000
[Thu Jun 12 10:05:12 2008] [error] msgAjp.receive(): Bad signature 00
[Thu Jun 12 10:05:12 2008] [error] channelApr.receive(): Bad header
[Thu Jun 12 10:05:12 2008] [error] workerEnv.processCallbacks() Error reading reply
[Thu Jun 12 10:05:12 2008] [error] ajp13.service() ajpGetReply recoverable error 120000
[Thu Jun 12 10:05:12 2008] [error] channelApr.open() attempt to connect to 127.0.0.1:8009 (127.0.0.1) failed 110
[Thu Jun 12 10:05:12 2008] [error] ajp13.connect() failed ajp13:127.0.0.1:8009
[Thu Jun 12 10:05:12 2008] [error] ajp13.service() failed to connect endpoint errno=9 Bad file descriptor
[Thu Jun 12 10:05:12 2008] [error] ajp13.service() Error  forwarding ajp13:127.0.0.1:8009 1 1
[Thu Jun 12 10:05:12 2008] [error] mod_jk2.handler() Error connecting to tomcat 120000, status 0
[Thu Jun 12 10:05:12 2008] [error] channelApr.open() attempt to connect to 127.0.0.1:8009 (127.0.0.1) failed 110
[Thu Jun 12 10:05:12 2008] [error] ajp13.connect() failed ajp13:127.0.0.1:8009
[Thu Jun 12 10:05:12 2008] [error] ajp13.service() failed to connect endpoint errno=9 Bad file descriptor
[Thu Jun 12 10:05:12 2008] [error] ajp13.service() Error  forwarding ajp13:127.0.0.1:8009 1 1
[Thu Jun 12 10:05:12 2008] [error] mod_jk2.handler() Error connecting to tomcat 120000, status 0
[Thu Jun 12 10:05:12 2008] [error] channelApr.open() attempt to connect to 127.0.0.1:8009 (127.0.0.1) failed 110
[Thu Jun 12 10:05:12 2008] [error] ajp13.connect() failed ajp13:127.0.0.1:8009
[Thu Jun 12 10:05:12 2008] [error] ajp13.service() failed to connect endpoint errno=9 Bad file descriptor
[Thu Jun 12 10:05:12 2008] [error] ajp13.service() Error  forwarding ajp13:127.0.0.1:8009 1 1
[Thu Jun 12 10:05:12 2008] [error] mod_jk2.handler() Error connecting to tomcat 120000, status 0

这个是什么问题呢?
把你的jk相关的配置文件贴出来


QUOTE:
原帖由 hmglly 于 2008-6-12 11:30 发表
把你的jk相关的配置文件贴出来

worker2.properties

[Copy to clipboard] [ - ]
CODE:
# only at beginnin. In production uncomment it out
[logger.apache2]
level=ERROR

[shm]
file=/usr/local/apache/logs/shm.file
size=1048576

###################################################################
# Example socket channel, override port and host.
[channel.socket:127.0.0.1:8009]
port=8009
host=127.0.0.1

# define the worker
[ajp13:127.0.0.1:8009]
channel=channel.socket:127.0.0.1:8009

# Uri mapping
[uri:[url]www.website1.com/[/url]*.jsp]
worker=ajp13:127.0.0.1:8009
[uri:[url]www.website1.com/[/url]*.do]
worker=ajp13:127.0.0.1:8009

[uri:[url]www.website2.cn/[/url]*.jsp]
worker=ajp13:127.0.0.1:8009
[uri:[url]www.website2.cn/[/url]*.do]
worker=ajp13:127.0.0.1:8009

[uri:ad.website3.com/*.jsp]
worker=ajp13:127.0.0.1:8009
[uri:ad.website3.com/*.do]
worker=ajp13:127.0.0.1:8009
####################################################################

jk2.properties

[Copy to clipboard] [ - ]
CODE:
# list of needed handlers.
handler.list=channelSocket,request
# Override the default port for the channelSocket
channelSocket.port=8009

我的server.xml中修改了连接数
<Connector port="8080" maxHttpHeaderSize="8192"
               maxThreads="1000" minSpareThreads="100" maxSpareThreads="300"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               connectionTimeout="20000" disableUploadTimeout="true" />
起初我以为是tomcat链接数的问题,但修改了还是报错!

我现在的ps -ef | grep httpd | wc -l的连接数平均在2500左右
lsof -i :8009 | wc -l 这个的链接数是2600左右
是不是就是因为8009端口的链接数太多了

每次重启apache时并不报错,而是过一会儿随着连接数多了,才开始报错的

你用jk2啊,jk2因为配置复杂,而且有些问题,用的人少,所以已经没有人维护了
用jk吧
还有你那个tomcat的配置,apache连接tomcat是用的8009端口,你把8080的端口的整来整去的一点用没有


QUOTE:
原帖由 hmglly 于 2008-6-12 12:41 发表
你用jk2啊,jk2因为配置复杂,而且有些问题,用的人少,所以已经没有人维护了
用jk吧
还有你那个tomcat的配置,apache连接tomcat是用的8009端口,你把8080的端口的整来整去的一点用没有

我现在已经在8009上加了,但是还是有错误
tomcat的8009和8080的配置信息是不一样的,不能直接把8080的参数加入8009里面,加了也不报错,就是不管用
jk2我也没配置过,看那个信息,似乎是和8009的端口连接不上,看看是不是系统问题,另外看看apache在启动的时候,error.log里有没有报错


QUOTE:
原帖由 hmglly 于 2008-6-12 16:40 发表
tomcat的8009和8080的配置信息是不一样的,不能直接把8080的参数加入8009里面,加了也不报错,就是不管用
jk2我也没配置过,看那个信息,似乎是和8009的端口连接不上,看看是不是系统问题,另外看看apache在启 ...

apache启动时error_log中是不报错的,等到我的http链接达到一定数量时就开始报错了
把apache中的httpd-mpm.conf贴出来,如果是apache2.2的话
如果是其它版本,就贴出来关于mpm相关的配置信息
就是那个perform相关的
有maxclients
startserver
keeprequestalive等相关的


QUOTE:
原帖由 vv0885 于 2008-6-13 09:04 发表


apache启动时error_log中是不报错的,等到我的http链接达到一定数量时就开始报错了

碰到过类似问题,估计是mod_jk的Bug,连接数量增多,运行时间较长的时候,才出现这情况的。

后面改用mod_proxy加上tomcat自己的http了。