Le module Apache / mod_jk ne parvient pas à se connecter à jboss après un certain temps

J’utilise le module Apache / mod_jk pour connecter jboss. Mais après un certain temps, quelque chose ne va pas.

Apache: 2.2.22 mod_jk: 1.2.37 Jboss: 5.1.0 GA (environnement de cluster) OS: CentOS 5.2 x86_64 JDK: 1.6.0_30-b12

Voici une partie de 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 

partie de 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 

Attentions : Jboss fonctionne bien. telnet jboss 8009 est normal. Si vous redémarrez jboss, cela fonctionne à nouveau. Mais si vous redémarrez apache, cela n’aide pas.

Quelqu’un a déjà rencontré ce problème?

Je pense que la configuration du délai de connexion pour le connecteur ajp résoudrait votre problème. Le réglage comme ça devrait fonctionner

  

vous configurez cela dans server.xml

plus de documentation sur cet atsortingbut, vous pouvez lire dans les documents officiels http://docs.jboss.org/jbossweb/latest/config/ajp.html

Avez-vous défini jvmRoute correct dans le fichier server.xml?

 jboss-as/server/${profile}/deploy/jbossweb.sar/server.xml 

la ligne exacte devrait ressembler à ceci:

  

et sur le second serveur il y aura jvmRoute = “node2”.