Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 75178 invoked from network); 4 Nov 2009 22:05:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Nov 2009 22:05:02 -0000 Received: (qmail 78869 invoked by uid 500); 4 Nov 2009 20:15:41 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 78801 invoked by uid 500); 4 Nov 2009 20:15:41 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 78790 invoked by uid 99); 4 Nov 2009 20:15:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Nov 2009 20:15:41 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jmedina@e-dialog.com designates 208.94.20.29 as permitted sender) Received: from [208.94.20.29] (HELO corp-mail.e-dialog.com) (208.94.20.29) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Nov 2009 20:15:38 +0000 Received: from eeyore.ad.e-dialog.com ([::1]) by eeyore.ad.e-dialog.com ([::1]) with mapi; Wed, 4 Nov 2009 15:15:17 -0500 From: Jorge Medina To: Tomcat Users List Date: Wed, 4 Nov 2009 15:15:16 -0500 Subject: RE: Problem forward HTTP / Soap request using mod_jk Thread-Topic: Problem forward HTTP / Soap request using mod_jk Thread-Index: AcpctHOJBq9w8+9fSeO3pQPEr4mb0wA1ej4w Message-ID: References: <26160709.post@talk.nabble.com> In-Reply-To: <26160709.post@talk.nabble.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Did you add a "load blancer worker" to your workers.properties?=20 Below is what I use to perform load balancing over two Tomcat servers. I have a similar scenario: Apache in front of two (or more Tomcats).=20 Apache forwards the requests using mod_jk.=20 My client is sending SOAP requests using Axis2. worker.list=3D wlb, jkwatch ###########################################################################= ### # Defining a load balancer worker ###########################################################################= ### worker.wlb.type=3Dlb worker.wlb.balance_workers=3Dtomcatserver1, tomcatserver2 worker.wlb.max_reply_timeouts=3D3 # worker.wlb.retries=3D2 # worker.wlb.retry_interval=3D100 # worker.wlb.sticky_session=3DTrue # worker.wlb.sticky_session_force=3DFalse # worker.wlb.method=3DRequest # worker.wlb.lock=3DOptimistic ###########################################################################= ### # Defining the status workers ###########################################################################= ### # A read-only status worker worker.jkwatch.type=3Dstatus worker.jkwatch.read_only=3DTrue worker.jkwatch.mount=3D/private/admin/watch/jk # A managing status worker # worker.jkmanage.type=3Dstatus # worker.jkmanage.mount=3D/private/admin/manage/jk ###########################################################################= ### ## Balanced Workers (Tomcat Workers) ###########################################################################= ### ###########################################################################= ### # Tomcat Worker (tomcatserver1) ###########################################################################= ### worker.tomcatserver1.type=3Dajp13 worker.tomcatserver1.host=3Dlocalhost worker.tomcatserver1.port=3D8009 worker.tomcatserver1.lbfactor=3D1 # Connection pool timeout is set in seconds. (10 minutes). If you modify th= is # value, you need to modify the AJP connector in the Tomcat server.xml to # match this value. Note that the value in Tomcat must be specified in mill= iseconds. worker.tomcatserver1.connection_pool_timeout=3D600 worker.tomcatserver1.socket_keepalive=3DTrue worker.tomcatserver1.socket_timeout=3D60 ## worker.tomcatserver1.socket_connect_timeout=3D60 # # Apache will wait 30 seconds (30,000 ms) for Tomcat to respond, otherwise # it will return error "504 - Gateway timeout" to the client worker.tomcatserver1.reply_timeout=3D30000 # # This recovery_options attribute is a bit mask. # The following bits are allowed: # 1: don't recover if Tomcat failed after getting the request # 2: don't recover if Tomcat failed after sending the headers to client # 4: close the connection to Tomcat, if we detect an error when writing ba= ck the answer to the client (browser) # 8: always recover requests for HTTP method HEAD (even if Bits 1 or 2 are= set) # 16: always recover requests for HTTP method GET (even if Bits 1 or 2 are = set) # We will set it to 27, equivalent to the binary 11011 worker.tomcatserver1.recovery_options=3D27 ###########################################################################= ### # Tomcat Worker (tomcatserver2) ###########################################################################= ### worker.tomcatserver2.type=3Dajp13 worker.tomcatserver2.host=3Dlocalhost worker.tomcatserver2.port=3D7009 worker.tomcatserver2.lbfactor=3D1 # Connection pool timeout is set in seconds. (10 minutes). If you modify th= is # value, you need to modify the AJP connector in the Tomcat server.xml to # match this value. Note that the value in Tomcat must be specified in mill= iseconds. worker.tomcatserver2.connection_pool_timeout=3D600 worker.tomcatserver2.socket_keepalive=3DTrue worker.tomcatserver2.socket_timeout=3D60 ## worker.tomcatserver2.socket_connect_timeout=3D60 # # Apache will wait 30 seconds (30,000 ms) for Tomcat to respond, otherwise # it will return error "504 - Gateway timeout" to the client worker.tomcatserver2.reply_timeout=3D30000 # # This recovery_options attribute is a bit mask. # The following bits are allowed: # 1: don't recover if Tomcat failed after getting the request # 2: don't recover if Tomcat failed after sending the headers to client # 4: close the connection to Tomcat, if we detect an error when writing ba= ck the answer to the client (browser) # 8: always recover requests for HTTP method HEAD (even if Bits 1 or 2 are= set) # 16: always recover requests for HTTP method GET (even if Bits 1 or 2 are = set) # We will set it to 27, equivalent to the binary 11011 worker.tomcatserver2.recovery_options=3D27 -----Original Message----- From: breako [mailto:alex.staveley@fineos.com]=20 Sent: Tuesday, November 03, 2009 1:35 PM To: users@tomcat.apache.org Subject: Problem forward HTTP / Soap request using mod_jk Hi, I have two tomcat servers and I can make them talk to each other using soap= / http no problem. However, when I put Apache infront of one my tomcat servers and set it up t= o forward http requests to the tomcat server it doesn't get any requests. I am using the mod_jk to achieve the forwarding. I have tested other types = of http forwarding, and they are all ok.=20 So I am confident, I have my workers.properties, ajp ports etc set up ok. I am getting no error messages in my mod_jk logfile. I wonder can mod_jk only forward only certain types of http requests? Any ideas? Apache Http Server: Apache/2.0.47 Tomcat Version: Tomcat/5.5.12 I have to use these versions for the project I am working on. thanks. httpd.conf ... # Load the jk module. LoadModule jk_module modules/mod_jk.so # Specify the workers.properties file location # This is where the tomcat i= nstances are defined JkWorkersFile conf/workers.properties JkLogFile logs/mod_jk.log JkLogLevel error JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " JkRequestLogFormat "%B %H %r %s %w %V %T" # Set up the URLs for request forwarding. JkMount /HelloWorld/* worker2 JkMount /* worker2 JkMount /docy worker2 Workers.properties ... # Define 1 real worker using ajp13 worker.list=3Dworker2 # Set properties for worker2 (ajp13) worker.worker2.type=3Dajp13 worker.worker2.host=3Dlocalhost worker.worker2.port=3D23009 worker.worker2.lbfactor=3D1 Cheers -- View this message in context: http://old.nabble.com/Problem-forward-HTTP---= Soap-request-using-mod_jk-tp26160709p26160709.html Sent from the Tomcat - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org