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 Thu, 20 Feb 2003 18:28:44 GMT
Hi Pavan,

> -----Original Message-----
> From: Pavan Aripirala Venkata [mailto:pvenkata@h5technologies.com]
> Sent: 20 February 2003 19:23
> To: Vincent Massol
> Subject: RE: Cactus with load balancing in a clustered environment -
> Exception.
> 
> >>>The one with the unique id?
> 
> Yes we return an object containing a unique Id (sourceName). In
textXXX
> method we do this:
> 	Result result = new Result(message, execTime, sourceName);
>       OutputStream out = response.getOutputStream();
>       ObjectOutputStream oos = new ObjectOutputStream(out);
> 
>       oos.writeObject(result);
>       oos.flush();
>       oos.close();
> We are getting back the results as expected - I hope we are doing it
> correct.

Er? I don't understand. What I meant is that the Cactus framework code
itself need to be modified to support this unique id scheme. You are
talking about something in your testXXX() method... What is this Result
object, it is not part of Cactus?

-Vincent

> Thank you
> 
> Pavan.
> 
> -----Original Message-----
> From: Vincent Massol [mailto:vmassol@octo.com]
> Sent: Thursday, February 20, 2003 10:13 AM
> To: 'Cactus Users List'
> Cc: Pavan Aripirala Venkata
> Subject: RE: Cactus with load balancing in a clustered environment -
> Exception.
> 
> 
> 
> 
> > -----Original Message-----
> > From: Pavan Aripirala Venkata [mailto:pvenkata@h5technologies.com]
> > Sent: 20 February 2003 18:48
> > To: Cactus Users List
> > Subject: RE: Cactus with load balancing in a clustered environment -
> > Exception.
> >
> > 	Thanks Vincent, I did not know that there were two HTTP calls
> > during a cactus test run.
> > We did take care of the first issue which you mentioned.
> 
> The one with the unique id?
> 
> > 	Also this "Missing service name parameter" appears during the
> > first HTTP call right?
> > 	I wonder why the "Missing service name parameter" is reported as
> > a warning and not as an error.
> 
> Not, it's not normal and it is an error (not sure why you get this
error
> though). I don't know why the container does display it as an error
(The
> Cactus code throws a ServletException to the container). It has to be
a
> JBoss thingie.
> 
> -Vincent
> 
> > Thanks
> >
> > Pavan.
> >
> > -----Original Message-----
> > From: Vincent Massol [mailto:vmassol@octo.com]
> > Sent: Wednesday, February 19, 2003 12:07 AM
> > To: 'Cactus Users List'
> > Cc: Pavan Aripirala Venkata
> > Subject: RE: Cactus with load balancing in a clustered environment -
> > Exception.
> >
> >
> > 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.
> >
> > Thanks
> > -Vincent
> >
> >
> > > -----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
> > >
> >
>
org.apache.cactus.server.AbstractTestController.getServiceName(AbstrctTe
> > > stController.java:176)
> > >         at
> > >
> >
>
org.apache.cactus.server.AbstractTestController.handleRequest(AbstratTes
> > > tController.java:114)
> > >         at
> > >
> >
>
org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedrect
> > > or.java:134)
> > >         at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> > > 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
> > regular
> > > 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
> > use
> > > Java threading (home built code) to run multiple concurrent cactus
> > tests
> > > - I am not using the JUnit's ActiveTestSuite. I also make sure
that
> > the
> > > 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
> > that
> > > 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
> >
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> 



Mime
View raw message