Mike,

I got clustering working with seperate web-apps underneath the default
app. One thing I had to do (I'm not sure if my setup is the same as what
you're trying to do or not) was put the <cluster-config /> line into
-each- orion-web.xml file. For some reason, putting it in the global one
doesn't cluster the children. Another thing I had to do is put <web-app
application="default" name="testapp" load-on-startup="true" /> into the
default-web-site.xml. It doesn't look like you have the load-on-startup
part. Then, after all is configured, the startup looks like this...

HTTP-clustering service started...
Created cluster-listener for 230.0.0.1/230.0.0.1:9128 as 1316011313...
Adding clustering service 'defaultWebApp'...
HTTP-Clustering service initializing...
HTTP-Clustering sent "I want sessions" request...
HTTP-clustering service started...
Adding clustering service 'testapp'...
HTTP-Clustering service initializing...
HTTP-Clustering sent "I want sessions" request...
Created cluster-listener for 230.0.0.2/230.0.0.2:27512 as 1...
Adding clustering service 'islands'...
Orion/1.4.5 initialized

Of special importance is the part that is adding the clustering service
for 'testapp', and the part right below it where it sent "I want
sessions"

If you want, I can send you a tar file with all relevant config files.

Jeff Hubbach

"Mike N. Christoff" wrote:

> Hello.  This is just a friendly plea to those who have successfully
> clustered orion to contact me at Eldan Software.  We have already
> commited
> to using orion and currently have a *production* web application
> running off
> an orion server.  The client company has now asked us to add two more
> servers to serve their web application.
>
> At the time we went with orion we knew we would eventually have to
> cluster
> them.  From from reading the how-to doc and reading comments on how
> easy
> orion clustering is to set up we were confident we could promise the
> client
> we would cluster orion without having tested it :(.
>
> Now we are in the position that orion *is* clustering correctly *but
> only
> the default-web-app*.  It will not replicate session state for any
> other web
> applications setup in the default-web-site.xml file.  We followed the
> setup
> instructions to the letter:
>  STEPS TAKEN TO ENABLE
> CLUSTERING--------------------------------(NOTE: All of these steps
> were taken for both servers)
> 1) We tested our web app individually on our two test servers and they
> ran
> correctly.  We also added the <distributable /> tag to their web.xml
> files.
> 2) We added the <cluster-config/> tag to
> orion/application-deployments/default/defaultWebApp/orion-web.xml.
> According to the docs: "If you want to add clustering for the whole
> website
> (for all web-applications), edit the orion-web.xml of the default
> web-application...".  We are using orion 1.4.5, so according to the
> docs ALL
> of the web applications defined in default-web-site.xml should be
> clustered.
> 3)We added the cluster-island="1" to the default-web-site.xml file in
> the
> <web-site> tag.  Note that all the applications we are testing are
> defined
> in the default-web-site.xml, ie:
>
> <web-site host="ivan.eldan.com" port="8080" cluster-island="1"
> display-name="Default
> Orion WebSite">
> <frontend host="groovy.eldan.com" port="80" />
> <default-web-app application="default" name="defaultWebApp" />
> <web-app application="TestApp" name="TestApp-web" root="/TestApp" />
> <web-app application="Test2" name="Test2-web" root="/Test2" />
>
> Note that we also changed the 'host' attribute in the web-site tag
> from
> [ALL] to our actual hostname.
>
> 4) As you can see from step 3) we added the frontend-host tag with the
>
> location of the loadbalancer to the body of the <web-site> tag in
> default-web-site.xml
>
> 5,6) We started the load balancer on our server named "groovy" then
> started
> our other two servers.  The lodablancer successfully noticed our other
> two
> servers and added them to cluster island 1.
>
> 7) Lastly we tested the session replication using the
> servlets/SessionServlet servlet.  We modified the SessionServlet
> servlet,
> adding one line that posts the ip of the server its being run from.
> We then re-compiled the session servlet and to be safe, stopped the
> loadbalnce, stopped both orion servers, restarted the load-balancer
> and both
> servers (again, the load balancer found both servers).
> We then ran SessionServlet and found the ip was from server2, we
> refreshed
> the page until the counter went up to 5.  We then shut down server2
> and
> refreshed again, and lo-and-behold the counter went up to 6!  Yeah!
> We
> thought we were done with clustering.
>
> The Problem
> We then copied the code for SessionServlet into a JSP called
> session.jsp.
> We put the jsp in the TestApp-Web directory and tried the same test.
> THIS
> time the counter went back to 1 when we ran it.  This boggled us.  We
> then
> copied session.jsp into the directory orion/default-web-app and tried
> it.
> IT WORKED!!  We did not change a line of code.
>
> This is an exact recreation of our problem with orion session
> replication.
> We followed the docs exactly.  If you have gotten clustering to work
> properly, we would appreciate greatly if you could share your
> knowledge with
> us.  We are at an impasse and cannot figure out what to try next.
>
> Just for completeness, here is our server.xml file, perhaps we are
> missing a
> setting in this file(?)
>
> ...
> <application-server
> application-directory="../applications"
> deployment-directory="../application-deployments"
> >
> <rmi-config path="./rmi.xml" />
> <principals path="./principals.xml" />
> <log>
>   <file path="../log/server.log" />
> </log>
> <global-application name="default" path="application.xml" />
> <global-web-app-config path="global-web-application.xml" />
> <web-site path="./default-web-site.xml" />
> <application name="Test2" path="../applications/Test2/"
> auto-start="true"
> />
> <application name="TestApp" path="../applications/TestApp/"
> auto-start="true" />
> ...---------------------

--
Jeff Hubbach
Internet Developer
New Media Designs, Inc.
www.nmd.com




Reply via email to