jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@octo.com>
Subject RE: Cactus with load balancing in a clustered environment - Exception.
Date Wed, 19 Feb 2003 08:06:38 GMT
Hi Pavan,

There is one issue with Cactus that will prevent your setup from working
fine. ATM, it is not possible to run multiple concurrent cactus tests.
The reason is simple and easy to fix: each cactus test result is put in
the Servlet Config (application scope) under a fixed key name. Thus a
second test might overwrite the result of a first test before the first
test returns.

The solution is to add some unique ID to each test. The ID should
probably be generated on the Cactus client side, passed to the
redirector as another cactus parameter. The redirector will save the
test result using this id and the client side will issue the request to
get the test result using this id.

There is another potential problem: The cactus client side issues 2
requests to the redirector: once to run the server side tests and
another one to get the test results. ATM, the second HTTP call does NOT
use the same HTTP session as the first HTTP call (actually, it's even
possible that that there is no HTTP session created on the first call).
Thus, with you load balancer, the second call may end up on another
application server instance and thus the test result that will be
returned will not be the correct one.


> -----Original Message-----
> From: Pavan Aripirala Venkata [mailto:pvenkata@h5technologies.com]
> Sent: 18 February 2003 19:43
> To: cactus-user@jakarta.apache.org
> Subject: Cactus with load balancing in a clustered environment -
> Exception.
> 	Hi all,
> 	I have a clustered environment wherein I have our application
> running on three application servers (JBoss 3.0) (on three different
> machines), and we have an Apache load balancer (with sticky sessions)
> for load balancing these machines. With this setup I run some of my
> cactus tests and sometimes the following exception is occurring - the
> occurring of this exception is erratic.
> 2003-02-13 16:36:44,313 WARN  [org.jboss.jbossweb] (Logger.java:167)
> WARNING: jva.io.IOException: Premature EOF reading params
> 2003-02-13 16:36:44,322 WARN  [org.jboss.jbossweb] (Logger.java:167)
> WARNING: Eception for /cactus/ServletRedirector/
> javax.servlet.ServletException: Missing service name parameter
> [ServletTestRediector_Service] in HTTP request.
>         at
> stController.java:176)
>         at
> tController.java:114)
>         at
> or.java:134)
>         at
> and so on
> 	I don't get this exception when I run the cactus tests with just
> one single application server (no Apache in between), i.e., the
> way. Also I am able to test my application from the web pages with
> clustering on, without any exceptions.
>   	Looks like the request parameters are not reaching the app
> server. You might have seen this if you had just typed
> http://<your host>:<deployport>/cactus/ServletRedirector/ in the web
> browser.
> 	In cactus.properties I set the servletRedirectorURL (or the
> contextURL) to the ipaddress of the machine where Apache resides. I
> Java threading (home built code) to run multiple concurrent cactus
> - I am not using the JUnit's ActiveTestSuite. I also make sure that
> input data is not same for two threads. I am successful with this
> threaded setup when there is no clustering.
> 	JBoss internally uses jetty. I don't know if that causes any
> error. Long ago I saw an posting on this list about jetty and cactus
> problem - I am sure these two are not related. (FYI the subject of
> e-mail was Re: [jetty-support] Re: Cactus and Jetty problem - sent by
> Scott Sayles [ssayles@fgm.com]).
> 	Please, let me know if anyone knows how to fix it.
> Thanks
> Pavan.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org

View raw message