ICode9

精准搜索请尝试: 精确搜索
首页 > 编程语言> 文章详细

java – Apache / mod_jk模块在运行一段时间后无法连接jboss

2019-06-25 16:48:31  阅读:443  来源: 互联网

标签:apache java tomcat jboss


我使用Apache/mod_jk module来连接jboss.但是经过一段时间后,出了点问题.

Apache:2.2.22
mod_jk:1.2.37
Jboss:5.1.0 GA(集群环境)
操作系统:CentOS 5.2 x86_64
JDK:1.6.0_30-b12

这是mod_jk.log的一部分

[Thu Oct 18 15:21:35.044 2012] [26272:47208100643936] [error] ajp_connect_to_endpoint::jk_ajp_common.c (1035): (node1) cping/cpong after connecting to the backend server failed (errno=110)
[Thu Oct 18 15:21:35.044 2012] [26272:47208100643936] [error] ajp_send_request::jk_ajp_common.c (1630): (node1) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=110)
[Thu Oct 18 15:22:35.643 2012] [26272:47208100643936] [error] ajp_connect_to_endpoint::jk_ajp_common.c (1035): (node1) cping/cpong after connecting to the backend server failed (errno=110)
[Thu Oct 18 15:22:35.643 2012] [26272:47208100643936] [error] ajp_send_request::jk_ajp_common.c (1630): (node1) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=110)
[Thu Oct 18 15:22:35.643 2012] [26272:47208100643936] [error] ajp_service::jk_ajp_common.c (2626): (node1) connecting to tomcat failed.
[Thu Oct 18 15:23:36.143 2012] [26272:47208100643936] [error] ajp_connect_to_endpoint::jk_ajp_common.c (1035): (node2) cping/cpong after connecting to the backend server failed (errno=110)
[Thu Oct 18 15:23:36.143 2012] [26272:47208100643936] [error] ajp_send_request::jk_ajp_common.c (1630): (node2) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=110)
[Thu Oct 18 15:24:36.742 2012] [26272:47208100643936] [error] ajp_connect_to_endpoint::jk_ajp_common.c (1035): (node2) cping/cpong after connecting to the backend server failed (errno=110)
[Thu Oct 18 15:24:36.742 2012] [26272:47208100643936] [error] ajp_send_request::jk_ajp_common.c (1630): (node2) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=110)
[Thu Oct 18 15:24:36.742 2012] [26272:47208100643936] [error] ajp_service::jk_ajp_common.c (2626): (node2) connecting to tomcat failed.
[Thu Oct 18 15:24:36.742 2012] [26272:47208100643936] [error] service::jk_lb_worker.c (1485): All tomcat instances failed, no more workers left

http.conf的一部分:

JkWorkersFile conf/workers.properties
JkMountFile conf/uriworkermap.properties
JkLogFile logs/mod_jk.log
JkLogLevel warn

workers.properties:

 worker.list=loadbalancer,loadbalancer_2,status
 worker.node1.port=8009
 worker.node1.host=10.123.76.6
 worker.node1.type=ajp13
 worker.node1.lbfactor=1

 worker.node2.port=8009
 worker.node2.host=10.123.76.4
 worker.node2.type=ajp13
 worker.node2.lbfactor=1

 worker.loadbalancer.type=lb
 worker.loadbalancer.balance_workers=node1,node2

 worker.loadbalancer.sticky_session=true
 worker.loadbalancer.sticky_session_force=false

 worker.loadbalancer_2.type=lb
 worker.loadbalancer_2.balance_workers=node1,node2
 worker.loadbalancer_2.sticky_session=true
 worker.loadbalancer_2.sticky_session_force=false

注意:Jboss工作正常. telnet jboss 8009是正常的.如果你重新启动jboss,它会再次运行.但是,如果你重启apache,它没有帮助.

有人遇到过这个问题吗?

解决方法:

我认为为ajp连接器设置连接超时会解决您的问题.
这样的设置应该有效

<Connector port="8009" address="${jboss.bind.address}" protocol="AJP/1.3"
         emptySessionPath="true" enableLookups="false" redirectPort="8443" maxThreads="1000" connectionTimeout="60000000" />

你在server.xml中配置它

有关此属性的更多文档,您可以在官方文档http://docs.jboss.org/jbossweb/latest/config/ajp.html中阅读

标签:apache,java,tomcat,jboss
来源: https://codeday.me/bug/20190625/1287787.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有