Re: Apache Tomcat Inerconnection
Hello David, I have followed the steps defined on the web page but still I am facing following problem when Apache and Tomcat are on two different machines. Following are the excerpts from mod_jk.log file [Wed Jun 23 17:27:49 2004] [jk_ajp_common.c (874)]: Error connecting to the Tomcat process. [Wed Jun 23 17:27:49 2004] [jk_ajp_common.c (1190)]: sending request to tomcat failed in send loop. err=1 [Wed Jun 23 17:27:49 2004] [jk_connect.c (132)]: Into jk_open_socket [Wed Jun 23 17:27:49 2004] [jk_connect.c (139)]: jk_open_socket, try to connect socket = 8 [Wed Jun 23 17:27:49 2004] [jk_connect.c (148)]: jk_open_socket, after connect ret = -1 [Wed Jun 23 17:27:49 2004] [jk_connect.c (177)]: jk_open_socket, connect() failed errno = 2 [Wed Jun 23 17:27:49 2004] [jk_ajp_common.c (626)]: Error connecting to tomcat. Tomcat is probably not st arted or is listenning on the wrong port. Failed errno = 2 But everything work properly if both Apache and Tomcat are on the same machine. -AB |-+ | | Davor Cengija| | | [EMAIL PROTECTED]| | | il.inet.hr | | | Sent by: news| | | [EMAIL PROTECTED]| | | rg | | || | || | | 06/24/2004 12:22 | | | PM | | | Please respond to| | | Tomcat Users| | | List| | || |-+ ---| | | |To: [EMAIL PROTECTED] | |cc: | |Subject: Re: Apache Tomcat Inerconnection | ---| [EMAIL PROTECTED] wrote: Hi, I need some help on Apache and TOmcat interconnectivity I have Apache1.3.19 and Tomcat4.1.24 running on two different machines. I need to run servlets. Can anyone help me on this subject. Any pointers for configuration using JK2 as I need to use loadbalancing See http://raibledesigns.com/tomcat/ for details on mod_jk. Mod_jk2 couldn't be that much different. -- Davor Cengija, [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AJP13 connection problem
Hi, I have Apache and Tomcat running on two different SUN machines. I get following error on trying to access a servlet. Though things work fine if Tomcat and Apache are running on same machine. [Tue Jun 22 15:09:01 2004] [jk_uri_worker_map.c (460)]: Into jk_uri_worker_map_t::map_uri_to_worker [Tue Jun 22 15:09:01 2004] [jk_uri_worker_map.c (477)]: Attempting to map URI '/servlet/s4' [Tue Jun 22 15:09:01 2004] [jk_uri_worker_map.c (502)]: jk_uri_worker_map_t::map_uri_to_worker, Found a context match loadbalancer - /servlet/ [Tue Jun 22 15:09:01 2004] [jk_worker.c (132)]: Into wc_get_worker_for_name loadbalancer [Tue Jun 22 15:09:01 2004] [jk_worker.c (136)]: wc_get_worker_for_name, done found a worker [Tue Jun 22 15:09:01 2004] [jk_lb_worker.c (527)]: Into jk_worker_t::get_endpoint [Tue Jun 22 15:09:01 2004] [jk_lb_worker.c (310)]: Into jk_endpoint_t::service [Tue Jun 22 15:09:01 2004] [jk_ajp_common.c (1404)]: Into jk_worker_t::get_endpoint [Tue Jun 22 15:09:01 2004] [jk_ajp_common.c (1116)]: Into jk_endpoint_t::service [Tue Jun 22 15:09:01 2004] [jk_ajp_common.c (295)]: Into ajp_marshal_into_msgb [Tue Jun 22 15:09:01 2004] [jk_ajp_common.c (432)]: ajp_marshal_into_msgb - Done [Tue Jun 22 15:09:01 2004] [jk_connect.c (132)]: Into jk_open_socket [Tue Jun 22 15:09:01 2004] [jk_connect.c (139)]: jk_open_socket, try to connect socket = 7 [Tue Jun 22 15:09:01 2004] [jk_connect.c (148)]: jk_open_socket, after connect ret = -1 [Tue Jun 22 15:09:01 2004] [jk_connect.c (177)]: jk_open_socket, connect() failed errno = 146 [Tue Jun 22 15:09:01 2004] [jk_ajp_common.c (626)]: Error connecting to tomcat. Tomcat is probably not started or is listenning on the wrong port. Failed errno = 146 [Tue Jun 22 15:09:01 2004] [jk_ajp_common.c (874)]: Error connecting to the Tomcat process. [Tue Jun 22 15:09:01 2004] [jk_ajp_common.c (1190)]: sending request to tomcat failed in send loop. err=0 [Tue Jun 22 15:09:01 2004] [jk_connect.c (132)]: Into jk_open_socket [Tue Jun 22 15:09:01 2004] [jk_connect.c (139)]: jk_open_socket, try to connect socket = 7 [Tue Jun 22 15:09:01 2004] [jk_connect.c (148)]: jk_open_socket, after connect ret = -1 [Tue Jun 22 15:09:01 2004] [jk_connect.c (177)]: jk_open_socket, connect() failed errno = 146 [Tue Jun 22 15:09:01 2004] [jk_ajp_common.c (626)]: Error connecting to tomcat. Tomcat is probably not started or is listenning on the wrong port. Failed errno = 146 [Tue Jun 22 15:09:01 2004] [jk_ajp_common.c (874)]: Error connecting to the Tomcat process. [Tue Jun 22 15:09:01 2004] [jk_ajp_common.c (1190)]: sending request to tomcat failed in send loop. err=1 [Tue Jun 22 15:09:01 2004] [jk_connect.c (132)]: Into jk_open_socket [Tue Jun 22 15:09:01 2004] [jk_connect.c (139)]: jk_open_socket, try to connect socket = 7 [Tue Jun 22 15:09:01 2004] [jk_connect.c (148)]: jk_open_socket, after connect ret = -1 [Tue Jun 22 15:09:01 2004] [jk_connect.c (177)]: jk_open_socket, connect() failed errno = 146 [Tue Jun 22 15:09:01 2004] [jk_ajp_common.c (626)]: Error connecting to tomcat. Tomcat is probably not started or is listenning on the wrong port. Failed errno = 146 [Tue Jun 22 15:09:01 2004] [jk_ajp_common.c (874)]: Error connecting to the Tomcat process. [Tue Jun 22 15:09:01 2004] [jk_ajp_common.c (1190)]: sending request to tomcat failed in send loop. err=2 [Tue Jun 22 15:09:01 2004] [jk_ajp_common.c (1198)]: Error connecting to tomcat. Tomcat is probably not started or is listenning on the wrong port. Failed errno = 146 [Tue Jun 22 15:09:01 2004] [jk_ajp_common.c (1388)]: Into jk_endpoint_t::done, closing connection 0 [Tue Jun 22 15:09:01 2004] [jk_ajp_common.c (561)]: In jk_endpoint_t::ajp_close_endpoint [Tue Jun 22 15:09:01 2004] [jk_lb_worker.c (369)]: In jk_endpoint_t::service, recoverable error... will try to recover on other host [Tue Jun 22 15:09:01 2004] [jk_lb_worker.c (373)]: lb: All tomcat instances failed, no more workers left. [Tue Jun 22 15:09:01 2004] [jk_lb_worker.c (380)]: In jk_endpoint_t::service: NULL Parameters [Tue Jun 22 15:09:01 2004] [jk_lb_worker.c (389)]: Into jk_endpoint_t::done Regards -AB - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AJP13 connection problem
Just to add more information... I am using Tomcat 4.1.24 and Apache 1.3.19 Following are the contents of the workers.properties worker.list=loadbalancer worker.tomcat0.type=ajp13 worker.tomcat0.host=nil102 worker.tomcat0.port=8009 worker.tomcat0.lbfactor=100 worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers=tomcat0 Following are the changes to httpd.conf LoadModule jk_module libexec/mod_jk.so AddModule mod_jk.c IfModule mod_jk.c JkWorkersFile /in/slee/webserver/apache/conf/workers.properties JkMount /servlet/* loadbalancer JkLogFile /in/slee/webserver/apache/logs/JK.log JkLogLevel debug /IfModule Following are the contents of server.xml file !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8009 minProcessors=5 maxProcessors=500 enableLookups=true redirectPo rt=8443 acceptCount=10 debug=0 connectionTimeout=10 useURIValidationHack=false protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/ ... Engine name=Standalone defaultHost=localhost debug=0 jmvRoute=tomcat0 .. Regards -AB |-+--- | | Ashish-Kumar| | | BALYAN/IN/ALCATE| | | [EMAIL PROTECTED] | | | | | | 06/23/2004 02:49| | | PM | | | Please respond | | | to Tomcat Users| | | List | | | | |-+--- ---| | | |To: [EMAIL PROTECTED] | |cc: | |Subject: AJP13 connection problem | ---| Hi, I have Apache and Tomcat running on two different SUN machines. I get following error on trying to access a servlet. Though things work fine if Tomcat and Apache are running on same machine. [Tue Jun 22 15:09:01 2004] [jk_uri_worker_map.c (460)]: Into jk_uri_worker_map_t::map_uri_to_worker [Tue Jun 22 15:09:01 2004] [jk_uri_worker_map.c (477)]: Attempting to map URI '/servlet/s4' [Tue Jun 22 15:09:01 2004] [jk_uri_worker_map.c (502)]: jk_uri_worker_map_t::map_uri_to_worker, Found a context match loadbalancer - /servlet/ [Tue Jun 22 15:09:01 2004] [jk_worker.c (132)]: Into wc_get_worker_for_name loadbalancer [Tue Jun 22 15:09:01 2004] [jk_worker.c (136)]: wc_get_worker_for_name, done found a worker [Tue Jun 22 15:09:01 2004] [jk_lb_worker.c (527)]: Into jk_worker_t::get_endpoint [Tue Jun 22 15:09:01 2004] [jk_lb_worker.c (310)]: Into jk_endpoint_t::service [Tue Jun 22 15:09:01 2004] [jk_ajp_common.c (1404)]: Into jk_worker_t::get_endpoint [Tue Jun 22 15:09:01 2004] [jk_ajp_common.c (1116)]: Into jk_endpoint_t::service [Tue Jun 22 15:09:01 2004] [jk_ajp_common.c (295)]: Into ajp_marshal_into_msgb [Tue Jun 22 15:09:01 2004] [jk_ajp_common.c (432)]: ajp_marshal_into_msgb - Done [Tue Jun 22 15:09:01 2004] [jk_connect.c (132)]: Into jk_open_socket [Tue Jun 22 15:09:01 2004] [jk_connect.c (139)]: jk_open_socket, try to connect socket = 7 [Tue Jun 22 15:09:01 2004] [jk_connect.c (148)]: jk_open_socket, after connect ret = -1 [Tue Jun 22 15:09:01 2004] [jk_connect.c (177)]: jk_open_socket, connect() failed errno = 146 [Tue Jun 22 15:09:01 2004] [jk_ajp_common.c (626)]: Error connecting to tomcat. Tomcat is probably not started or is listenning on the wrong port. Failed errno = 146 [Tue Jun 22 15:09:01 2004] [jk_ajp_common.c (874)]: Error connecting to the Tomcat process. [Tue Jun 22 15:09:01 2004] [jk_ajp_common.c (1190)]: sending request to tomcat failed in send loop. err=0 [Tue Jun 22 15:09:01 2004] [jk_connect.c (132)]: Into jk_open_socket [Tue Jun 22 15:09:01 2004] [jk_connect.c (139)]: jk_open_socket, try to connect socket = 7 [Tue Jun 22 15:09:01 2004] [jk_connect.c (148)]: jk_open_socket, after connect ret = -1 [Tue Jun 22 15:09:01 2004] [jk_connect.c (177)]: jk_open_socket, connect() failed errno = 146 [Tue Jun 22 15:09:01 2004] [jk_ajp_common.c (626)]: Error connecting to tomcat. Tomcat is probably not started or is listenning on the wrong port. Failed errno = 146 [Tue Jun 22 15:09:01 2004] [jk_ajp_common.c (874
Apache Tomcat Inerconnection
Hi, I need some help on Apache and TOmcat interconnectivity I have Apache1.3.19 and Tomcat4.1.24 running on two different machines. I need to run servlets. Can anyone help me on this subject. Any pointers for configuration using JK2 as I need to use loadbalancing Regads -AB - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Load balancing with 2xTC5, 1xIIS and jk2
Hi here is a sample workers.properties that you can use. worker.list=tomcat0, tomcat1, loadbalancer worker.tomcat0.type=ajp13 worker.tomcat0.host=localhost worker.tomcat0.port=8009 worker.tomcat0.cachesize=100 worker.tomcat0.lbfactor=100 worker.tomcat1.type=ajp13 worker.tomcat1.host=localhost worker.tomcat1.port=8011 worker.tomcat1.cachesize=100 worker.tomcat1.lbfactor=100 worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers=tomcat0,tomcat1 Save the file in the directory .../apache/conf Then add following lines to httpd.conf LoadModule jk_module libexec/mod_jk.so AddModule mod_jk.c IfModule mod_jk.c JkWorkersFile .../apache/conf/workers.properties JkLogFile .../apache/logs/mod_jk.log JkLogLevel warn JkMount /servlet/* loadbalancer JkMount /*.jsp loadbalancer /IfModule Do not forget to put mod_jk.so in directory .../apache/libexec :-) AB |-+--- | | Mats Andersson | | | mats.andersson@| | | xantus.se | | | | | | 09/15/03 01:40 | | | PM | | | Please respond | | | to Tomcat Users| | | List | | | | |-+--- ---| | | |To: Tomcat Users List [EMAIL PROTECTED] | |cc: | |Subject: Load balancing with 2xTC5, 1xIIS and jk2 | ---| How do I define two workers for load balancing in workers2.properties? There is an example for the old jk, but I can't find any for jk2. Thanks in advance! Mats - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Load balancing with 2xTC5, 1xIIS and jk2
Hi, My reply was for load balancing with Apache What I mean is that there should be something similar for IIS. Regards AB |-+--- | | Mats Andersson | | | mats.andersson@| | | xantus.se | | | | | | 09/15/03 01:40 | | | PM | | | Please respond | | | to Tomcat Users| | | List | | | | |-+--- ---| | | |To: Tomcat Users List [EMAIL PROTECTED] | |cc: | |Subject: Load balancing with 2xTC5, 1xIIS and jk2 | ---| How do I define two workers for load balancing in workers2.properties? There is an example for the old jk, but I can't find any for jk2. Thanks in advance! Mats - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Compilation of mod_jk
Hi, I am using Apache 1.3.19 with Tomcat 4.1.24 I need to do a 64 bit compilation of mod_jk . I tried to do a 32 bit compilation but there were some problems in the Makefile. I need to know following things. 1. Where to get the source code for mod_jk. 2. Detailed compilation procedures. TIA Ashish - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]