WADI and jetty 6

View: New views
17 Messages — Rating Filter:   Alert me  

WADI and jetty 6

by Shunde Zhang :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I am new to WADI. I am not sure whether WADI is suitable to me.
What I want to do is to cluster multiple Jetty instances. I have an identical web app running on all of them.
Can I use WADI to distribute sessions across different Jetty instances?

If yes, how WADI work with Jetty? I had a look at the document on Jetty website but it is too brief.
I have many questions, e.g. is WADI a server I need to run before starting Jetty?
How can I manage WADI cluster? via web console?
Thanks for your help.

Regards,
Shunde Zhang
Australian Research Collaboration Services (ARCS), "Providing collaboration services and tools for the Australian research community"
eResearch SA (eRSA), "Enabling Discovery, Innovation and Collaboration through eResearch"
School of Computer Science, The University of Adelaide, "Life Impact"
Phone: +61 8 83038265







Re: WADI and jetty 6

by Gianny Damour-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Shunde,

WADI can cluster multiple Jetty instances whereby WADI can take care  
of replicating a configurable number of sessions to back-up Jetty  
instances to increase the resilience of sessions.

You don't need to run an independent server. The WADI integration  
provides a bean,  namely  
org.mortbay.jetty.servlet.wadi.WadiSessionManager, which takes care  
of starting and stopping the necessary WADI components for you.  
Configuring your jetty context as per the instructions there:

http://docs.codehaus.org/display/JETTY/Jetty+Clustering+with+WADI

will do the trick.


WADI provides a basic admin console, see

http://docs.codehaus.org/display/WADI/Home

, WADI Administration console, to perform basic monitoring activities.


If you need specific help to set-up your Web app with WADI, please  
post more specific questions and I will provide some guidance.


Thanks,
Gianny

On 28/05/2009, at 1:13 PM, Shunde Zhang wrote:

> Hi,
>
> I am new to WADI. I am not sure whether WADI is suitable to me.
> What I want to do is to cluster multiple Jetty instances. I have an  
> identical web app running on all of them.
> Can I use WADI to distribute sessions across different Jetty  
> instances?
>
> If yes, how WADI work with Jetty? I had a look at the document on  
> Jetty website but it is too brief.
> I have many questions, e.g. is WADI a server I need to run before  
> starting Jetty?
> How can I manage WADI cluster? via web console?
> Thanks for your help.
>
> Regards,
> Shunde Zhang
> Australian Research Collaboration Services (ARCS), "Providing  
> collaboration services and tools for the Australian research  
> community"
> Email: shunde.zhang@...
> eResearch SA (eRSA), "Enabling Discovery, Innovation and  
> Collaboration through eResearch"
> Email: shunde.zhang@...
> School of Computer Science, The University of Adelaide, "Life Impact"
> Email: shunde.zhang@...
> Phone: +61 8 83038265
>
>
>
>
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: WADI and jetty 6

by Shunde Zhang :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Gianny,

Thanks for the reply!

Actually I had a look at that document but it is not that detailed. I have lots of questions about that.

Firstly, I downloaded jetty-6.1.18 binary, but the WADI module in it is not a jar, I can only find some source code under contrib/wadi. I then tried to compile it with "mvn install" but failed on one of the tests. Can I get the jar file from somewhere?

Secondly, although the test failed, I can still get some class files. I packed them up with jar to a jar file, and placed it in $JETTY_HOME/lib/wadi, along with other jars from WADI 2.2.1 release. The following is a list of jars in my lib/wadi. Note that wadi.jar consists of classes from jetty wadi session manager module.
-rw-r--r-- 1 root root 326319 May 27 16:08 backport-util-concurrent-2.2.jar
-rw-r--r-- 1 root root 324238 May 27 16:07 cglib-nodep-2.1_3.jar
-rw-r--r-- 1 root root  52915 May 27 16:06 commons-logging-1.1.jar
-rw-r--r-- 1 root root  18980 May 27 16:07 juli-6.0.16.jar
-rw-r--r-- 1 root root 228175 May 27 16:05 tribes-6.0.16.jar
-rw-r--r-- 1 root root  87568 Jan 22 22:02 wadi-aop-2.1.1.jar
-rw-r--r-- 1 root root 453855 Jan 22 22:01 wadi-core-2.1.1.jar
-rw-r--r-- 1 root root  60801 Jan 22 21:58 wadi-group-2.1.1.jar
-rw-r--r-- 1 root root  21284 May 27 15:44 wadi.jar
-rw-r--r-- 1 root root  20976 Jan 22 22:05 wadi-tribes-2.1.1.jar

Thirdly, I wrote a config as described in the jetty doc.
<?xml version="1.0"  encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">

<Configure class="org.mortbay.jetty.webapp.WebAppContext">
  <Set name="contextPath">/</Set>
  <Set name="war"><SystemProperty name="jetty.home" default="."/>/webapps/root</Set>
  <Set name="extractWAR">false</Set>
  <Set name="copyWebDir">false</Set>
  <Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Set>

  <New id="wadiCluster" class="org.mortbay.jetty.servlet.wadi.WadiCluster">
    <Arg>CLUSTER</Arg>
    <Arg><SystemProperty name="node.name" default="red"/></Arg>
    <Arg>http://129.127.96.93:<SystemProperty name="jetty.port" default="8080"/>/</Arg>
    <Call name="start"/>
  </New>

  <Set name="SessionHandler">
    <New class="org.mortbay.jetty.servlet.wadi.WadiSessionHandler">
      <Arg>
<New id="wadiSessionManager" class="org.mortbay.jetty.servlet.wadi.WadiSessionManager">
          <Arg><Ref id="wadiCluster"/></Arg>
          <Arg type="int">2</Arg>
          <Arg type="int">24</Arg>
          <Arg type="int">360</Arg>
          <Arg type="boolean">true</Arg>
          <Arg type="boolean">false</Arg>
</New>
      </Arg>
    </New>
  </Set>

</Configure>

My web app is deployed at root (/). Then I tried to start it with:
java -Djetty.home=/opt/jetty -Djetty.port=7070 -Dnode.name=orange -Djava.net.preferIPv4Stack=true -jar start.jar etc/jetty-wadi-cluster.xml
 
Here I am not sure if I need to include etc/jetty.xml, which is what I have been using with start.jar.
OK. with the above command, I can start Jetty with WADI, and I got something like this:


2009-05-27 16:38:33.440::INFO:  Logging to STDERR via org.mortbay.log.StdErrLog
May 27, 2009 4:38:33 PM org.apache.catalina.tribes.transport.ReceiverBase bind
INFO: Receiver Server Socket bound to:/129.127.96.93:4002
May 27, 2009 4:38:33 PM org.codehaus.wadi.tribes.WadiMemberInterceptor start
INFO: memberStart local:org.apache.catalina.tribes.membership.MemberImpl[tcp://129.127.96.93:4002,129.127.96.93,4002, alive=0,id={-96 -39 10 -117 122 -42 67 -111 -113 -8 -46 36 33 11 7 -80 }, payload={-84 -19 0 5 115 114 0 50 111 ...(425)}, command={}, domain={67 76 85 83 84 69 82 }, ] notify:false peer:red
May 27, 2009 4:38:33 PM org.apache.catalina.tribes.membership.McastServiceImpl setupSocket
INFO: Setting cluster mcast soTimeout to 500
May 27, 2009 4:38:33 PM org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Sleeping for 1000 milliseconds to establish cluster membership, start level:4
May 27, 2009 4:38:33 PM org.codehaus.wadi.tribes.WadiMemberInterceptor memberAdded
INFO: memberAdded:tcp://{-127, 127, 96, 93}:4000
May 27, 2009 4:38:33 PM org.codehaus.wadi.tribes.WadiMemberInterceptor memberAdded
INFO: memberAdded:tcp://{-127, 127, 96, 93}:4001
May 27, 2009 4:38:34 PM org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Done sleeping, membership established, start level:4
May 27, 2009 4:38:34 PM org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Sleeping for 1000 milliseconds to establish cluster membership, start level:8
May 27, 2009 4:38:34 PM org.codehaus.wadi.tribes.WadiMemberInterceptor memberAdded
INFO: memberAdded:tcp://{-127, 127, 96, 93}:4002
May 27, 2009 4:38:34 PM org.codehaus.wadi.tribes.WadiMemberInterceptor memberAdded
INFO: memberAdded:tcp://{-127, 127, 96, 93}:4002
May 27, 2009 4:38:34 PM org.apache.catalina.tribes.io.BufferPool getBufferPool
INFO: Created a buffer pool with max size:104857600 bytes of type:org.apache.catalina.tribes.io.BufferPool15Impl
May 27, 2009 4:38:35 PM org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Done sleeping, membership established, start level:8
May 27, 2009 4:38:35 PM org.codehaus.wadi.tribes.WadiMemberInterceptor start
INFO: memberStart local:org.apache.catalina.tribes.membership.MemberImpl[tcp://129.127.96.93:4002,129.127.96.93,4002, alive=87,id={-96 -39 10 -117 122 -42 67 -111 -113 -8 -46 36 33 11 7 -80 }, payload={-84 -19 0 5 115 114 0 50 111 ...(425)}, command={}, domain={67 76 85 83 84 69 82 }, ] notify:false peer:red
May 27, 2009 4:38:35 PM org.codehaus.wadi.servicespace.basic.BasicSingletonServiceHolder onElection
INFO: [TribesPeer [red; tcp://129.127.96.93:4002]] owns singleton service [PartitionManager for ServiceSpace [/]]
May 27, 2009 4:38:35 PM org.codehaus.wadi.servicespace.basic.BasicSingletonServiceHolder onDismissal
INFO: [TribesPeer [red; tcp://129.127.96.93:4002]] resigns ownership of singleton service [PartitionManager for ServiceSpace [/]]
May 27, 2009 4:38:37 PM org.codehaus.wadi.location.balancing.BasicPartitionBalancerSingletonService queueRebalancing
INFO: Queueing partition rebalancing
May 27, 2009 4:38:37 PM org.codehaus.wadi.location.partitionmanager.SimplePartitionManager doOnPartitionBalancingInfoUpdate
INFO: 
=============================
New Partition Balancing
Partition Balancing
    Size [24]
    Partition[0] owned by [TribesPeer [red; tcp://{-127, 127, 96, 93}:4002]]; version [3]; mergeVersion [0]
    Partition[1] owned by [TribesPeer [red; tcp://{-127, 127, 96, 93}:4002]]; version [3]; mergeVersion [0]
    Partition[2] owned by [TribesPeer [red; tcp://{-127, 127, 96, 93}:4002]]; version [3]; mergeVersion [0]
    Partition[3] owned by [TribesPeer [red; tcp://{-127, 127, 96, 93}:4002]]; version [3]; mergeVersion [0]
    Partition[4] owned by [TribesPeer [yellow; tcp://129.127.96.93:4001]]; version [3]; mergeVersion [0]
    Partition[5] owned by [TribesPeer [yellow; tcp://129.127.96.93:4001]]; version [3]; mergeVersion [0]
    Partition[6] owned by [TribesPeer [yellow; tcp://129.127.96.93:4001]]; version [3]; mergeVersion [0]
    Partition[7] owned by [TribesPeer [yellow; tcp://129.127.96.93:4001]]; version [3]; mergeVersion [0]
    Partition[8] owned by [TribesPeer [yellow; tcp://129.127.96.93:4001]]; version [3]; mergeVersion [0]
    Partition[9] owned by [TribesPeer [yellow; tcp://129.127.96.93:4001]]; version [3]; mergeVersion [0]
    Partition[10] owned by [TribesPeer [yellow; tcp://129.127.96.93:4001]]; version [3]; mergeVersion [0]
    Partition[11] owned by [TribesPeer [yellow; tcp://129.127.96.93:4001]]; version [3]; mergeVersion [0]
    Partition[12] owned by [TribesPeer [red; tcp://{-127, 127, 96, 93}:4002]]; version [3]; mergeVersion [0]
    Partition[13] owned by [TribesPeer [red; tcp://{-127, 127, 96, 93}:4002]]; version [3]; mergeVersion [0]
    Partition[14] owned by [TribesPeer [red; tcp://{-127, 127, 96, 93}:4002]]; version [3]; mergeVersion [0]
    Partition[15] owned by [TribesPeer [red; tcp://{-127, 127, 96, 93}:4002]]; version [3]; mergeVersion [0]
    Partition[16] owned by [TribesPeer [orange; tcp://{-127, 127, 96, 93}:4000]]; version [3]; mergeVersion [0]
    Partition[17] owned by [TribesPeer [orange; tcp://{-127, 127, 96, 93}:4000]]; version [3]; mergeVersion [0]
    Partition[18] owned by [TribesPeer [orange; tcp://{-127, 127, 96, 93}:4000]]; version [3]; mergeVersion [0]
    Partition[19] owned by [TribesPeer [orange; tcp://{-127, 127, 96, 93}:4000]]; version [3]; mergeVersion [0]
    Partition[20] owned by [TribesPeer [orange; tcp://{-127, 127, 96, 93}:4000]]; version [3]; mergeVersion [0]
    Partition[21] owned by [TribesPeer [orange; tcp://{-127, 127, 96, 93}:4000]]; version [3]; mergeVersion [0]
    Partition[22] owned by [TribesPeer [orange; tcp://{-127, 127, 96, 93}:4000]]; version [3]; mergeVersion [0]
    Partition[23] owned by [TribesPeer [orange; tcp://{-127, 127, 96, 93}:4000]]; version [3]; mergeVersion [0]
=============================

And I started 2 more, with different jettty.port number, but I didn't see them listening on that port.
They seems to listen on port starting from 4000, then 4001, 4002.
At this point, I don't know what I can do next...

Do you know what is happening? Thanks for your help.

Regards,
Shunde Zhang
Australian Research Collaboration Services (ARCS), "Providing collaboration services and tools for the Australian research community"
eResearch SA (eRSA), "Enabling Discovery, Innovation and Collaboration through eResearch"
School of Computer Science, The University of Adelaide, "Life Impact"
Phone: +61 8 83038265






On 28/05/2009, at 9:26 PM, Gianny Damour wrote:

Hi Shunde,

WADI can cluster multiple Jetty instances whereby WADI can take care of replicating a configurable number of sessions to back-up Jetty instances to increase the resilience of sessions.

You don't need to run an independent server. The WADI integration provides a bean,  namely org.mortbay.jetty.servlet.wadi.WadiSessionManager, which takes care of starting and stopping the necessary WADI components for you. Configuring your jetty context as per the instructions there:

http://docs.codehaus.org/display/JETTY/Jetty+Clustering+with+WADI

will do the trick.


WADI provides a basic admin console, see

http://docs.codehaus.org/display/WADI/Home

, WADI Administration console, to perform basic monitoring activities.


If you need specific help to set-up your Web app with WADI, please post more specific questions and I will provide some guidance.


Thanks,
Gianny

On 28/05/2009, at 1:13 PM, Shunde Zhang wrote:

Hi,

I am new to WADI. I am not sure whether WADI is suitable to me.
What I want to do is to cluster multiple Jetty instances. I have an identical web app running on all of them.
Can I use WADI to distribute sessions across different Jetty instances?

If yes, how WADI work with Jetty? I had a look at the document on Jetty website but it is too brief.
I have many questions, e.g. is WADI a server I need to run before starting Jetty?
How can I manage WADI cluster? via web console?
Thanks for your help.

Regards,
Shunde Zhang
Australian Research Collaboration Services (ARCS), "Providing collaboration services and tools for the Australian research community"
Email: shunde.zhang@...
eResearch SA (eRSA), "Enabling Discovery, Innovation and Collaboration through eResearch"
Email: shunde.zhang@...
School of Computer Science, The University of Adelaide, "Life Impact"
Email: shunde.zhang@...
Phone: +61 8 83038265








---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email




Parent Message unknown Re: Re: WADI and jetty 6

by Gianny Damour-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Shunde,

As a matter of fact, you now have a cluster of 3 Jetty instances.

The ports, 4000, 4001 and 4002, are the ports used by WADI for message exchanges betwee your nodes red, yellow and orange.


Based on the command you used to start Jetty:

java -Djetty.home=/opt/jetty -Djetty.port=7070 -Dnode.name=orange -Djava.net.preferIPv4Stack=true -jar start.jar etc/jetty-wadi-cluster.xml

The orange node is listening on the port 7070 (value of the jetty.port system property). You can point your browser to this URL:

http://localhost:7070/

to see your web-app on this node. Simply replace 7070 with the relevant value to see your Web app on the other Jetty instances.

Each time that a HTTP session is created by your Web application, it will be replicated to at most 2 other nodes. 2 is the value of the second constructor parameter of WadiSessionManager:

> <New id="wadiSessionManager"  
> class="org.mortbay.jetty.servlet.wadi.WadiSessionManager">
>            <Arg><Ref id="wadiCluster"/></Arg>
>            <Arg type="int">2</Arg>
>            <Arg type="int">24</Arg>
>            <Arg type="int">360</Arg>
>            <Arg type="boolean">true</Arg>
>            <Arg type="boolean">false</Arg>
> </New>


To check that your cluster is working fine, and based on the logs it is, you can do somethink like this:

1. create a session on your orange node (url is http://localhost:7070/)
2. point your browser to the URL of another node, say http://localhost:7071/ assuming you used 7071, and as you can see the session state is retained (WADI has migrated the session state from orange to the node listening on 7071).

Thanks,
Gianny

> Shunde Zhang <shunde.zhang@...> wrote:
>
> Hi Gianny,
>
> Thanks for the reply!
>
> Actually I had a look at that document but it is not that detailed. I  
> have lots of questions about that.
>
> Firstly, I downloaded jetty-6.1.18 binary, but the WADI module in it  
> is not a jar, I can only find some source code under contrib/wadi. I  
> then tried to compile it with "mvn install" but failed on one of the  
> tests. Can I get the jar file from somewhere?
>
> Secondly, although the test failed, I can still get some class files.  
> I packed them up with jar to a jar file, and placed it in $JETTY_HOME/
> lib/wadi, along with other jars from WADI 2.2.1 release. The following  
> is a list of jars in my lib/wadi. Note that wadi.jar consists of  
> classes from jetty wadi session manager module.
> -rw-r--r-- 1 root root 326319 May 27 16:08 backport-util-
> concurrent-2.2.jar
> -rw-r--r-- 1 root root 324238 May 27 16:07 cglib-nodep-2.1_3.jar
> -rw-r--r-- 1 root root  52915 May 27 16:06 commons-logging-1.1.jar
> -rw-r--r-- 1 root root  18980 May 27 16:07 juli-6.0.16.jar
> -rw-r--r-- 1 root root 228175 May 27 16:05 tribes-6.0.16.jar
> -rw-r--r-- 1 root root  87568 Jan 22 22:02 wadi-aop-2.1.1.jar
> -rw-r--r-- 1 root root 453855 Jan 22 22:01 wadi-core-2.1.1.jar
> -rw-r--r-- 1 root root  60801 Jan 22 21:58 wadi-group-2.1.1.jar
> -rw-r--r-- 1 root root  21284 May 27 15:44 wadi.jar
> -rw-r--r-- 1 root root  20976 Jan 22 22:05 wadi-tribes-2.1.1.jar
>
> Thirdly, I wrote a config as described in the jetty doc.
> <?xml version="1.0"  encoding="ISO-8859-1"?>
> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN"  
> "http://jetty.mortbay.org/configure.dtd">
>
> <Configure class="org.mortbay.jetty.webapp.WebAppContext">
>    <Set name="contextPath">/</Set>
>    <Set name="war"><SystemProperty name="jetty.home" default="."/>/
> webapps/root</Set>
>    <Set name="extractWAR">false</Set>
>    <Set name="copyWebDir">false</Set>
>    <Set name="defaultsDescriptor"><SystemProperty name="jetty.home"  
> default="."/>/etc/webdefault.xml</Set>
>
>    <New id="wadiCluster"  
> class="org.mortbay.jetty.servlet.wadi.WadiCluster">
>      <Arg>CLUSTER</Arg>
>      <Arg><SystemProperty name="node.name" default="red"/></Arg>
>      <Arg>http://129.127.96.93:<SystemProperty name="jetty.port"  
> default="8080"/>/</Arg>
>      <Call name="start"/>
>    </New>
>
>    <Set name="SessionHandler">
>      <New class="org.mortbay.jetty.servlet.wadi.WadiSessionHandler">
>        <Arg>
> <New id="wadiSessionManager"  
> class="org.mortbay.jetty.servlet.wadi.WadiSessionManager">
>            <Arg><Ref id="wadiCluster"/></Arg>
>            <Arg type="int">2</Arg>
>            <Arg type="int">24</Arg>
>            <Arg type="int">360</Arg>
>            <Arg type="boolean">true</Arg>
>            <Arg type="boolean">false</Arg>
> </New>
>        </Arg>
>      </New>
>    </Set>
>
> </Configure>
>
> My web app is deployed at root (/). Then I tried to start it with:
> java -Djetty.home=/opt/jetty -Djetty.port=7070 -Dnode.name=orange -
> Djava.net.preferIPv4Stack=true -jar start.jar etc/jetty-wadi-cluster.xml
>
> Here I am not sure if I need to include etc/jetty.xml, which is what I  
> have been using with start.jar.
> OK. with the above command, I can start Jetty with WADI, and I got  
> something like this:
>
>
> 2009-05-27 16:38:33.440::INFO:  Logging to STDERR via  
> org.mortbay.log.StdErrLog
> May 27, 2009 4:38:33 PM  
> org.apache.catalina.tribes.transport.ReceiverBase bind
> INFO: Receiver Server Socket bound to:/129.127.96.93:4002
> May 27, 2009 4:38:33 PM org.codehaus.wadi.tribes.WadiMemberInterceptor  
> start
> INFO: memberStart  
> local:org.apache.catalina.tribes.membership.MemberImpl[tcp://
> 129.127.96.93:4002,129.127.96.93,4002, alive=0,id={-96 -39 10 -117 122  
> -42 67 -111 -113 -8 -46 36 33 11 7 -80 }, payload={-84 -19 0 5 115 114  
> 0 50 111 ...(425)}, command={}, domain={67 76 85 83 84 69 82 }, ]  
> notify:false peer:red
> May 27, 2009 4:38:33 PM  
> org.apache.catalina.tribes.membership.McastServiceImpl setupSocket
> INFO: Setting cluster mcast soTimeout to 500
> May 27, 2009 4:38:33 PM  
> org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
> INFO: Sleeping for 1000 milliseconds to establish cluster membership,  
> start level:4
> May 27, 2009 4:38:33 PM org.codehaus.wadi.tribes.WadiMemberInterceptor  
> memberAdded
> INFO: memberAdded:tcp://{-127, 127, 96, 93}:4000
> May 27, 2009 4:38:33 PM org.codehaus.wadi.tribes.WadiMemberInterceptor  
> memberAdded
> INFO: memberAdded:tcp://{-127, 127, 96, 93}:4001
> May 27, 2009 4:38:34 PM  
> org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
> INFO: Done sleeping, membership established, start level:4
> May 27, 2009 4:38:34 PM  
> org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
> INFO: Sleeping for 1000 milliseconds to establish cluster membership,  
> start level:8
> May 27, 2009 4:38:34 PM org.codehaus.wadi.tribes.WadiMemberInterceptor  
> memberAdded
> INFO: memberAdded:tcp://{-127, 127, 96, 93}:4002
> May 27, 2009 4:38:34 PM org.codehaus.wadi.tribes.WadiMemberInterceptor  
> memberAdded
> INFO: memberAdded:tcp://{-127, 127, 96, 93}:4002
> May 27, 2009 4:38:34 PM org.apache.catalina.tribes.io.BufferPool  
> getBufferPool
> INFO: Created a buffer pool with max size:104857600 bytes of  
> type:org.apache.catalina.tribes.io.BufferPool15Impl
> May 27, 2009 4:38:35 PM  
> org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
> INFO: Done sleeping, membership established, start level:8
> May 27, 2009 4:38:35 PM org.codehaus.wadi.tribes.WadiMemberInterceptor  
> start
> INFO: memberStart  
> local:org.apache.catalina.tribes.membership.MemberImpl[tcp://
> 129.127.96.93:4002,129.127.96.93,4002, alive=87,id={-96 -39 10 -117  
> 122 -42 67 -111 -113 -8 -46 36 33 11 7 -80 }, payload={-84 -19 0 5 115  
> 114 0 50 111 ...(425)}, command={}, domain={67 76 85 83 84 69 82 }, ]  
> notify:false peer:red
> May 27, 2009 4:38:35 PM  
> org.codehaus.wadi.servicespace.basic.BasicSingletonServiceHolder  
> onElection
> INFO: [TribesPeer [red; tcp://129.127.96.93:4002]] owns singleton  
> service [PartitionManager for ServiceSpace [/]]
> May 27, 2009 4:38:35 PM  
> org.codehaus.wadi.servicespace.basic.BasicSingletonServiceHolder  
> onDismissal
> INFO: [TribesPeer [red; tcp://129.127.96.93:4002]] resigns ownership  
> of singleton service [PartitionManager for ServiceSpace [/]]
> May 27, 2009 4:38:37 PM  
> org
> .codehaus
> .wadi.location.balancing.BasicPartitionBalancerSingletonService  
> queueRebalancing
> INFO: Queueing partition rebalancing
> May 27, 2009 4:38:37 PM  
> org.codehaus.wadi.location.partitionmanager.SimplePartitionManager  
> doOnPartitionBalancingInfoUpdate
> INFO:
> =============================
> New Partition Balancing
> Partition Balancing
>      Size [24]
>      Partition[0] owned by [TribesPeer [red; tcp://{-127, 127, 96, 93}:
> 4002]]; version [3]; mergeVersion [0]
>      Partition[1] owned by [TribesPeer [red; tcp://{-127, 127, 96, 93}:
> 4002]]; version [3]; mergeVersion [0]
>      Partition[2] owned by [TribesPeer [red; tcp://{-127, 127, 96, 93}:
> 4002]]; version [3]; mergeVersion [0]
>      Partition[3] owned by [TribesPeer [red; tcp://{-127, 127, 96, 93}:
> 4002]]; version [3]; mergeVersion [0]
>      Partition[4] owned by [TribesPeer [yellow; tcp://
> 129.127.96.93:4001]]; version [3]; mergeVersion [0]
>      Partition[5] owned by [TribesPeer [yellow; tcp://
> 129.127.96.93:4001]]; version [3]; mergeVersion [0]
>      Partition[6] owned by [TribesPeer [yellow; tcp://
> 129.127.96.93:4001]]; version [3]; mergeVersion [0]
>      Partition[7] owned by [TribesPeer [yellow; tcp://
> 129.127.96.93:4001]]; version [3]; mergeVersion [0]
>      Partition[8] owned by [TribesPeer [yellow; tcp://
> 129.127.96.93:4001]]; version [3]; mergeVersion [0]
>      Partition[9] owned by [TribesPeer [yellow; tcp://
> 129.127.96.93:4001]]; version [3]; mergeVersion [0]
>      Partition[10] owned by [TribesPeer [yellow; tcp://
> 129.127.96.93:4001]]; version [3]; mergeVersion [0]
>      Partition[11] owned by [TribesPeer [yellow; tcp://
> 129.127.96.93:4001]]; version [3]; mergeVersion [0]
>      Partition[12] owned by [TribesPeer [red; tcp://{-127, 127, 96,  
> 93}:4002]]; version [3]; mergeVersion [0]
>      Partition[13] owned by [TribesPeer [red; tcp://{-127, 127, 96,  
> 93}:4002]]; version [3]; mergeVersion [0]
>      Partition[14] owned by [TribesPeer [red; tcp://{-127, 127, 96,  
> 93}:4002]]; version [3]; mergeVersion [0]
>      Partition[15] owned by [TribesPeer [red; tcp://{-127, 127, 96,  
> 93}:4002]]; version [3]; mergeVersion [0]
>      Partition[16] owned by [TribesPeer [orange; tcp://{-127, 127, 96,  
> 93}:4000]]; version [3]; mergeVersion [0]
>      Partition[17] owned by [TribesPeer [orange; tcp://{-127, 127, 96,  
> 93}:4000]]; version [3]; mergeVersion [0]
>      Partition[18] owned by [TribesPeer [orange; tcp://{-127, 127, 96,  
> 93}:4000]]; version [3]; mergeVersion [0]
>      Partition[19] owned by [TribesPeer [orange; tcp://{-127, 127, 96,  
> 93}:4000]]; version [3]; mergeVersion [0]
>      Partition[20] owned by [TribesPeer [orange; tcp://{-127, 127, 96,  
> 93}:4000]]; version [3]; mergeVersion [0]
>      Partition[21] owned by [TribesPeer [orange; tcp://{-127, 127, 96,  
> 93}:4000]]; version [3]; mergeVersion [0]
>      Partition[22] owned by [TribesPeer [orange; tcp://{-127, 127, 96,  
> 93}:4000]]; version [3]; mergeVersion [0]
>      Partition[23] owned by [TribesPeer [orange; tcp://{-127, 127, 96,  
> 93}:4000]]; version [3]; mergeVersion [0]
> =============================
>
> And I started 2 more, with different jettty.port number, but I didn't  
> see them listening on that port.
> They seems to listen on port starting from 4000, then 4001, 4002.
> At this point, I don't know what I can do next...
>
> Do you know what is happening? Thanks for your help.
>
> Regards,
> Shunde Zhang
> Australian Research Collaboration Services (ARCS), "Providing  
> collaboration services and tools for the Australian research community"
> Email: shunde.zhang@...
> eResearch SA (eRSA), "Enabling Discovery, Innovation and Collaboration  
> through eResearch"
> Email: shunde.zhang@...
> School of Computer Science, The University of Adelaide, "Life Impact"
> Email: shunde.zhang@...
> Phone: +61 8 83038265
>
>
>
>
>
>
> On 28/05/2009, at 9:26 PM, Gianny Damour wrote:
>
> > Hi Shunde,
> >
> > WADI can cluster multiple Jetty instances whereby WADI can take care  
> > of replicating a configurable number of sessions to back-up Jetty  
> > instances to increase the resilience of sessions.
> >
> > You don't need to run an independent server. The WADI integration  
> > provides a bean,  namely  
> > org.mortbay.jetty.servlet.wadi.WadiSessionManager, which takes care  
> > of starting and stopping the necessary WADI components for you.  
> > Configuring your jetty context as per the instructions there:
> >
> > http://docs.codehaus.org/display/JETTY/Jetty+Clustering+with+WADI
> >
> > will do the trick.
> >
> >
> > WADI provides a basic admin console, see
> >
> > http://docs.codehaus.org/display/WADI/Home
> >
> > , WADI Administration console, to perform basic monitoring activities.
> >
> >
> > If you need specific help to set-up your Web app with WADI, please  
> > post more specific questions and I will provide some guidance.
> >
> >
> > Thanks,
> > Gianny
> >
> > On 28/05/2009, at 1:13 PM, Shunde Zhang wrote:
> >
> >> Hi,
> >>
> >> I am new to WADI. I am not sure whether WADI is suitable to me.
> >> What I want to do is to cluster multiple Jetty instances. I have an  
> >> identical web app running on all of them.
> >> Can I use WADI to distribute sessions across different Jetty  
> >> instances?
> >>
> >> If yes, how WADI work with Jetty? I had a look at the document on  
> >> Jetty website but it is too brief.
> >> I have many questions, e.g. is WADI a server I need to run before  
> >> starting Jetty?
> >> How can I manage WADI cluster? via web console?
> >> Thanks for your help.
> >>
> >> Regards,
> >> Shunde Zhang
> >> Australian Research Collaboration Services (ARCS), "Providing  
> >> collaboration services and tools for the Australian research  
> >> community"
> >> Email: shunde.zhang@...
> >> eResearch SA (eRSA), "Enabling Discovery, Innovation and  
> >> Collaboration through eResearch"
> >> Email: shunde.zhang@...
> >> School of Computer Science, The University of Adelaide, "Life Impact"
> >> Email: shunde.zhang@...
> >> Phone: +61 8 83038265
> >>
> >>
> >>
> >>
> >>
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe from this list, please visit:
> >
> >   http://xircles.codehaus.org/manage_email
> >
> >

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: WADI and jetty 6

by Shunde Zhang :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Gianny,

There is nothing in http://myserver:7070/

Do I need to include the previous jetty.xml?
e.g.

java -Djetty.home=/opt/jetty -Djetty.port=7070 -Dnode.name=orange -Djava.net.preferIPv4Stack=true -jar start.jar etc/jetty.xml etc/jetty-wadi-cluster.xml


Regards,
Shunde Zhang
Australian Research Collaboration Services (ARCS), "Providing collaboration services and tools for the Australian research community"
eResearch SA (eRSA), "Enabling Discovery, Innovation and Collaboration through eResearch"
School of Computer Science, The University of Adelaide, "Life Impact"
Phone: +61 8 83038265






On 29/05/2009, at 12:27 PM, gianny.damour@... wrote:

java -Djetty.home=/opt/jetty -Djetty.port=7070 -Dnode.name=orange -Djava.net.preferIPv4Stack=true -jar start.jar etc/jetty-wadi-cluster.xml


Parent Message unknown Re: WADI and jetty 6

by Gianny Damour-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Shunde,

You should start your server the way you use to start it. If you were using etc/jetty.xml, then continue to use this Jetty server configuration to start Jetty.

When you package your application for deployment to Jetty, you need to configure your application to use WADI. Basically, you need to include a file WEB-INF/jetty-web.xml in your module (beside your web.xml deployment descriptor). This file looks like the file you previously posted.

The instructions after the code snippet on this page:

http://docs.codehaus.org/display/JETTY/Jetty+Clustering+with+WADI

indicate how to do the same thing by dropping a new context xml config file in the contexts directory of Jetty.

Thanks,
Gianny

> Shunde Zhang <shunde.zhang@...> wrote:
>
> Hi Gianny,
>
> There is nothing in http://myserver:7070/
>
> Do I need to include the previous jetty.xml?
> e.g.
>
> java -Djetty.home=/opt/jetty -Djetty.port=7070 -Dnode.name=orange -
> Djava.net.preferIPv4Stack=true -jar start.jar etc/jetty.xml etc/jetty-
> wadi-cluster.xml
>
>
> Regards,
> Shunde Zhang
> Australian Research Collaboration Services (ARCS), "Providing  
> collaboration services and tools for the Australian research community"
> Email: shunde.zhang@...
> eResearch SA (eRSA), "Enabling Discovery, Innovation and Collaboration  
> through eResearch"
> Email: shunde.zhang@...
> School of Computer Science, The University of Adelaide, "Life Impact"
> Email: shunde.zhang@...
> Phone: +61 8 83038265
>
>
>
>
>
>
> On 29/05/2009, at 12:27 PM, gianny.damour@... wrote:
>
> > java -Djetty.home=/opt/jetty -Djetty.port=7070 -Dnode.name=orange -
> > Djava.net.preferIPv4Stack=true -jar start.jar etc/jetty-wadi-
> > cluster.xml

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: WADI and jetty 6

by Shunde Zhang :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Gianny,

If I use ContextDeployer, do I still need to use 

    <Call name="addLifeCycle">
      <Arg>
        <New class="org.mortbay.jetty.deployer.WebAppDeployer">
          <Set name="contexts"><Ref id="Contexts"/></Set>
          <Set name="webAppDir"><SystemProperty name="jetty.home" default="."/>/webapps</Set>
                  <Set name="parentLoaderPriority">false</Set>
                  <Set name="extract">true</Set>
                  <Set name="allowDuplicates">false</Set>
          <Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Set>
        </New>
      </Arg>
    </Call>

This is what I am using now.

Regards,
Shunde Zhang
Australian Research Collaboration Services (ARCS), "Providing collaboration services and tools for the Australian research community"
eResearch SA (eRSA), "Enabling Discovery, Innovation and Collaboration through eResearch"
School of Computer Science, The University of Adelaide, "Life Impact"
Phone: +61 8 83038265






On 29/05/2009, at 3:47 PM, gianny.damour@... wrote:

Hi Shunde,

You should start your server the way you use to start it. If you were using etc/jetty.xml, then continue to use this Jetty server configuration to start Jetty.

When you package your application for deployment to Jetty, you need to configure your application to use WADI. Basically, you need to include a file WEB-INF/jetty-web.xml in your module (beside your web.xml deployment descriptor). This file looks like the file you previously posted.

The instructions after the code snippet on this page:

http://docs.codehaus.org/display/JETTY/Jetty+Clustering+with+WADI

indicate how to do the same thing by dropping a new context xml config file in the contexts directory of Jetty.

Thanks,
Gianny

Shunde Zhang <shunde.zhang@...> wrote:

Hi Gianny,

There is nothing in http://myserver:7070/

Do I need to include the previous jetty.xml?
e.g.

java -Djetty.home=/opt/jetty -Djetty.port=7070 -Dnode.name=orange -
Djava.net.preferIPv4Stack=true -jar start.jar etc/jetty.xml etc/jetty-
wadi-cluster.xml


Regards,
Shunde Zhang
Australian Research Collaboration Services (ARCS), "Providing  
collaboration services and tools for the Australian research community"
Email: shunde.zhang@...
eResearch SA (eRSA), "Enabling Discovery, Innovation and Collaboration  
through eResearch"
Email: shunde.zhang@...
School of Computer Science, The University of Adelaide, "Life Impact"
Email: shunde.zhang@...
Phone: +61 8 83038265






On 29/05/2009, at 12:27 PM, gianny.damour@... wrote:

java -Djetty.home=/opt/jetty -Djetty.port=7070 -Dnode.name=orange -
Djava.net.preferIPv4Stack=true -jar start.jar etc/jetty-wadi-
cluster.xml

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Re: WADI and jetty 6

by Shunde Zhang :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Gianny,

I think I made it work, then how can I open the admin console?
Can I know how many attributes are shared? Can I know the value of them?


Regards,
Shunde Zhang
Australian Research Collaboration Services (ARCS), "Providing collaboration services and tools for the Australian research community"
eResearch SA (eRSA), "Enabling Discovery, Innovation and Collaboration through eResearch"
School of Computer Science, The University of Adelaide, "Life Impact"
Phone: +61 8 83038265






On 29/05/2009, at 3:47 PM, gianny.damour@... wrote:

Hi Shunde,

You should start your server the way you use to start it. If you were using etc/jetty.xml, then continue to use this Jetty server configuration to start Jetty.

When you package your application for deployment to Jetty, you need to configure your application to use WADI. Basically, you need to include a file WEB-INF/jetty-web.xml in your module (beside your web.xml deployment descriptor). This file looks like the file you previously posted.

The instructions after the code snippet on this page:

http://docs.codehaus.org/display/JETTY/Jetty+Clustering+with+WADI

indicate how to do the same thing by dropping a new context xml config file in the contexts directory of Jetty.

Thanks,
Gianny

Shunde Zhang <shunde.zhang@...> wrote:

Hi Gianny,

There is nothing in http://myserver:7070/

Do I need to include the previous jetty.xml?
e.g.

java -Djetty.home=/opt/jetty -Djetty.port=7070 -Dnode.name=orange -
Djava.net.preferIPv4Stack=true -jar start.jar etc/jetty.xml etc/jetty-
wadi-cluster.xml


Regards,
Shunde Zhang
Australian Research Collaboration Services (ARCS), "Providing  
collaboration services and tools for the Australian research community"
Email: shunde.zhang@...
eResearch SA (eRSA), "Enabling Discovery, Innovation and Collaboration  
through eResearch"
Email: shunde.zhang@...
School of Computer Science, The University of Adelaide, "Life Impact"
Email: shunde.zhang@...
Phone: +61 8 83038265






On 29/05/2009, at 12:27 PM, gianny.damour@... wrote:

java -Djetty.home=/opt/jetty -Djetty.port=7070 -Dnode.name=orange -
Djava.net.preferIPv4Stack=true -jar start.jar etc/jetty-wadi-
cluster.xml

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Re: WADI and jetty 6

by Gianny Damour-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Shunde,

Good to hear that you get it to work.

WADi provides an independent administration console, wadi-console,  
that you can download from here:

http://wadi.codehaus.org/ (choose the wadi-console artifact).


This is a standard Web application to be deployed to one of your  
clustered Jetty instances.  It can be used to monitor cluster  
memberships, clustered Web applications, sessions, their locations,  
the distribution of partition indexes  and message exchange rates.  
Look at the page

http://docs.codehaus.org/display/WADI/Home

and browse the WADI Administration Console links for more details.


The WADI console is a very thin user interface which builds upon an  
admin API using the command pattern to execute distributed operations  
on each cluster node (kind of map-reduce pattern). It is very easy to  
add new commands to say show the attributes of a given session.

Have a look at the WIKI and let me know if you require specific  
features.

Thanks,
Gianny


On 29/05/2009, at 5:05 PM, Shunde Zhang wrote:

> Hi Gianny,
>
> I think I made it work, then how can I open the admin console?
> Can I know how many attributes are shared? Can I know the value of  
> them?
>
>
> Regards,
> Shunde Zhang
> Australian Research Collaboration Services (ARCS), "Providing  
> collaboration services and tools for the Australian research  
> community"
> Email: shunde.zhang@...
> eResearch SA (eRSA), "Enabling Discovery, Innovation and  
> Collaboration through eResearch"
> Email: shunde.zhang@...
> School of Computer Science, The University of Adelaide, "Life Impact"
> Email: shunde.zhang@...
> Phone: +61 8 83038265
>
>
>
>
>
>
> On 29/05/2009, at 3:47 PM, gianny.damour@... wrote:
>
>> Hi Shunde,
>>
>> You should start your server the way you use to start it. If you  
>> were using etc/jetty.xml, then continue to use this Jetty server  
>> configuration to start Jetty.
>>
>> When you package your application for deployment to Jetty, you  
>> need to configure your application to use WADI. Basically, you  
>> need to include a file WEB-INF/jetty-web.xml in your module  
>> (beside your web.xml deployment descriptor). This file looks like  
>> the file you previously posted.
>>
>> The instructions after the code snippet on this page:
>>
>> http://docs.codehaus.org/display/JETTY/Jetty+Clustering+with+WADI
>>
>> indicate how to do the same thing by dropping a new context xml  
>> config file in the contexts directory of Jetty.
>>
>> Thanks,
>> Gianny
>>
>>> Shunde Zhang <shunde.zhang@...> wrote:
>>>
>>> Hi Gianny,
>>>
>>> There is nothing in http://myserver:7070/
>>>
>>> Do I need to include the previous jetty.xml?
>>> e.g.
>>>
>>> java -Djetty.home=/opt/jetty -Djetty.port=7070 -Dnode.name=orange -
>>> Djava.net.preferIPv4Stack=true -jar start.jar etc/jetty.xml etc/
>>> jetty-
>>> wadi-cluster.xml
>>>
>>>
>>> Regards,
>>> Shunde Zhang
>>> Australian Research Collaboration Services (ARCS), "Providing
>>> collaboration services and tools for the Australian research  
>>> community"
>>> Email: shunde.zhang@...
>>> eResearch SA (eRSA), "Enabling Discovery, Innovation and  
>>> Collaboration
>>> through eResearch"
>>> Email: shunde.zhang@...
>>> School of Computer Science, The University of Adelaide, "Life  
>>> Impact"
>>> Email: shunde.zhang@...
>>> Phone: +61 8 83038265
>>>
>>>
>>>
>>>
>>>
>>>
>>> On 29/05/2009, at 12:27 PM, gianny.damour@... wrote:
>>>
>>>> java -Djetty.home=/opt/jetty -Djetty.port=7070 -Dnode.name=orange -
>>>> Djava.net.preferIPv4Stack=true -jar start.jar etc/jetty-wadi-
>>>> cluster.xml
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: WADI and jetty 6

by Shunde Zhang :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Gianny,

I tried to start jetty with wadi-console war but I got:

2009-06-03 10:13:33.392::INFO:  Extract jar:file:/opt/davis1/wadi-console-2.1.1.war!/ to /tmp/Jetty_0_0_0_0_8080_wadi.console.2.1.1.war____.2gu4c1/webapp
2009-06-03 10:13:34.589::INFO:  NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet
Jun 3, 2009 10:13:35 AM org.codehaus.wadi.servicespace.basic.BasicSingletonServiceHolder onElection
INFO: [TribesPeer [jetty1; tcp://129.127.96.93:4001]] owns singleton service [PartitionManager for ServiceSpace [/]]
Jun 3, 2009 10:13:37 AM org.codehaus.wadi.group.impl.BasicEnvelopeDispatcherManager$DispatchRunner run
SEVERE: problem dispatching message
java.lang.ClassCastException: org.codehaus.wadi.servicespace.ServiceName cannot be cast to org.codehaus.wadi.servicespace.ServiceName
        at org.codehaus.wadi.servicespace.basic.EnvelopeServiceHelper.getServiceName(EnvelopeServiceHelper.java:35)
        at org.codehaus.wadi.servicespace.basic.ServiceInvocationListener.testDispatchEnvelope(ServiceInvocationListener.java:68)
        at org.codehaus.wadi.group.impl.ServiceEndpointWrapper.testDispatchEnvelope(ServiceEndpointWrapper.java:58)
        at org.codehaus.wadi.group.impl.BasicEnvelopeDispatcherManager.onEnvelope(BasicEnvelopeDispatcherManager.java:88)
        at org.codehaus.wadi.group.impl.AbstractDispatcher.doOnEnvelope(AbstractDispatcher.java:104)
        at org.codehaus.wadi.group.impl.AbstractDispatcher.onEnvelope(AbstractDispatcher.java:100)
        at org.codehaus.wadi.servicespace.basic.ServiceSpaceEndpoint.dispatch(ServiceSpaceEndpoint.java:49)
        at org.codehaus.wadi.group.impl.ServiceEndpointWrapper.dispatch(ServiceEndpointWrapper.java:50)
        at org.codehaus.wadi.group.impl.BasicEnvelopeDispatcherManager$DispatchRunner.run(BasicEnvelopeDispatcherManager.java:121)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)


I have a config xml in contexts:

<?xml version="1.0"  encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">

<Configure class="org.mortbay.jetty.webapp.WebAppContext">
  <Set name="contextPath">/</Set>
  <Set name="war"><SystemProperty name="jetty.home" default="."/>/wadi-console-2.1.1.war</Set>
  <Set name="extractWAR">true</Set>
  <Set name="copyWebDir">true</Set>
  <Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Set>

  <New id="wadiCluster" class="org.mortbay.jetty.servlet.wadi.WadiCluster">
    <Arg>CLUSTER</Arg>
    <Arg><SystemProperty name="node.name" default="red"/></Arg>
    <Arg>http://<SystemProperty name="jetty.host"/>:<SystemProperty name="jetty.port" default="8080"/>/</Arg>
    <Call name="start"/>
  </New>

  <Set name="SessionHandler">
    <New class="org.mortbay.jetty.servlet.wadi.WadiSessionHandler">
      <Arg>
        <New id="wadiSessionManager" class="org.mortbay.jetty.servlet.wadi.WadiSessionManager">
          <Arg><Ref id="wadiCluster"/></Arg>
          <Arg type="int">2</Arg>
          <Arg type="int">24</Arg>
          <Arg type="int">360</Arg>
          <Arg type="boolean">true</Arg>
          <Arg type="boolean">false</Arg>
        </New>
      </Arg>
    </New>
  </Set>

</Configure>


Is this correct? Also the third Arg of WadiCluster doesn't seem to work, as I don't see jetty listening on 8080.
I have set up my own web app using AJP and proxied by Apache. How can I set up wadi-console to be accessed via 8080 directly?
I just want to keep it "internal". Thanks again.


Regards,
Shunde Zhang
Australian Research Collaboration Services (ARCS), "Providing collaboration services and tools for the Australian research community"
eResearch SA (eRSA), "Enabling Discovery, Innovation and Collaboration through eResearch"
School of Computer Science, The University of Adelaide, "Life Impact"
Phone: +61 8 83038265






On 31/05/2009, at 9:01 AM, Gianny Damour wrote:

Hi Shunde,

Good to hear that you get it to work.

WADi provides an independent administration console, wadi-console, that you can download from here:

http://wadi.codehaus.org/ (choose the wadi-console artifact).


This is a standard Web application to be deployed to one of your clustered Jetty instances.  It can be used to monitor cluster memberships, clustered Web applications, sessions, their locations, the distribution of partition indexes  and message exchange rates. Look at the page

http://docs.codehaus.org/display/WADI/Home

and browse the WADI Administration Console links for more details.


The WADI console is a very thin user interface which builds upon an admin API using the command pattern to execute distributed operations on each cluster node (kind of map-reduce pattern). It is very easy to add new commands to say show the attributes of a given session.

Have a look at the WIKI and let me know if you require specific features.

Thanks,
Gianny


On 29/05/2009, at 5:05 PM, Shunde Zhang wrote:

Hi Gianny,

I think I made it work, then how can I open the admin console?
Can I know how many attributes are shared? Can I know the value of them?


Regards,
Shunde Zhang
Australian Research Collaboration Services (ARCS), "Providing collaboration services and tools for the Australian research community"
Email: shunde.zhang@...
eResearch SA (eRSA), "Enabling Discovery, Innovation and Collaboration through eResearch"
Email: shunde.zhang@...
School of Computer Science, The University of Adelaide, "Life Impact"
Email: shunde.zhang@...
Phone: +61 8 83038265






On 29/05/2009, at 3:47 PM, gianny.damour@... wrote:

Hi Shunde,

You should start your server the way you use to start it. If you were using etc/jetty.xml, then continue to use this Jetty server configuration to start Jetty.

When you package your application for deployment to Jetty, you need to configure your application to use WADI. Basically, you need to include a file WEB-INF/jetty-web.xml in your module (beside your web.xml deployment descriptor). This file looks like the file you previously posted.

The instructions after the code snippet on this page:

http://docs.codehaus.org/display/JETTY/Jetty+Clustering+with+WADI

indicate how to do the same thing by dropping a new context xml config file in the contexts directory of Jetty.

Thanks,
Gianny

Shunde Zhang <shunde.zhang@...> wrote:

Hi Gianny,

There is nothing in http://myserver:7070/

Do I need to include the previous jetty.xml?
e.g.

java -Djetty.home=/opt/jetty -Djetty.port=7070 -Dnode.name=orange -
Djava.net.preferIPv4Stack=true -jar start.jar etc/jetty.xml etc/jetty-
wadi-cluster.xml


Regards,
Shunde Zhang
Australian Research Collaboration Services (ARCS), "Providing
collaboration services and tools for the Australian research community"
Email: shunde.zhang@...
eResearch SA (eRSA), "Enabling Discovery, Innovation and Collaboration
through eResearch"
Email: shunde.zhang@...
School of Computer Science, The University of Adelaide, "Life Impact"
Email: shunde.zhang@...
Phone: +61 8 83038265






On 29/05/2009, at 12:27 PM, gianny.damour@... wrote:

java -Djetty.home=/opt/jetty -Djetty.port=7070 -Dnode.name=orange -
Djava.net.preferIPv4Stack=true -jar start.jar etc/jetty-wadi-
cluster.xml

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email




Re: WADI and jetty 6

by Gianny Damour-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Shunde,

The ClassCastException is due to the fact that wadi-console is  
loading the class org.codehaus.wadi.servicespace.ServiceName from the  
Web-application class loader instead of the Jetty class loader. Here  
is the jetty-web.xml file that you should use to deploy wadi-console:

<?xml version="1.0"  encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//
EN" "http://jetty.mortbay.org/configure.dtd">
<Configure class="org.mortbay.jetty.webapp.WebAppContext">
   <Set name="contextPath">/wadi-console</Set>
   <Set name="parentLoaderPriority">true</Set>
</Configure>

By setting the property parentLoaderPriority to true, class loading  
is performed according to the standard class loading delegating  
strategy, i.e. first try to load classes via the parent class loader  
and then fallback to the current one if necessary.

Note that you do not need to set-up a WadiCluster or  
WadiSessionManager like you have done for your clustered application.  
wadi-console knows about all the WadiCluster and WadiSessionManager  
instantiated by the running Jetty container using a static registry  
mechanism.


The admin console is a simple Web application and can be accessed  
through the standard HTTP connectors you have configured. For  
instance, if you start Jetty using the command

java -Djetty.home=/opt/jetty -Djetty.port=7070 -Dnode.name=orange -
Djava.net.preferIPv4Stack=true -jar start.jar

then you can access the console via this URL:

http://myserver:7070/wadi-console/


If you want the console to be only available internally, then I  
suggest you to:
1. define a DNS entry for the Jetty instance which will run the WADI  
console; and
2. DO NOT configure Apache as a reverse-proxy for the WADI console.  
You should configure Apache to only be a reverse-proxy for the  
application you want to be exposed.

Assuming you created a DNS entry binding adminserver to the IP  
address of the Jetty instance running the WADI console and that you  
started this Jetty instance with -Djetty.port=8080 you will be able  
to access the console via the URL

http://adminserver: 8080/wadi-console/

Thanks,
Gianny

P.S.: here is the plan I have been using to test Jetty 6.1.18 with  
the wadi-webapp application (you can download it from http://
wadi.codehaus.org/ see wadi-webapp release artifact)


<?xml version="1.0"  encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//
EN" "http://jetty.mortbay.org/configure.dtd">

<Configure class="org.mortbay.jetty.webapp.WebAppContext">
   <Set name="contextPath">/wadi-webapp</Set>

   <Set name="extractWAR">false</Set>
   <Set name="copyWebDir">false</Set>
   <Set name="defaultsDescriptor"><SystemProperty name="jetty.home"  
default="."/>/etc/webdefaults.xml</Set>

   <New id="wadiCluster"  
class="org.mortbay.jetty.servlet.wadi.WadiCluster">
     <Arg>CLUSTER</Arg>
     <Arg><SystemProperty name="node.name" default="red"/></Arg>
     <Arg>http://localhost:<SystemProperty name="jetty.port"  
default="8080"/>/wadi-webapp</Arg>
     <Call name="start"/>
   </New>

   <Set name="SessionHandler">
     <New class="org.mortbay.jetty.servlet.wadi.WadiSessionHandler">
       <Arg>
         <New id="wadiSessionManager"  
class="org.mortbay.jetty.servlet.wadi.WadiSessionManager">
           <Arg><Ref id="wadiCluster"/></Arg>
           <Arg type="int">2</Arg>
           <Arg type="int">24</Arg>
           <Arg type="int">360</Arg>
           <Arg type="boolean">true</Arg>
           <Arg type="boolean">false</Arg>

           <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - -->
           <!-- Uncomment these elements to enable session  
persistence across   -->
           <!-- context or container  
restart.                                   -->
           <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - -->
           <!--
           <Set name="SharedStore">
             <New id="sharedStore"  
class="org.codehaus.wadi.core.store.DatabaseStore">
               <Arg>
                 <New id="sharedStoreDatabase"  
class="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource">
                   <Set name="Url">jdbc:mysql://localhost:3306/TEST</
Set>
                   <Set name="User">wadi</Set>
                   <Set name="Password">wadi_pass</Set>
                 </New>
               </Arg>
               <Arg type="java.lang.String">SESSION_TABLE</Arg>
               <Arg type="java.lang.String">BYTEA</Arg>
               <Arg type="boolean">true</Arg>
               <Arg type="boolean">false</Arg>
             </New>
           </Set>
            -->
              <Set name="maxInactiveInterval">360</Set>
         </New>
       </Arg>
     </New>
   </Set>

</Configure>



On 03/06/2009, at 10:48 AM, Shunde Zhang wrote:

> Hi Gianny,
>
> I tried to start jetty with wadi-console war but I got:
>
> 2009-06-03 10:13:33.392::INFO:  Extract jar:file:/opt/davis1/wadi-
> console-2.1.1.war!/ to /tmp/Jetty_0_0_0_0_8080_wadi.console.
> 2.1.1.war____.2gu4c1/webapp
> 2009-06-03 10:13:34.589::INFO:  NO JSP Support for /, did not find  
> org.apache.jasper.servlet.JspServlet
> Jun 3, 2009 10:13:35 AM  
> org.codehaus.wadi.servicespace.basic.BasicSingletonServiceHolder  
> onElection
> INFO: [TribesPeer [jetty1; tcp://129.127.96.93:4001]] owns  
> singleton service [PartitionManager for ServiceSpace [/]]
> Jun 3, 2009 10:13:37 AM  
> org.codehaus.wadi.group.impl.BasicEnvelopeDispatcherManager
> $DispatchRunner run
> SEVERE: problem dispatching message
> java.lang.ClassCastException:  
> org.codehaus.wadi.servicespace.ServiceName cannot be cast to  
> org.codehaus.wadi.servicespace.ServiceName
>         at  
> org.codehaus.wadi.servicespace.basic.EnvelopeServiceHelper.getServiceN
> ame(EnvelopeServiceHelper.java:35)
>         at  
> org.codehaus.wadi.servicespace.basic.ServiceInvocationListener.testDis
> patchEnvelope(ServiceInvocationListener.java:68)
>         at  
> org.codehaus.wadi.group.impl.ServiceEndpointWrapper.testDispatchEnvelo
> pe(ServiceEndpointWrapper.java:58)
>         at  
> org.codehaus.wadi.group.impl.BasicEnvelopeDispatcherManager.onEnvelope
> (BasicEnvelopeDispatcherManager.java:88)
>         at  
> org.codehaus.wadi.group.impl.AbstractDispatcher.doOnEnvelope
> (AbstractDispatcher.java:104)
>         at  
> org.codehaus.wadi.group.impl.AbstractDispatcher.onEnvelope
> (AbstractDispatcher.java:100)
>         at  
> org.codehaus.wadi.servicespace.basic.ServiceSpaceEndpoint.dispatch
> (ServiceSpaceEndpoint.java:49)
>         at  
> org.codehaus.wadi.group.impl.ServiceEndpointWrapper.dispatch
> (ServiceEndpointWrapper.java:50)
>         at  
> org.codehaus.wadi.group.impl.BasicEnvelopeDispatcherManager
> $DispatchRunner.run(BasicEnvelopeDispatcherManager.java:121)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask
> (ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run
> (ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:619)
>
>
> I have a config xml in contexts:
>
> <?xml version="1.0"  encoding="ISO-8859-1"?>
> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//
> EN" "http://jetty.mortbay.org/configure.dtd">
>
> <Configure class="org.mortbay.jetty.webapp.WebAppContext">
>   <Set name="contextPath">/</Set>
>   <Set name="war"><SystemProperty name="jetty.home" default="."/>/
> wadi-console-2.1.1.war</Set>
>   <Set name="extractWAR">true</Set>
>   <Set name="copyWebDir">true</Set>
>   <Set name="defaultsDescriptor"><SystemProperty name="jetty.home"  
> default="."/>/etc/webdefault.xml</Set>
>
>   <New id="wadiCluster"  
> class="org.mortbay.jetty.servlet.wadi.WadiCluster">
>     <Arg>CLUSTER</Arg>
>     <Arg><SystemProperty name="node.name" default="red"/></Arg>
>     <Arg>http://<SystemProperty name="jetty.host"/>:<SystemProperty  
> name="jetty.port" default="8080"/>/</Arg>
>     <Call name="start"/>
>   </New>
>
>   <Set name="SessionHandler">
>     <New class="org.mortbay.jetty.servlet.wadi.WadiSessionHandler">
>       <Arg>
>         <New id="wadiSessionManager"  
> class="org.mortbay.jetty.servlet.wadi.WadiSessionManager">
>           <Arg><Ref id="wadiCluster"/></Arg>
>           <Arg type="int">2</Arg>
>           <Arg type="int">24</Arg>
>           <Arg type="int">360</Arg>
>           <Arg type="boolean">true</Arg>
>           <Arg type="boolean">false</Arg>
>         </New>
>       </Arg>
>     </New>
>   </Set>
>
> </Configure>
>
>
> Is this correct? Also the third Arg of WadiCluster doesn't seem to  
> work, as I don't see jetty listening on 8080.
> I have set up my own web app using AJP and proxied by Apache. How  
> can I set up wadi-console to be accessed via 8080 directly?
> I just want to keep it "internal". Thanks again.
>
>
> Regards,
> Shunde Zhang
> Australian Research Collaboration Services (ARCS), "Providing  
> collaboration services and tools for the Australian research  
> community"
> Email: shunde.zhang@...
> eResearch SA (eRSA), "Enabling Discovery, Innovation and  
> Collaboration through eResearch"
> Email: shunde.zhang@...
> School of Computer Science, The University of Adelaide, "Life Impact"
> Email: shunde.zhang@...
> Phone: +61 8 83038265
>
>
>
>
>
>
> On 31/05/2009, at 9:01 AM, Gianny Damour wrote:
>
>> Hi Shunde,
>>
>> Good to hear that you get it to work.
>>
>> WADi provides an independent administration console, wadi-console,  
>> that you can download from here:
>>
>> http://wadi.codehaus.org/ (choose the wadi-console artifact).
>>
>>
>> This is a standard Web application to be deployed to one of your  
>> clustered Jetty instances.  It can be used to monitor cluster  
>> memberships, clustered Web applications, sessions, their  
>> locations, the distribution of partition indexes  and message  
>> exchange rates. Look at the page
>>
>> http://docs.codehaus.org/display/WADI/Home
>>
>> and browse the WADI Administration Console links for more details.
>>
>>
>> The WADI console is a very thin user interface which builds upon  
>> an admin API using the command pattern to execute distributed  
>> operations on each cluster node (kind of map-reduce pattern). It  
>> is very easy to add new commands to say show the attributes of a  
>> given session.
>>
>> Have a look at the WIKI and let me know if you require specific  
>> features.
>>
>> Thanks,
>> Gianny
>>
>>
>> On 29/05/2009, at 5:05 PM, Shunde Zhang wrote:
>>
>>> Hi Gianny,
>>>
>>> I think I made it work, then how can I open the admin console?
>>> Can I know how many attributes are shared? Can I know the value  
>>> of them?
>>>
>>>
>>> Regards,
>>> Shunde Zhang
>>> Australian Research Collaboration Services (ARCS), "Providing  
>>> collaboration services and tools for the Australian research  
>>> community"
>>> Email: shunde.zhang@...
>>> eResearch SA (eRSA), "Enabling Discovery, Innovation and  
>>> Collaboration through eResearch"
>>> Email: shunde.zhang@...
>>> School of Computer Science, The University of Adelaide, "Life  
>>> Impact"
>>> Email: shunde.zhang@...
>>> Phone: +61 8 83038265
>>>
>>>
>>>
>>>
>>>
>>>
>>> On 29/05/2009, at 3:47 PM, gianny.damour@... wrote:
>>>
>>>> Hi Shunde,
>>>>
>>>> You should start your server the way you use to start it. If you  
>>>> were using etc/jetty.xml, then continue to use this Jetty server  
>>>> configuration to start Jetty.
>>>>
>>>> When you package your application for deployment to Jetty, you  
>>>> need to configure your application to use WADI. Basically, you  
>>>> need to include a file WEB-INF/jetty-web.xml in your module  
>>>> (beside your web.xml deployment descriptor). This file looks  
>>>> like the file you previously posted.
>>>>
>>>> The instructions after the code snippet on this page:
>>>>
>>>> http://docs.codehaus.org/display/JETTY/Jetty+Clustering+with+WADI
>>>>
>>>> indicate how to do the same thing by dropping a new context xml  
>>>> config file in the contexts directory of Jetty.
>>>>
>>>> Thanks,
>>>> Gianny
>>>>
>>>>> Shunde Zhang <shunde.zhang@...> wrote:
>>>>>
>>>>> Hi Gianny,
>>>>>
>>>>> There is nothing in http://myserver:7070/
>>>>>
>>>>> Do I need to include the previous jetty.xml?
>>>>> e.g.
>>>>>
>>>>> java -Djetty.home=/opt/jetty -Djetty.port=7070 -
>>>>> Dnode.name=orange -
>>>>> Djava.net.preferIPv4Stack=true -jar start.jar etc/jetty.xml etc/
>>>>> jetty-
>>>>> wadi-cluster.xml
>>>>>
>>>>>
>>>>> Regards,
>>>>> Shunde Zhang
>>>>> Australian Research Collaboration Services (ARCS), "Providing
>>>>> collaboration services and tools for the Australian research  
>>>>> community"
>>>>> Email: shunde.zhang@...
>>>>> eResearch SA (eRSA), "Enabling Discovery, Innovation and  
>>>>> Collaboration
>>>>> through eResearch"
>>>>> Email: shunde.zhang@...
>>>>> School of Computer Science, The University of Adelaide, "Life  
>>>>> Impact"
>>>>> Email: shunde.zhang@...
>>>>> Phone: +61 8 83038265
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On 29/05/2009, at 12:27 PM, gianny.damour@... wrote:
>>>>>
>>>>>> java -Djetty.home=/opt/jetty -Djetty.port=7070 -
>>>>>> Dnode.name=orange -
>>>>>> Djava.net.preferIPv4Stack=true -jar start.jar etc/jetty-wadi-
>>>>>> cluster.xml
>>>>
>>>> -------------------------------------------------------------------
>>>> --
>>>> To unsubscribe from this list, please visit:
>>>>
>>>>   http://xircles.codehaus.org/manage_email
>>>>
>>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>   http://xircles.codehaus.org/manage_email
>>
>>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: WADI and jetty 6

by Shunde Zhang :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Gianny,

I finally got this to work. It is really cool!

I have another issue, not related to WADI, but maybe you know the answer :)
My web app is actually a WebDAV interface. Some WebDAV client, like Mac Finder, doesn't support session. Others do.
When I monitor the jetty log, I notice that those with session support only send requests to one node of WADI cluster.
In other words, requests are only sent to one node by Apache.
But for requests coming from Mac Finder, all nodes get the requests, which makes the web app behave strangely.

How I configure Apache is:
ProxyPass /ARCS/ balancer://my_cluster/MYWEBAPP/ stickysession=JSESSIONID|jsessionid nofailover=On

I guess it identifies each request by session ID. If there is no session ID, it will send requests to all nodes?
Could you give me a hint on how to configure Apache properly? Thanks a lot!

Regards,
Shunde Zhang
Australian Research Collaboration Services (ARCS), "Providing collaboration services and tools for the Australian research community"
eResearch SA (eRSA), "Enabling Discovery, Innovation and Collaboration through eResearch"
School of Computer Science, The University of Adelaide, "Life Impact"
Phone: +61 8 83038265






On 03/06/2009, at 8:23 PM, Gianny Damour wrote:

Hi Shunde,

The ClassCastException is due to the fact that wadi-console is loading the class org.codehaus.wadi.servicespace.ServiceName from the Web-application class loader instead of the Jetty class loader. Here is the jetty-web.xml file that you should use to deploy wadi-console:

<?xml version="1.0"  encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
<Configure class="org.mortbay.jetty.webapp.WebAppContext">
 <Set name="contextPath">/wadi-console</Set>
 <Set name="parentLoaderPriority">true</Set>
</Configure>

By setting the property parentLoaderPriority to true, class loading is performed according to the standard class loading delegating strategy, i.e. first try to load classes via the parent class loader and then fallback to the current one if necessary.

Note that you do not need to set-up a WadiCluster or WadiSessionManager like you have done for your clustered application. wadi-console knows about all the WadiCluster and WadiSessionManager instantiated by the running Jetty container using a static registry mechanism.


The admin console is a simple Web application and can be accessed through the standard HTTP connectors you have configured. For instance, if you start Jetty using the command

java -Djetty.home=/opt/jetty -Djetty.port=7070 -Dnode.name=orange -Djava.net.preferIPv4Stack=true -jar start.jar

then you can access the console via this URL:

http://myserver:7070/wadi-console/


If you want the console to be only available internally, then I suggest you to:
1. define a DNS entry for the Jetty instance which will run the WADI console; and
2. DO NOT configure Apache as a reverse-proxy for the WADI console. You should configure Apache to only be a reverse-proxy for the application you want to be exposed.

Assuming you created a DNS entry binding adminserver to the IP address of the Jetty instance running the WADI console and that you started this Jetty instance with -Djetty.port=8080 you will be able to access the console via the URL

http://adminserver: 8080/wadi-console/

Thanks,
Gianny

P.S.: here is the plan I have been using to test Jetty 6.1.18 with the wadi-webapp application (you can download it from http://wadi.codehaus.org/ see wadi-webapp release artifact)


<?xml version="1.0"  encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">

<Configure class="org.mortbay.jetty.webapp.WebAppContext">
 <Set name="contextPath">/wadi-webapp</Set>

 <Set name="extractWAR">false</Set>
 <Set name="copyWebDir">false</Set>
 <Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefaults.xml</Set>

 <New id="wadiCluster" class="org.mortbay.jetty.servlet.wadi.WadiCluster">
   <Arg>CLUSTER</Arg>
   <Arg><SystemProperty name="node.name" default="red"/></Arg>
   <Arg>http://localhost:<SystemProperty name="jetty.port" default="8080"/>/wadi-webapp</Arg>
   <Call name="start"/>
 </New>

 <Set name="SessionHandler">
   <New class="org.mortbay.jetty.servlet.wadi.WadiSessionHandler">
     <Arg>
       <New id="wadiSessionManager" class="org.mortbay.jetty.servlet.wadi.WadiSessionManager">
         <Arg><Ref id="wadiCluster"/></Arg>
         <Arg type="int">2</Arg>
         <Arg type="int">24</Arg>
         <Arg type="int">360</Arg>
         <Arg type="boolean">true</Arg>
         <Arg type="boolean">false</Arg>

         <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
         <!-- Uncomment these elements to enable session persistence across   -->
         <!-- context or container restart.                                   -->
         <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
         <!--
         <Set name="SharedStore">
           <New id="sharedStore" class="org.codehaus.wadi.core.store.DatabaseStore">
             <Arg>
               <New id="sharedStoreDatabase" class="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource">
                 <Set name="Url">jdbc:mysql://localhost:3306/TEST</Set>
                 <Set name="User">wadi</Set>
                 <Set name="Password">wadi_pass</Set>
               </New>
             </Arg>
             <Arg type="java.lang.String">SESSION_TABLE</Arg>
             <Arg type="java.lang.String">BYTEA</Arg>
             <Arg type="boolean">true</Arg>
             <Arg type="boolean">false</Arg>
           </New>
         </Set>
          -->
     <Set name="maxInactiveInterval">360</Set>
       </New>
     </Arg>
   </New>
 </Set>

</Configure>



On 03/06/2009, at 10:48 AM, Shunde Zhang wrote:

Hi Gianny,

I tried to start jetty with wadi-console war but I got:

2009-06-03 10:13:33.392::INFO:  Extract jar:file:/opt/davis1/wadi-console-2.1.1.war!/ to /tmp/Jetty_0_0_0_0_8080_wadi.console.2.1.1.war____.2gu4c1/webapp
2009-06-03 10:13:34.589::INFO:  NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet
Jun 3, 2009 10:13:35 AM org.codehaus.wadi.servicespace.basic.BasicSingletonServiceHolder onElection
INFO: [TribesPeer [jetty1; tcp://129.127.96.93:4001]] owns singleton service [PartitionManager for ServiceSpace [/]]
Jun 3, 2009 10:13:37 AM org.codehaus.wadi.group.impl.BasicEnvelopeDispatcherManager$DispatchRunner run
SEVERE: problem dispatching message
java.lang.ClassCastException: org.codehaus.wadi.servicespace.ServiceName cannot be cast to org.codehaus.wadi.servicespace.ServiceName
       at org.codehaus.wadi.servicespace.basic.EnvelopeServiceHelper.getServiceName(EnvelopeServiceHelper.java:35)
       at org.codehaus.wadi.servicespace.basic.ServiceInvocationListener.testDispatchEnvelope(ServiceInvocationListener.java:68)
       at org.codehaus.wadi.group.impl.ServiceEndpointWrapper.testDispatchEnvelope(ServiceEndpointWrapper.java:58)
       at org.codehaus.wadi.group.impl.BasicEnvelopeDispatcherManager.onEnvelope(BasicEnvelopeDispatcherManager.java:88)
       at org.codehaus.wadi.group.impl.AbstractDispatcher.doOnEnvelope(AbstractDispatcher.java:104)
       at org.codehaus.wadi.group.impl.AbstractDispatcher.onEnvelope(AbstractDispatcher.java:100)
       at org.codehaus.wadi.servicespace.basic.ServiceSpaceEndpoint.dispatch(ServiceSpaceEndpoint.java:49)
       at org.codehaus.wadi.group.impl.ServiceEndpointWrapper.dispatch(ServiceEndpointWrapper.java:50)
       at org.codehaus.wadi.group.impl.BasicEnvelopeDispatcherManager$DispatchRunner.run(BasicEnvelopeDispatcherManager.java:121)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
       at java.lang.Thread.run(Thread.java:619)


I have a config xml in contexts:

<?xml version="1.0"  encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">

<Configure class="org.mortbay.jetty.webapp.WebAppContext">
 <Set name="contextPath">/</Set>
 <Set name="war"><SystemProperty name="jetty.home" default="."/>/wadi-console-2.1.1.war</Set>
 <Set name="extractWAR">true</Set>
 <Set name="copyWebDir">true</Set>
 <Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Set>

 <New id="wadiCluster" class="org.mortbay.jetty.servlet.wadi.WadiCluster">
   <Arg>CLUSTER</Arg>
   <Arg><SystemProperty name="node.name" default="red"/></Arg>
   <Arg>http://<SystemProperty name="jetty.host"/>:<SystemProperty name="jetty.port" default="8080"/>/</Arg>
   <Call name="start"/>
 </New>

 <Set name="SessionHandler">
   <New class="org.mortbay.jetty.servlet.wadi.WadiSessionHandler">
     <Arg>
       <New id="wadiSessionManager" class="org.mortbay.jetty.servlet.wadi.WadiSessionManager">
         <Arg><Ref id="wadiCluster"/></Arg>
         <Arg type="int">2</Arg>
         <Arg type="int">24</Arg>
         <Arg type="int">360</Arg>
         <Arg type="boolean">true</Arg>
         <Arg type="boolean">false</Arg>
       </New>
     </Arg>
   </New>
 </Set>

</Configure>


Is this correct? Also the third Arg of WadiCluster doesn't seem to work, as I don't see jetty listening on 8080.
I have set up my own web app using AJP and proxied by Apache. How can I set up wadi-console to be accessed via 8080 directly?
I just want to keep it "internal". Thanks again.


Regards,
Shunde Zhang
Australian Research Collaboration Services (ARCS), "Providing collaboration services and tools for the Australian research community"
Email: shunde.zhang@...
eResearch SA (eRSA), "Enabling Discovery, Innovation and Collaboration through eResearch"
Email: shunde.zhang@...
School of Computer Science, The University of Adelaide, "Life Impact"
Email: shunde.zhang@...
Phone: +61 8 83038265






On 31/05/2009, at 9:01 AM, Gianny Damour wrote:

Hi Shunde,

Good to hear that you get it to work.

WADi provides an independent administration console, wadi-console, that you can download from here:

http://wadi.codehaus.org/ (choose the wadi-console artifact).


This is a standard Web application to be deployed to one of your clustered Jetty instances.  It can be used to monitor cluster memberships, clustered Web applications, sessions, their locations, the distribution of partition indexes  and message exchange rates. Look at the page

http://docs.codehaus.org/display/WADI/Home

and browse the WADI Administration Console links for more details.


The WADI console is a very thin user interface which builds upon an admin API using the command pattern to execute distributed operations on each cluster node (kind of map-reduce pattern). It is very easy to add new commands to say show the attributes of a given session.

Have a look at the WIKI and let me know if you require specific features.

Thanks,
Gianny


On 29/05/2009, at 5:05 PM, Shunde Zhang wrote:

Hi Gianny,

I think I made it work, then how can I open the admin console?
Can I know how many attributes are shared? Can I know the value of them?


Regards,
Shunde Zhang
Australian Research Collaboration Services (ARCS), "Providing collaboration services and tools for the Australian research community"
Email: shunde.zhang@...
eResearch SA (eRSA), "Enabling Discovery, Innovation and Collaboration through eResearch"
Email: shunde.zhang@...
School of Computer Science, The University of Adelaide, "Life Impact"
Email: shunde.zhang@...
Phone: +61 8 83038265






On 29/05/2009, at 3:47 PM, gianny.damour@... wrote:

Hi Shunde,

You should start your server the way you use to start it. If you were using etc/jetty.xml, then continue to use this Jetty server configuration to start Jetty.

When you package your application for deployment to Jetty, you need to configure your application to use WADI. Basically, you need to include a file WEB-INF/jetty-web.xml in your module (beside your web.xml deployment descriptor). This file looks like the file you previously posted.

The instructions after the code snippet on this page:

http://docs.codehaus.org/display/JETTY/Jetty+Clustering+with+WADI

indicate how to do the same thing by dropping a new context xml config file in the contexts directory of Jetty.

Thanks,
Gianny

Shunde Zhang <shunde.zhang@...> wrote:

Hi Gianny,

There is nothing in http://myserver:7070/

Do I need to include the previous jetty.xml?
e.g.

java -Djetty.home=/opt/jetty -Djetty.port=7070 -Dnode.name=orange -
Djava.net.preferIPv4Stack=true -jar start.jar etc/jetty.xml etc/jetty-
wadi-cluster.xml


Regards,
Shunde Zhang
Australian Research Collaboration Services (ARCS), "Providing
collaboration services and tools for the Australian research community"
Email: shunde.zhang@...
eResearch SA (eRSA), "Enabling Discovery, Innovation and Collaboration
through eResearch"
Email: shunde.zhang@...
School of Computer Science, The University of Adelaide, "Life Impact"
Email: shunde.zhang@...
Phone: +61 8 83038265






On 29/05/2009, at 12:27 PM, gianny.damour@... wrote:

java -Djetty.home=/opt/jetty -Djetty.port=7070 -Dnode.name=orange -
Djava.net.preferIPv4Stack=true -jar start.jar etc/jetty-wadi-
cluster.xml

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

 http://xircles.codehaus.org/manage_email





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

 http://xircles.codehaus.org/manage_email





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email




Re: WADI and jetty 6

by Filip Hanik - Dev Lists :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Shunde Zhang wrote:

> Hi Gianny,
>
> I finally got this to work. It is really cool!
>
> I have another issue, not related to WADI, but maybe you know the
> answer :)
> My web app is actually a WebDAV interface. Some WebDAV client, like
> Mac Finder, doesn't support session. Others do.
> When I monitor the jetty log, I notice that those with session support
> only send requests to one node of WADI cluster.
> In other words, requests are only sent to one node by Apache.
> But for requests coming from Mac Finder, all nodes get the requests,
> which makes the web app behave strangely.
>
> How I configure Apache is:
> ProxyPass /ARCS/ balancer://my_cluster/MYWEBAPP/
> stickysession=JSESSIONID|jsessionid nofailover=On
yes, but have you configured stickyness? ie, a 'route' in your <Proxy
balancer://xxxx>
>
> I guess it identifies each request by session ID. If there is no
> session ID, it will send requests to all nodes?
no, it picks one.
> Could you give me a hint on how to configure Apache properly? Thanks a
> lot!

There is a risk that the way you have it set up would cause round robin
on every request.

>
> Regards,
> Shunde Zhang
> Australian Research Collaboration Services (ARCS), "Providing
> collaboration services and tools for the Australian research community"
> Email: shunde.zhang@... <mailto:shunde.zhang@...>
> eResearch SA (eRSA), "/Enabling Discovery, Innovation and
> Collaboration through eResearch/"
> Email: shunde.zhang@...
> <mailto:shunde.zhang@...>
> School of Computer Science, The University of Adelaide, "/Life Impact/"
> Email: shunde.zhang@... <mailto:shunde.zhang@...>
> Phone: +61 8 83038265
>
>
>
>
>
>
> On 03/06/2009, at 8:23 PM, Gianny Damour wrote:
>
>> Hi Shunde,
>>
>> The ClassCastException is due to the fact that wadi-console is
>> loading the class org.codehaus.wadi.servicespace.ServiceName from the
>> Web-application class loader instead of the Jetty class loader. Here
>> is the jetty-web.xml file that you should use to deploy wadi-console:
>>
>> <?xml version="1.0"  encoding="ISO-8859-1"?>
>> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD
>> Configure//EN" "http://jetty.mortbay.org/configure.dtd">
>> <Configure class="org.mortbay.jetty.webapp.WebAppContext">
>>  <Set name="contextPath">/wadi-console</Set>
>>  <Set name="parentLoaderPriority">true</Set>
>> </Configure>
>>
>> By setting the property parentLoaderPriority to true, class loading
>> is performed according to the standard class loading delegating
>> strategy, i.e. first try to load classes via the parent class loader
>> and then fallback to the current one if necessary.
>>
>> Note that you do not need to set-up a WadiCluster or
>> WadiSessionManager like you have done for your clustered application.
>> wadi-console knows about all the WadiCluster and WadiSessionManager
>> instantiated by the running Jetty container using a static registry
>> mechanism.
>>
>>
>> The admin console is a simple Web application and can be accessed
>> through the standard HTTP connectors you have configured. For
>> instance, if you start Jetty using the command
>>
>> java -Djetty.home=/opt/jetty -Djetty.port=7070 -Dnode.name=orange
>> -Djava.net.preferIPv4Stack=true -jar start.jar
>>
>> then you can access the console via this URL:
>>
>> http://myserver:7070/wadi-console/
>>
>>
>> If you want the console to be only available internally, then I
>> suggest you to:
>> 1. define a DNS entry for the Jetty instance which will run the WADI
>> console; and
>> 2. DO NOT configure Apache as a reverse-proxy for the WADI console.
>> You should configure Apache to only be a reverse-proxy for the
>> application you want to be exposed.
>>
>> Assuming you created a DNS entry binding adminserver to the IP
>> address of the Jetty instance running the WADI console and that you
>> started this Jetty instance with -Djetty.port=8080 you will be able
>> to access the console via the URL
>>
>> http://adminserver: 8080/wadi-console/
>>
>> Thanks,
>> Gianny
>>
>> P.S.: here is the plan I have been using to test Jetty 6.1.18 with
>> the wadi-webapp application (you can download it from
>> http://wadi.codehaus.org/ see wadi-webapp release artifact)
>>
>>
>> <?xml version="1.0"  encoding="ISO-8859-1"?>
>> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD
>> Configure//EN" "http://jetty.mortbay.org/configure.dtd">
>>
>> <Configure class="org.mortbay.jetty.webapp.WebAppContext">
>>  <Set name="contextPath">/wadi-webapp</Set>
>>
>>  <Set name="extractWAR">false</Set>
>>  <Set name="copyWebDir">false</Set>
>>  <Set name="defaultsDescriptor"><SystemProperty name="jetty.home"
>> default="."/>/etc/webdefaults.xml</Set>
>>
>>  <New id="wadiCluster"
>> class="org.mortbay.jetty.servlet.wadi.WadiCluster">
>>    <Arg>CLUSTER</Arg>
>>    <Arg><SystemProperty name="node.name" default="red"/></Arg>
>>    <Arg>http://localhost:<SystemProperty name="jetty.port"
>> default="8080"/>/wadi-webapp</Arg>
>>    <Call name="start"/>
>>  </New>
>>
>>  <Set name="SessionHandler">
>>    <New class="org.mortbay.jetty.servlet.wadi.WadiSessionHandler">
>>      <Arg>
>>        <New id="wadiSessionManager"
>> class="org.mortbay.jetty.servlet.wadi.WadiSessionManager">
>>          <Arg><Ref id="wadiCluster"/></Arg>
>>          <Arg type="int">2</Arg>
>>          <Arg type="int">24</Arg>
>>          <Arg type="int">360</Arg>
>>          <Arg type="boolean">true</Arg>
>>          <Arg type="boolean">false</Arg>
>>
>>          <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>> - - - - -->
>>          <!-- Uncomment these elements to enable session persistence
>> across   -->
>>          <!-- context or container restart.
>>                                   -->
>>          <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>> - - - - -->
>>          <!--
>>          <Set name="SharedStore">
>>            <New id="sharedStore"
>> class="org.codehaus.wadi.core.store.DatabaseStore">
>>              <Arg>
>>                <New id="sharedStoreDatabase"
>> class="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource">
>>                  <Set name="Url">jdbc:mysql://localhost:3306/TEST</Set>
>>                  <Set name="User">wadi</Set>
>>                  <Set name="Password">wadi_pass</Set>
>>                </New>
>>              </Arg>
>>              <Arg type="java.lang.String">SESSION_TABLE</Arg>
>>              <Arg type="java.lang.String">BYTEA</Arg>
>>              <Arg type="boolean">true</Arg>
>>              <Arg type="boolean">false</Arg>
>>            </New>
>>          </Set>
>>           -->
>>      <Set name="maxInactiveInterval">360</Set>
>>        </New>
>>      </Arg>
>>    </New>
>>  </Set>
>>
>> </Configure>
>>
>>
>>
>> On 03/06/2009, at 10:48 AM, Shunde Zhang wrote:
>>
>>> Hi Gianny,
>>>
>>> I tried to start jetty with wadi-console war but I got:
>>>
>>> 2009-06-03 10:13:33.392::INFO:  Extract
>>> jar:file:/opt/davis1/wadi-console-2.1.1.war!/ to
>>> /tmp/Jetty_0_0_0_0_8080_wadi.console.2.1.1.war____.2gu4c1/webapp
>>> 2009-06-03 10:13:34.589::INFO:  NO JSP Support for /, did not find
>>> org.apache.jasper.servlet.JspServlet
>>> Jun 3, 2009 10:13:35 AM
>>> org.codehaus.wadi.servicespace.basic.BasicSingletonServiceHolder
>>> onElection
>>> INFO: [TribesPeer [jetty1; tcp://129.127.96.93:4001]] owns singleton
>>> service [PartitionManager for ServiceSpace [/]]
>>> Jun 3, 2009 10:13:37 AM
>>> org.codehaus.wadi.group.impl.BasicEnvelopeDispatcherManager$DispatchRunner
>>> run
>>> SEVERE: problem dispatching message
>>> java.lang.ClassCastException:
>>> org.codehaus.wadi.servicespace.ServiceName cannot be cast to
>>> org.codehaus.wadi.servicespace.ServiceName
>>>        at
>>> org.codehaus.wadi.servicespace.basic.EnvelopeServiceHelper.getServiceName(EnvelopeServiceHelper.java:35)
>>>        at
>>> org.codehaus.wadi.servicespace.basic.ServiceInvocationListener.testDispatchEnvelope(ServiceInvocationListener.java:68)
>>>        at
>>> org.codehaus.wadi.group.impl.ServiceEndpointWrapper.testDispatchEnvelope(ServiceEndpointWrapper.java:58)
>>>        at
>>> org.codehaus.wadi.group.impl.BasicEnvelopeDispatcherManager.onEnvelope(BasicEnvelopeDispatcherManager.java:88)
>>>        at
>>> org.codehaus.wadi.group.impl.AbstractDispatcher.doOnEnvelope(AbstractDispatcher.java:104)
>>>        at
>>> org.codehaus.wadi.group.impl.AbstractDispatcher.onEnvelope(AbstractDispatcher.java:100)
>>>        at
>>> org.codehaus.wadi.servicespace.basic.ServiceSpaceEndpoint.dispatch(ServiceSpaceEndpoint.java:49)
>>>        at
>>> org.codehaus.wadi.group.impl.ServiceEndpointWrapper.dispatch(ServiceEndpointWrapper.java:50)
>>>        at
>>> org.codehaus.wadi.group.impl.BasicEnvelopeDispatcherManager$DispatchRunner.run(BasicEnvelopeDispatcherManager.java:121)
>>>        at
>>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>>>        at
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>>>        at java.lang.Thread.run(Thread.java:619)
>>>
>>>
>>> I have a config xml in contexts:
>>>
>>> <?xml version="1.0"  encoding="ISO-8859-1"?>
>>> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD
>>> Configure//EN" "http://jetty.mortbay.org/configure.dtd">
>>>
>>> <Configure class="org.mortbay.jetty.webapp.WebAppContext">
>>>  <Set name="contextPath">/</Set>
>>>  <Set name="war"><SystemProperty name="jetty.home"
>>> default="."/>/wadi-console-2.1.1.war</Set>
>>>  <Set name="extractWAR">true</Set>
>>>  <Set name="copyWebDir">true</Set>
>>>  <Set name="defaultsDescriptor"><SystemProperty name="jetty.home"
>>> default="."/>/etc/webdefault.xml</Set>
>>>
>>>  <New id="wadiCluster"
>>> class="org.mortbay.jetty.servlet.wadi.WadiCluster">
>>>    <Arg>CLUSTER</Arg>
>>>    <Arg><SystemProperty name="node.name" default="red"/></Arg>
>>>    <Arg>http://<SystemProperty name="jetty.host"/>:<SystemProperty
>>> name="jetty.port" default="8080"/>/</Arg>
>>>    <Call name="start"/>
>>>  </New>
>>>
>>>  <Set name="SessionHandler">
>>>    <New class="org.mortbay.jetty.servlet.wadi.WadiSessionHandler">
>>>      <Arg>
>>>        <New id="wadiSessionManager"
>>> class="org.mortbay.jetty.servlet.wadi.WadiSessionManager">
>>>          <Arg><Ref id="wadiCluster"/></Arg>
>>>          <Arg type="int">2</Arg>
>>>          <Arg type="int">24</Arg>
>>>          <Arg type="int">360</Arg>
>>>          <Arg type="boolean">true</Arg>
>>>          <Arg type="boolean">false</Arg>
>>>        </New>
>>>      </Arg>
>>>    </New>
>>>  </Set>
>>>
>>> </Configure>
>>>
>>>
>>> Is this correct? Also the third Arg of WadiCluster doesn't seem to
>>> work, as I don't see jetty listening on 8080.
>>> I have set up my own web app using AJP and proxied by Apache. How
>>> can I set up wadi-console to be accessed via 8080 directly?
>>> I just want to keep it "internal". Thanks again.
>>>
>>>
>>> Regards,
>>> Shunde Zhang
>>> Australian Research Collaboration Services (ARCS), "Providing
>>> collaboration services and tools for the Australian research community"
>>> Email: shunde.zhang@...
>>> eResearch SA (eRSA), "Enabling Discovery, Innovation and
>>> Collaboration through eResearch"
>>> Email: shunde.zhang@...
>>> School of Computer Science, The University of Adelaide, "Life Impact"
>>> Email: shunde.zhang@...
>>> Phone: +61 8 83038265
>>>
>>>
>>>
>>>
>>>
>>>
>>> On 31/05/2009, at 9:01 AM, Gianny Damour wrote:
>>>
>>>> Hi Shunde,
>>>>
>>>> Good to hear that you get it to work.
>>>>
>>>> WADi provides an independent administration console, wadi-console,
>>>> that you can download from here:
>>>>
>>>> http://wadi.codehaus.org/ (choose the wadi-console artifact).
>>>>
>>>>
>>>> This is a standard Web application to be deployed to one of your
>>>> clustered Jetty instances.  It can be used to monitor cluster
>>>> memberships, clustered Web applications, sessions, their locations,
>>>> the distribution of partition indexes  and message exchange rates.
>>>> Look at the page
>>>>
>>>> http://docs.codehaus.org/display/WADI/Home
>>>>
>>>> and browse the WADI Administration Console links for more details.
>>>>
>>>>
>>>> The WADI console is a very thin user interface which builds upon an
>>>> admin API using the command pattern to execute distributed
>>>> operations on each cluster node (kind of map-reduce pattern). It is
>>>> very easy to add new commands to say show the attributes of a given
>>>> session.
>>>>
>>>> Have a look at the WIKI and let me know if you require specific
>>>> features.
>>>>
>>>> Thanks,
>>>> Gianny
>>>>
>>>>
>>>> On 29/05/2009, at 5:05 PM, Shunde Zhang wrote:
>>>>
>>>>> Hi Gianny,
>>>>>
>>>>> I think I made it work, then how can I open the admin console?
>>>>> Can I know how many attributes are shared? Can I know the value of
>>>>> them?
>>>>>
>>>>>
>>>>> Regards,
>>>>> Shunde Zhang
>>>>> Australian Research Collaboration Services (ARCS), "Providing
>>>>> collaboration services and tools for the Australian research
>>>>> community"
>>>>> Email: shunde.zhang@...
>>>>> eResearch SA (eRSA), "Enabling Discovery, Innovation and
>>>>> Collaboration through eResearch"
>>>>> Email: shunde.zhang@...
>>>>> School of Computer Science, The University of Adelaide, "Life Impact"
>>>>> Email: shunde.zhang@...
>>>>> Phone: +61 8 83038265
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On 29/05/2009, at 3:47 PM, gianny.damour@... wrote:
>>>>>
>>>>>> Hi Shunde,
>>>>>>
>>>>>> You should start your server the way you use to start it. If you
>>>>>> were using etc/jetty.xml, then continue to use this Jetty server
>>>>>> configuration to start Jetty.
>>>>>>
>>>>>> When you package your application for deployment to Jetty, you
>>>>>> need to configure your application to use WADI. Basically, you
>>>>>> need to include a file WEB-INF/jetty-web.xml in your module
>>>>>> (beside your web.xml deployment descriptor). This file looks like
>>>>>> the file you previously posted.
>>>>>>
>>>>>> The instructions after the code snippet on this page:
>>>>>>
>>>>>> http://docs.codehaus.org/display/JETTY/Jetty+Clustering+with+WADI
>>>>>>
>>>>>> indicate how to do the same thing by dropping a new context xml
>>>>>> config file in the contexts directory of Jetty.
>>>>>>
>>>>>> Thanks,
>>>>>> Gianny
>>>>>>
>>>>>>> Shunde Zhang <shunde.zhang@...> wrote:
>>>>>>>
>>>>>>> Hi Gianny,
>>>>>>>
>>>>>>> There is nothing in http://myserver:7070/
>>>>>>>
>>>>>>> Do I need to include the previous jetty.xml?
>>>>>>> e.g.
>>>>>>>
>>>>>>> java -Djetty.home=/opt/jetty -Djetty.port=7070 -Dnode.name=orange -
>>>>>>> Djava.net.preferIPv4Stack=true -jar start.jar etc/jetty.xml
>>>>>>> etc/jetty-
>>>>>>> wadi-cluster.xml
>>>>>>>
>>>>>>>
>>>>>>> Regards,
>>>>>>> Shunde Zhang
>>>>>>> Australian Research Collaboration Services (ARCS), "Providing
>>>>>>> collaboration services and tools for the Australian research
>>>>>>> community"
>>>>>>> Email: shunde.zhang@...
>>>>>>> eResearch SA (eRSA), "Enabling Discovery, Innovation and
>>>>>>> Collaboration
>>>>>>> through eResearch"
>>>>>>> Email: shunde.zhang@...
>>>>>>> School of Computer Science, The University of Adelaide, "Life
>>>>>>> Impact"
>>>>>>> Email: shunde.zhang@...
>>>>>>> Phone: +61 8 83038265
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On 29/05/2009, at 12:27 PM, gianny.damour@... wrote:
>>>>>>>
>>>>>>>> java -Djetty.home=/opt/jetty -Djetty.port=7070 -Dnode.name=orange -
>>>>>>>> Djava.net.preferIPv4Stack=true -jar start.jar etc/jetty-wadi-
>>>>>>>> cluster.xml
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe from this list, please visit:
>>>>>>
>>>>>>  http://xircles.codehaus.org/manage_email
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe from this list, please visit:
>>>>
>>>>  http://xircles.codehaus.org/manage_email
>>>>
>>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>   http://xircles.codehaus.org/manage_email
>>
>>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: WADI and jetty 6

by Shunde Zhang :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I have this:

<Proxy balancer://my_cluster>
    BalancerMember ajp://localhost:8009 flushpackets=on
    BalancerMember ajp://localhost:8010 flushpackets=on
</Proxy>

What do you mean a 'route'? Am I missing anything?

And, is there a way to specify if requests coming from one client, they all go to one node in the cluster?


Regards,
Shunde Zhang
Australian Research Collaboration Services (ARCS), "Providing collaboration services and tools for the Australian research community"
eResearch SA (eRSA), "Enabling Discovery, Innovation and Collaboration through eResearch"
School of Computer Science, The University of Adelaide, "Life Impact"
Phone: +61 8 83038265






On 19/06/2009, at 9:29 AM, Filip Hanik - Dev Lists wrote:

Shunde Zhang wrote:
Hi Gianny,

I finally got this to work. It is really cool!

I have another issue, not related to WADI, but maybe you know the answer :)
My web app is actually a WebDAV interface. Some WebDAV client, like Mac Finder, doesn't support session. Others do.
When I monitor the jetty log, I notice that those with session support only send requests to one node of WADI cluster.
In other words, requests are only sent to one node by Apache.
But for requests coming from Mac Finder, all nodes get the requests, which makes the web app behave strangely.

How I configure Apache is:
ProxyPass /ARCS/ balancer://my_cluster/MYWEBAPP/ stickysession=JSESSIONID|jsessionid nofailover=On
yes, but have you configured stickyness? ie, a 'route' in your <Proxy balancer://xxxx>

I guess it identifies each request by session ID. If there is no session ID, it will send requests to all nodes?
no, it picks one.
Could you give me a hint on how to configure Apache properly? Thanks a lot!

There is a risk that the way you have it set up would cause round robin on every request.

Regards,
Shunde Zhang
Australian Research Collaboration Services (ARCS), "Providing collaboration services and tools for the Australian research community"
Email: shunde.zhang@... <shunde.zhang@...>
eResearch SA (eRSA), "/Enabling Discovery, Innovation and Collaboration through eResearch/"
Email: shunde.zhang@... <shunde.zhang@...>
School of Computer Science, The University of Adelaide, "/Life Impact/"
Email: shunde.zhang@... <shunde.zhang@...>
Phone: +61 8 83038265






On 03/06/2009, at 8:23 PM, Gianny Damour wrote:

Hi Shunde,

The ClassCastException is due to the fact that wadi-console is loading the class org.codehaus.wadi.servicespace.ServiceName from the Web-application class loader instead of the Jetty class loader. Here is the jetty-web.xml file that you should use to deploy wadi-console:

<?xml version="1.0"  encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
<Configure class="org.mortbay.jetty.webapp.WebAppContext">
<Set name="contextPath">/wadi-console</Set>
<Set name="parentLoaderPriority">true</Set>
</Configure>

By setting the property parentLoaderPriority to true, class loading is performed according to the standard class loading delegating strategy, i.e. first try to load classes via the parent class loader and then fallback to the current one if necessary.

Note that you do not need to set-up a WadiCluster or WadiSessionManager like you have done for your clustered application. wadi-console knows about all the WadiCluster and WadiSessionManager instantiated by the running Jetty container using a static registry mechanism.


The admin console is a simple Web application and can be accessed through the standard HTTP connectors you have configured. For instance, if you start Jetty using the command

java -Djetty.home=/opt/jetty -Djetty.port=7070 -Dnode.name=orange -Djava.net.preferIPv4Stack=true -jar start.jar

then you can access the console via this URL:

http://myserver:7070/wadi-console/


If you want the console to be only available internally, then I suggest you to:
1. define a DNS entry for the Jetty instance which will run the WADI console; and
2. DO NOT configure Apache as a reverse-proxy for the WADI console. You should configure Apache to only be a reverse-proxy for the application you want to be exposed.

Assuming you created a DNS entry binding adminserver to the IP address of the Jetty instance running the WADI console and that you started this Jetty instance with -Djetty.port=8080 you will be able to access the console via the URL

http://adminserver: 8080/wadi-console/

Thanks,
Gianny

P.S.: here is the plan I have been using to test Jetty 6.1.18 with the wadi-webapp application (you can download it from http://wadi.codehaus.org/ see wadi-webapp release artifact)


<?xml version="1.0"  encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">

<Configure class="org.mortbay.jetty.webapp.WebAppContext">
<Set name="contextPath">/wadi-webapp</Set>

<Set name="extractWAR">false</Set>
<Set name="copyWebDir">false</Set>
<Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefaults.xml</Set>

<New id="wadiCluster" class="org.mortbay.jetty.servlet.wadi.WadiCluster">
  <Arg>CLUSTER</Arg>
  <Arg><SystemProperty name="node.name" default="red"/></Arg>
  <Arg>http://localhost:<SystemProperty name="jetty.port" default="8080"/>/wadi-webapp</Arg>
  <Call name="start"/>
</New>

<Set name="SessionHandler">
  <New class="org.mortbay.jetty.servlet.wadi.WadiSessionHandler">
    <Arg>
      <New id="wadiSessionManager" class="org.mortbay.jetty.servlet.wadi.WadiSessionManager">
        <Arg><Ref id="wadiCluster"/></Arg>
        <Arg type="int">2</Arg>
        <Arg type="int">24</Arg>
        <Arg type="int">360</Arg>
        <Arg type="boolean">true</Arg>
        <Arg type="boolean">false</Arg>

        <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
        <!-- Uncomment these elements to enable session persistence across   -->
        <!-- context or container restart.                                   -->
        <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
        <!--
        <Set name="SharedStore">
          <New id="sharedStore" class="org.codehaus.wadi.core.store.DatabaseStore">
            <Arg>
              <New id="sharedStoreDatabase" class="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource">
                <Set name="Url">jdbc:mysql://localhost:3306/TEST</Set>
                <Set name="User">wadi</Set>
                <Set name="Password">wadi_pass</Set>
              </New>
            </Arg>
            <Arg type="java.lang.String">SESSION_TABLE</Arg>
            <Arg type="java.lang.String">BYTEA</Arg>
            <Arg type="boolean">true</Arg>
            <Arg type="boolean">false</Arg>
          </New>
        </Set>
         -->
    <Set name="maxInactiveInterval">360</Set>
      </New>
    </Arg>
  </New>
</Set>

</Configure>



On 03/06/2009, at 10:48 AM, Shunde Zhang wrote:

Hi Gianny,

I tried to start jetty with wadi-console war but I got:

2009-06-03 10:13:33.392::INFO:  Extract jar:file:/opt/davis1/wadi-console-2.1.1.war!/ to /tmp/Jetty_0_0_0_0_8080_wadi.console.2.1.1.war____.2gu4c1/webapp
2009-06-03 10:13:34.589::INFO:  NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet
Jun 3, 2009 10:13:35 AM org.codehaus.wadi.servicespace.basic.BasicSingletonServiceHolder onElection
INFO: [TribesPeer [jetty1; tcp://129.127.96.93:4001]] owns singleton service [PartitionManager for ServiceSpace [/]]
Jun 3, 2009 10:13:37 AM org.codehaus.wadi.group.impl.BasicEnvelopeDispatcherManager$DispatchRunner run
SEVERE: problem dispatching message
java.lang.ClassCastException: org.codehaus.wadi.servicespace.ServiceName cannot be cast to org.codehaus.wadi.servicespace.ServiceName
      at org.codehaus.wadi.servicespace.basic.EnvelopeServiceHelper.getServiceName(EnvelopeServiceHelper.java:35)
      at org.codehaus.wadi.servicespace.basic.ServiceInvocationListener.testDispatchEnvelope(ServiceInvocationListener.java:68)
      at org.codehaus.wadi.group.impl.ServiceEndpointWrapper.testDispatchEnvelope(ServiceEndpointWrapper.java:58)
      at org.codehaus.wadi.group.impl.BasicEnvelopeDispatcherManager.onEnvelope(BasicEnvelopeDispatcherManager.java:88)
      at org.codehaus.wadi.group.impl.AbstractDispatcher.doOnEnvelope(AbstractDispatcher.java:104)
      at org.codehaus.wadi.group.impl.AbstractDispatcher.onEnvelope(AbstractDispatcher.java:100)
      at org.codehaus.wadi.servicespace.basic.ServiceSpaceEndpoint.dispatch(ServiceSpaceEndpoint.java:49)
      at org.codehaus.wadi.group.impl.ServiceEndpointWrapper.dispatch(ServiceEndpointWrapper.java:50)
      at org.codehaus.wadi.group.impl.BasicEnvelopeDispatcherManager$DispatchRunner.run(BasicEnvelopeDispatcherManager.java:121)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:619)


I have a config xml in contexts:

<?xml version="1.0"  encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">

<Configure class="org.mortbay.jetty.webapp.WebAppContext">
<Set name="contextPath">/</Set>
<Set name="war"><SystemProperty name="jetty.home" default="."/>/wadi-console-2.1.1.war</Set>
<Set name="extractWAR">true</Set>
<Set name="copyWebDir">true</Set>
<Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Set>

<New id="wadiCluster" class="org.mortbay.jetty.servlet.wadi.WadiCluster">
  <Arg>CLUSTER</Arg>
  <Arg><SystemProperty name="node.name" default="red"/></Arg>
  <Arg>http://<SystemProperty name="jetty.host"/>:<SystemProperty name="jetty.port" default="8080"/>/</Arg>
  <Call name="start"/>
</New>

<Set name="SessionHandler">
  <New class="org.mortbay.jetty.servlet.wadi.WadiSessionHandler">
    <Arg>
      <New id="wadiSessionManager" class="org.mortbay.jetty.servlet.wadi.WadiSessionManager">
        <Arg><Ref id="wadiCluster"/></Arg>
        <Arg type="int">2</Arg>
        <Arg type="int">24</Arg>
        <Arg type="int">360</Arg>
        <Arg type="boolean">true</Arg>
        <Arg type="boolean">false</Arg>
      </New>
    </Arg>
  </New>
</Set>

</Configure>


Is this correct? Also the third Arg of WadiCluster doesn't seem to work, as I don't see jetty listening on 8080.
I have set up my own web app using AJP and proxied by Apache. How can I set up wadi-console to be accessed via 8080 directly?
I just want to keep it "internal". Thanks again.


Regards,
Shunde Zhang
Australian Research Collaboration Services (ARCS), "Providing collaboration services and tools for the Australian research community"
Email: shunde.zhang@...
eResearch SA (eRSA), "Enabling Discovery, Innovation and Collaboration through eResearch"
Email: shunde.zhang@...
School of Computer Science, The University of Adelaide, "Life Impact"
Email: shunde.zhang@...
Phone: +61 8 83038265






On 31/05/2009, at 9:01 AM, Gianny Damour wrote:

Hi Shunde,

Good to hear that you get it to work.

WADi provides an independent administration console, wadi-console, that you can download from here:

http://wadi.codehaus.org/ (choose the wadi-console artifact).


This is a standard Web application to be deployed to one of your clustered Jetty instances.  It can be used to monitor cluster memberships, clustered Web applications, sessions, their locations, the distribution of partition indexes  and message exchange rates. Look at the page

http://docs.codehaus.org/display/WADI/Home

and browse the WADI Administration Console links for more details.


The WADI console is a very thin user interface which builds upon an admin API using the command pattern to execute distributed operations on each cluster node (kind of map-reduce pattern). It is very easy to add new commands to say show the attributes of a given session.

Have a look at the WIKI and let me know if you require specific features.

Thanks,
Gianny


On 29/05/2009, at 5:05 PM, Shunde Zhang wrote:

Hi Gianny,

I think I made it work, then how can I open the admin console?
Can I know how many attributes are shared? Can I know the value of them?


Regards,
Shunde Zhang
Australian Research Collaboration Services (ARCS), "Providing collaboration services and tools for the Australian research community"
Email: shunde.zhang@...
eResearch SA (eRSA), "Enabling Discovery, Innovation and Collaboration through eResearch"
Email: shunde.zhang@...
School of Computer Science, The University of Adelaide, "Life Impact"
Email: shunde.zhang@...
Phone: +61 8 83038265






On 29/05/2009, at 3:47 PM, gianny.damour@... wrote:

Hi Shunde,

You should start your server the way you use to start it. If you were using etc/jetty.xml, then continue to use this Jetty server configuration to start Jetty.

When you package your application for deployment to Jetty, you need to configure your application to use WADI. Basically, you need to include a file WEB-INF/jetty-web.xml in your module (beside your web.xml deployment descriptor). This file looks like the file you previously posted.

The instructions after the code snippet on this page:

http://docs.codehaus.org/display/JETTY/Jetty+Clustering+with+WADI

indicate how to do the same thing by dropping a new context xml config file in the contexts directory of Jetty.

Thanks,
Gianny

Shunde Zhang <shunde.zhang@...> wrote:

Hi Gianny,

There is nothing in http://myserver:7070/

Do I need to include the previous jetty.xml?
e.g.

java -Djetty.home=/opt/jetty -Djetty.port=7070 -Dnode.name=orange -
Djava.net.preferIPv4Stack=true -jar start.jar etc/jetty.xml etc/jetty-
wadi-cluster.xml


Regards,
Shunde Zhang
Australian Research Collaboration Services (ARCS), "Providing
collaboration services and tools for the Australian research community"
Email: shunde.zhang@...
eResearch SA (eRSA), "Enabling Discovery, Innovation and Collaboration
through eResearch"
Email: shunde.zhang@...
School of Computer Science, The University of Adelaide, "Life Impact"
Email: shunde.zhang@...
Phone: +61 8 83038265






On 29/05/2009, at 12:27 PM, gianny.damour@... wrote:

java -Djetty.home=/opt/jetty -Djetty.port=7070 -Dnode.name=orange -
Djava.net.preferIPv4Stack=true -jar start.jar etc/jetty-wadi-
cluster.xml

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

 http://xircles.codehaus.org/manage_email





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email




Re: WADI and jetty 6

by Filip Hanik - Dev Lists :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://www.markround.com/archives/33-Apache-mod_proxy-balancing-with-PHP-sticky-sessions.html
http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html
look for 'route'
Filip

Shunde Zhang wrote:

> Hi,
>
> I have this:
>
> <Proxy balancer://my_cluster>
>     BalancerMember ajp://localhost:8009 flushpackets=on
>     BalancerMember ajp://localhost:8010 flushpackets=on
> </Proxy>
>
> What do you mean a 'route'? Am I missing anything?
>
> And, is there a way to specify if requests coming from one client,
> they all go to one node in the cluster?
>
>
> Regards,
> Shunde Zhang
> Australian Research Collaboration Services (ARCS), "Providing
> collaboration services and tools for the Australian research community"
> Email: shunde.zhang@... <mailto:shunde.zhang@...>
> eResearch SA (eRSA), "/Enabling Discovery, Innovation and
> Collaboration through eResearch/"
> Email: shunde.zhang@...
> <mailto:shunde.zhang@...>
> School of Computer Science, The University of Adelaide, "/Life Impact/"
> Email: shunde.zhang@... <mailto:shunde.zhang@...>
> Phone: +61 8 83038265
>
>
>
>
>
>
> On 19/06/2009, at 9:29 AM, Filip Hanik - Dev Lists wrote:
>
>> Shunde Zhang wrote:
>>> Hi Gianny,
>>>
>>> I finally got this to work. It is really cool!
>>>
>>> I have another issue, not related to WADI, but maybe you know the
>>> answer :)
>>> My web app is actually a WebDAV interface. Some WebDAV client, like
>>> Mac Finder, doesn't support session. Others do.
>>> When I monitor the jetty log, I notice that those with session
>>> support only send requests to one node of WADI cluster.
>>> In other words, requests are only sent to one node by Apache.
>>> But for requests coming from Mac Finder, all nodes get the requests,
>>> which makes the web app behave strangely.
>>>
>>> How I configure Apache is:
>>> ProxyPass /ARCS/ balancer://my_cluster/MYWEBAPP/
>>> stickysession=JSESSIONID|jsessionid nofailover=On
>> yes, but have you configured stickyness? ie, a 'route' in your <Proxy
>> balancer://xxxx>
>>>
>>> I guess it identifies each request by session ID. If there is no
>>> session ID, it will send requests to all nodes?
>> no, it picks one.
>>> Could you give me a hint on how to configure Apache properly? Thanks
>>> a lot!
>>
>> There is a risk that the way you have it set up would cause round
>> robin on every request.
>>>
>>> Regards,
>>> Shunde Zhang
>>> Australian Research Collaboration Services (ARCS), "Providing
>>> collaboration services and tools for the Australian research community"
>>> Email: shunde.zhang@... <mailto:shunde.zhang@...>
>>> eResearch SA (eRSA), "/Enabling Discovery, Innovation and
>>> Collaboration through eResearch/"
>>> Email: shunde.zhang@...
>>> <mailto:shunde.zhang@...>
>>> School of Computer Science, The University of Adelaide, "/Life Impact/"
>>> Email: shunde.zhang@...
>>> <mailto:shunde.zhang@...>
>>> Phone: +61 8 83038265
>>>
>>>
>>>
>>>
>>>
>>>
>>> On 03/06/2009, at 8:23 PM, Gianny Damour wrote:
>>>
>>>> Hi Shunde,
>>>>
>>>> The ClassCastException is due to the fact that wadi-console is
>>>> loading the class org.codehaus.wadi.servicespace.ServiceName from
>>>> the Web-application class loader instead of the Jetty class loader.
>>>> Here is the jetty-web.xml file that you should use to deploy
>>>> wadi-console:
>>>>
>>>> <?xml version="1.0"  encoding="ISO-8859-1"?>
>>>> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD
>>>> Configure//EN" "http://jetty.mortbay.org/configure.dtd">
>>>> <Configure class="org.mortbay.jetty.webapp.WebAppContext">
>>>> <Set name="contextPath">/wadi-console</Set>
>>>> <Set name="parentLoaderPriority">true</Set>
>>>> </Configure>
>>>>
>>>> By setting the property parentLoaderPriority to true, class loading
>>>> is performed according to the standard class loading delegating
>>>> strategy, i.e. first try to load classes via the parent class
>>>> loader and then fallback to the current one if necessary.
>>>>
>>>> Note that you do not need to set-up a WadiCluster or
>>>> WadiSessionManager like you have done for your clustered
>>>> application. wadi-console knows about all the WadiCluster and
>>>> WadiSessionManager instantiated by the running Jetty container
>>>> using a static registry mechanism.
>>>>
>>>>
>>>> The admin console is a simple Web application and can be accessed
>>>> through the standard HTTP connectors you have configured. For
>>>> instance, if you start Jetty using the command
>>>>
>>>> java -Djetty.home=/opt/jetty -Djetty.port=7070 -Dnode.name=orange
>>>> -Djava.net.preferIPv4Stack=true -jar start.jar
>>>>
>>>> then you can access the console via this URL:
>>>>
>>>> http://myserver:7070/wadi-console/
>>>>
>>>>
>>>> If you want the console to be only available internally, then I
>>>> suggest you to:
>>>> 1. define a DNS entry for the Jetty instance which will run the
>>>> WADI console; and
>>>> 2. DO NOT configure Apache as a reverse-proxy for the WADI console.
>>>> You should configure Apache to only be a reverse-proxy for the
>>>> application you want to be exposed.
>>>>
>>>> Assuming you created a DNS entry binding adminserver to the IP
>>>> address of the Jetty instance running the WADI console and that you
>>>> started this Jetty instance with -Djetty.port=8080 you will be able
>>>> to access the console via the URL
>>>>
>>>> http://adminserver: 8080/wadi-console/
>>>>
>>>> Thanks,
>>>> Gianny
>>>>
>>>> P.S.: here is the plan I have been using to test Jetty 6.1.18 with
>>>> the wadi-webapp application (you can download it from
>>>> http://wadi.codehaus.org/ see wadi-webapp release artifact)
>>>>
>>>>
>>>> <?xml version="1.0"  encoding="ISO-8859-1"?>
>>>> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD
>>>> Configure//EN" "http://jetty.mortbay.org/configure.dtd">
>>>>
>>>> <Configure class="org.mortbay.jetty.webapp.WebAppContext">
>>>> <Set name="contextPath">/wadi-webapp</Set>
>>>>
>>>> <Set name="extractWAR">false</Set>
>>>> <Set name="copyWebDir">false</Set>
>>>> <Set name="defaultsDescriptor"><SystemProperty name="jetty.home"
>>>> default="."/>/etc/webdefaults.xml</Set>
>>>>
>>>> <New id="wadiCluster"
>>>> class="org.mortbay.jetty.servlet.wadi.WadiCluster">
>>>>   <Arg>CLUSTER</Arg>
>>>>   <Arg><SystemProperty name="node.name" default="red"/></Arg>
>>>>   <Arg>http://localhost:<SystemProperty name="jetty.port"
>>>> default="8080"/>/wadi-webapp</Arg>
>>>>   <Call name="start"/>
>>>> </New>
>>>>
>>>> <Set name="SessionHandler">
>>>>   <New class="org.mortbay.jetty.servlet.wadi.WadiSessionHandler">
>>>>     <Arg>
>>>>       <New id="wadiSessionManager"
>>>> class="org.mortbay.jetty.servlet.wadi.WadiSessionManager">
>>>>         <Arg><Ref id="wadiCluster"/></Arg>
>>>>         <Arg type="int">2</Arg>
>>>>         <Arg type="int">24</Arg>
>>>>         <Arg type="int">360</Arg>
>>>>         <Arg type="boolean">true</Arg>
>>>>         <Arg type="boolean">false</Arg>
>>>>
>>>>         <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - -
>>>> - - - - - -->
>>>>         <!-- Uncomment these elements to enable session persistence
>>>> across   -->
>>>>         <!-- context or container restart.
>>>>                                   -->
>>>>         <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - -
>>>> - - - - - -->
>>>>         <!--
>>>>         <Set name="SharedStore">
>>>>           <New id="sharedStore"
>>>> class="org.codehaus.wadi.core.store.DatabaseStore">
>>>>             <Arg>
>>>>               <New id="sharedStoreDatabase"
>>>> class="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource">
>>>>                 <Set name="Url">jdbc:mysql://localhost:3306/TEST</Set>
>>>>                 <Set name="User">wadi</Set>
>>>>                 <Set name="Password">wadi_pass</Set>
>>>>               </New>
>>>>             </Arg>
>>>>             <Arg type="java.lang.String">SESSION_TABLE</Arg>
>>>>             <Arg type="java.lang.String">BYTEA</Arg>
>>>>             <Arg type="boolean">true</Arg>
>>>>             <Arg type="boolean">false</Arg>
>>>>           </New>
>>>>         </Set>
>>>>          -->
>>>>     <Set name="maxInactiveInterval">360</Set>
>>>>       </New>
>>>>     </Arg>
>>>>   </New>
>>>> </Set>
>>>>
>>>> </Configure>
>>>>
>>>>
>>>>
>>>> On 03/06/2009, at 10:48 AM, Shunde Zhang wrote:
>>>>
>>>>> Hi Gianny,
>>>>>
>>>>> I tried to start jetty with wadi-console war but I got:
>>>>>
>>>>> 2009-06-03 10:13:33.392::INFO:  Extract
>>>>> jar:file:/opt/davis1/wadi-console-2.1.1.war!/ to
>>>>> /tmp/Jetty_0_0_0_0_8080_wadi.console.2.1.1.war____.2gu4c1/webapp
>>>>> 2009-06-03 10:13:34.589::INFO:  NO JSP Support for /, did not find
>>>>> org.apache.jasper.servlet.JspServlet
>>>>> Jun 3, 2009 10:13:35 AM
>>>>> org.codehaus.wadi.servicespace.basic.BasicSingletonServiceHolder
>>>>> onElection
>>>>> INFO: [TribesPeer [jetty1; tcp://129.127.96.93:4001]] owns
>>>>> singleton service [PartitionManager for ServiceSpace [/]]
>>>>> Jun 3, 2009 10:13:37 AM
>>>>> org.codehaus.wadi.group.impl.BasicEnvelopeDispatcherManager$DispatchRunner
>>>>> run
>>>>> SEVERE: problem dispatching message
>>>>> java.lang.ClassCastException:
>>>>> org.codehaus.wadi.servicespace.ServiceName cannot be cast to
>>>>> org.codehaus.wadi.servicespace.ServiceName
>>>>>       at
>>>>> org.codehaus.wadi.servicespace.basic.EnvelopeServiceHelper.getServiceName(EnvelopeServiceHelper.java:35)
>>>>>       at
>>>>> org.codehaus.wadi.servicespace.basic.ServiceInvocationListener.testDispatchEnvelope(ServiceInvocationListener.java:68)
>>>>>       at
>>>>> org.codehaus.wadi.group.impl.ServiceEndpointWrapper.testDispatchEnvelope(ServiceEndpointWrapper.java:58)
>>>>>       at
>>>>> org.codehaus.wadi.group.impl.BasicEnvelopeDispatcherManager.onEnvelope(BasicEnvelopeDispatcherManager.java:88)
>>>>>       at
>>>>> org.codehaus.wadi.group.impl.AbstractDispatcher.doOnEnvelope(AbstractDispatcher.java:104)
>>>>>       at
>>>>> org.codehaus.wadi.group.impl.AbstractDispatcher.onEnvelope(AbstractDispatcher.java:100)
>>>>>       at
>>>>> org.codehaus.wadi.servicespace.basic.ServiceSpaceEndpoint.dispatch(ServiceSpaceEndpoint.java:49)
>>>>>       at
>>>>> org.codehaus.wadi.group.impl.ServiceEndpointWrapper.dispatch(ServiceEndpointWrapper.java:50)
>>>>>       at
>>>>> org.codehaus.wadi.group.impl.BasicEnvelopeDispatcherManager$DispatchRunner.run(BasicEnvelopeDispatcherManager.java:121)
>>>>>       at
>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>>>>>       at
>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>>>>>       at java.lang.Thread.run(Thread.java:619)
>>>>>
>>>>>
>>>>> I have a config xml in contexts:
>>>>>
>>>>> <?xml version="1.0"  encoding="ISO-8859-1"?>
>>>>> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD
>>>>> Configure//EN" "http://jetty.mortbay.org/configure.dtd">
>>>>>
>>>>> <Configure class="org.mortbay.jetty.webapp.WebAppContext">
>>>>> <Set name="contextPath">/</Set>
>>>>> <Set name="war"><SystemProperty name="jetty.home"
>>>>> default="."/>/wadi-console-2.1.1.war</Set>
>>>>> <Set name="extractWAR">true</Set>
>>>>> <Set name="copyWebDir">true</Set>
>>>>> <Set name="defaultsDescriptor"><SystemProperty name="jetty.home"
>>>>> default="."/>/etc/webdefault.xml</Set>
>>>>>
>>>>> <New id="wadiCluster"
>>>>> class="org.mortbay.jetty.servlet.wadi.WadiCluster">
>>>>>   <Arg>CLUSTER</Arg>
>>>>>   <Arg><SystemProperty name="node.name" default="red"/></Arg>
>>>>>   <Arg>http://<SystemProperty name="jetty.host"/>:<SystemProperty
>>>>> name="jetty.port" default="8080"/>/</Arg>
>>>>>   <Call name="start"/>
>>>>> </New>
>>>>>
>>>>> <Set name="SessionHandler">
>>>>>   <New class="org.mortbay.jetty.servlet.wadi.WadiSessionHandler">
>>>>>     <Arg>
>>>>>       <New id="wadiSessionManager"
>>>>> class="org.mortbay.jetty.servlet.wadi.WadiSessionManager">
>>>>>         <Arg><Ref id="wadiCluster"/></Arg>
>>>>>         <Arg type="int">2</Arg>
>>>>>         <Arg type="int">24</Arg>
>>>>>         <Arg type="int">360</Arg>
>>>>>         <Arg type="boolean">true</Arg>
>>>>>         <Arg type="boolean">false</Arg>
>>>>>       </New>
>>>>>     </Arg>
>>>>>   </New>
>>>>> </Set>
>>>>>
>>>>> </Configure>
>>>>>
>>>>>
>>>>> Is this correct? Also the third Arg of WadiCluster doesn't seem to
>>>>> work, as I don't see jetty listening on 8080.
>>>>> I have set up my own web app using AJP and proxied by Apache. How
>>>>> can I set up wadi-console to be accessed via 8080 directly?
>>>>> I just want to keep it "internal". Thanks again.
>>>>>
>>>>>
>>>>> Regards,
>>>>> Shunde Zhang
>>>>> Australian Research Collaboration Services (ARCS), "Providing
>>>>> collaboration services and tools for the Australian research
>>>>> community"
>>>>> Email: shunde.zhang@... <mailto:shunde.zhang@...>
>>>>> eResearch SA (eRSA), "Enabling Discovery, Innovation and
>>>>> Collaboration through eResearch"
>>>>> Email: shunde.zhang@...
>>>>> <mailto:shunde.zhang@...>
>>>>> School of Computer Science, The University of Adelaide, "Life Impact"
>>>>> Email: shunde.zhang@...
>>>>> <mailto:shunde.zhang@...>
>>>>> Phone: +61 8 83038265
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On 31/05/2009, at 9:01 AM, Gianny Damour wrote:
>>>>>
>>>>>> Hi Shunde,
>>>>>>
>>>>>> Good to hear that you get it to work.
>>>>>>
>>>>>> WADi provides an independent administration console,
>>>>>> wadi-console, that you can download from here:
>>>>>>
>>>>>> http://wadi.codehaus.org/ (choose the wadi-console artifact).
>>>>>>
>>>>>>
>>>>>> This is a standard Web application to be deployed to one of your
>>>>>> clustered Jetty instances.  It can be used to monitor cluster
>>>>>> memberships, clustered Web applications, sessions, their
>>>>>> locations, the distribution of partition indexes  and message
>>>>>> exchange rates. Look at the page
>>>>>>
>>>>>> http://docs.codehaus.org/display/WADI/Home
>>>>>>
>>>>>> and browse the WADI Administration Console links for more details.
>>>>>>
>>>>>>
>>>>>> The WADI console is a very thin user interface which builds upon
>>>>>> an admin API using the command pattern to execute distributed
>>>>>> operations on each cluster node (kind of map-reduce pattern). It
>>>>>> is very easy to add new commands to say show the attributes of a
>>>>>> given session.
>>>>>>
>>>>>> Have a look at the WIKI and let me know if you require specific
>>>>>> features.
>>>>>>
>>>>>> Thanks,
>>>>>> Gianny
>>>>>>
>>>>>>
>>>>>> On 29/05/2009, at 5:05 PM, Shunde Zhang wrote:
>>>>>>
>>>>>>> Hi Gianny,
>>>>>>>
>>>>>>> I think I made it work, then how can I open the admin console?
>>>>>>> Can I know how many attributes are shared? Can I know the value
>>>>>>> of them?
>>>>>>>
>>>>>>>
>>>>>>> Regards,
>>>>>>> Shunde Zhang
>>>>>>> Australian Research Collaboration Services (ARCS), "Providing
>>>>>>> collaboration services and tools for the Australian research
>>>>>>> community"
>>>>>>> Email: shunde.zhang@... <mailto:shunde.zhang@...>
>>>>>>> eResearch SA (eRSA), "Enabling Discovery, Innovation and
>>>>>>> Collaboration through eResearch"
>>>>>>> Email: shunde.zhang@...
>>>>>>> <mailto:shunde.zhang@...>
>>>>>>> School of Computer Science, The University of Adelaide, "Life
>>>>>>> Impact"
>>>>>>> Email: shunde.zhang@...
>>>>>>> <mailto:shunde.zhang@...>
>>>>>>> Phone: +61 8 83038265
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On 29/05/2009, at 3:47 PM, gianny.damour@...
>>>>>>> <mailto:gianny.damour@...> wrote:
>>>>>>>
>>>>>>>> Hi Shunde,
>>>>>>>>
>>>>>>>> You should start your server the way you use to start it. If
>>>>>>>> you were using etc/jetty.xml, then continue to use this Jetty
>>>>>>>> server configuration to start Jetty.
>>>>>>>>
>>>>>>>> When you package your application for deployment to Jetty, you
>>>>>>>> need to configure your application to use WADI. Basically, you
>>>>>>>> need to include a file WEB-INF/jetty-web.xml in your module
>>>>>>>> (beside your web.xml deployment descriptor). This file looks
>>>>>>>> like the file you previously posted.
>>>>>>>>
>>>>>>>> The instructions after the code snippet on this page:
>>>>>>>>
>>>>>>>> http://docs.codehaus.org/display/JETTY/Jetty+Clustering+with+WADI
>>>>>>>>
>>>>>>>> indicate how to do the same thing by dropping a new context xml
>>>>>>>> config file in the contexts directory of Jetty.
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Gianny
>>>>>>>>
>>>>>>>>> Shunde Zhang <shunde.zhang@...
>>>>>>>>> <mailto:shunde.zhang@...>> wrote:
>>>>>>>>>
>>>>>>>>> Hi Gianny,
>>>>>>>>>
>>>>>>>>> There is nothing in http://myserver:7070/
>>>>>>>>>
>>>>>>>>> Do I need to include the previous jetty.xml?
>>>>>>>>> e.g.
>>>>>>>>>
>>>>>>>>> java -Djetty.home=/opt/jetty -Djetty.port=7070
>>>>>>>>> -Dnode.name=orange -
>>>>>>>>> Djava.net.preferIPv4Stack=true -jar start.jar etc/jetty.xml
>>>>>>>>> etc/jetty-
>>>>>>>>> wadi-cluster.xml
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>> Shunde Zhang
>>>>>>>>> Australian Research Collaboration Services (ARCS), "Providing
>>>>>>>>> collaboration services and tools for the Australian research
>>>>>>>>> community"
>>>>>>>>> Email: shunde.zhang@... <mailto:shunde.zhang@...>
>>>>>>>>> eResearch SA (eRSA), "Enabling Discovery, Innovation and
>>>>>>>>> Collaboration
>>>>>>>>> through eResearch"
>>>>>>>>> Email: shunde.zhang@...
>>>>>>>>> <mailto:shunde.zhang@...>
>>>>>>>>> School of Computer Science, The University of Adelaide, "Life
>>>>>>>>> Impact"
>>>>>>>>> Email: shunde.zhang@...
>>>>>>>>> <mailto:shunde.zhang@...>
>>>>>>>>> Phone: +61 8 83038265
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 29/05/2009, at 12:27 PM, gianny.damour@...
>>>>>>>>> <mailto:gianny.damour@...> wrote:
>>>>>>>>>
>>>>>>>>>> java -Djetty.home=/opt/jetty -Djetty.port=7070
>>>>>>>>>> -Dnode.name=orange -
>>>>>>>>>> Djava.net.preferIPv4Stack=true -jar start.jar etc/jetty-wadi-
>>>>>>>>>> cluster.xml
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe from this list, please visit:
>>>>>>>>
>>>>>>>> http://xircles.codehaus.org/manage_email
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe from this list, please visit:
>>>>>>
>>>>>> http://xircles.codehaus.org/manage_email
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe from this list, please visit:
>>>>
>>>>  http://xircles.codehaus.org/manage_email
>>>>
>>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>   http://xircles.codehaus.org/manage_email
>>
>>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: WADI and jetty 6

by Shunde Zhang :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Filip,

Thanks!

One more question, in the document you sent me, they can change the cookie in a virtual host, e.g.

RewriteEngine On
RewriteRule .* - [CO=BALANCEID:balancer.www1:.example.com]

However, I am using mod_proxy_ajp. So, how can I change the cookie for a AJP session?
Besides, the client doesn't seem to support cookie/session. Is there a way to use the apache child ID?
(I guess one apache child process is to handle requests from one client, isn't it?)


Regards,
Shunde Zhang
Australian Research Collaboration Services (ARCS), "Providing collaboration services and tools for the Australian research community"
eResearch SA (eRSA), "Enabling Discovery, Innovation and Collaboration through eResearch"
School of Computer Science, The University of Adelaide, "Life Impact"
Phone: +61 8 83038265






On 20/06/2009, at 7:01 AM, Filip Hanik - Dev Lists wrote:

http://www.markround.com/archives/33-Apache-mod_proxy-balancing-with-PHP-sticky-sessions.html
http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html
look for 'route'
Filip

Shunde Zhang wrote:
Hi,

I have this:

<Proxy balancer://my_cluster>
   BalancerMember ajp://localhost:8009 flushpackets=on
   BalancerMember ajp://localhost:8010 flushpackets=on
</Proxy>

What do you mean a 'route'? Am I missing anything?

And, is there a way to specify if requests coming from one client, they all go to one node in the cluster?


Regards,
Shunde Zhang
Australian Research Collaboration Services (ARCS), "Providing collaboration services and tools for the Australian research community"
Email: shunde.zhang@... <mailto:shunde.zhang@...>
eResearch SA (eRSA), "/Enabling Discovery, Innovation and Collaboration through eResearch/"
Email: shunde.zhang@... <mailto:shunde.zhang@...>
School of Computer Science, The University of Adelaide, "/Life Impact/"
Email: shunde.zhang@... <mailto:shunde.zhang@...>
Phone: +61 8 83038265






On 19/06/2009, at 9:29 AM, Filip Hanik - Dev Lists wrote:

Shunde Zhang wrote:
Hi Gianny,

I finally got this to work. It is really cool!

I have another issue, not related to WADI, but maybe you know the answer :)
My web app is actually a WebDAV interface. Some WebDAV client, like Mac Finder, doesn't support session. Others do.
When I monitor the jetty log, I notice that those with session support only send requests to one node of WADI cluster.
In other words, requests are only sent to one node by Apache.
But for requests coming from Mac Finder, all nodes get the requests, which makes the web app behave strangely.

How I configure Apache is:
ProxyPass /ARCS/ balancer://my_cluster/MYWEBAPP/ stickysession=JSESSIONID|jsessionid nofailover=On
yes, but have you configured stickyness? ie, a 'route' in your <Proxy balancer://xxxx>

I guess it identifies each request by session ID. If there is no session ID, it will send requests to all nodes?
no, it picks one.
Could you give me a hint on how to configure Apache properly? Thanks a lot!

There is a risk that the way you have it set up would cause round robin on every request.

Regards,
Shunde Zhang
Australian Research Collaboration Services (ARCS), "Providing collaboration services and tools for the Australian research community"
Email: shunde.zhang@... <mailto:shunde.zhang@...>
eResearch SA (eRSA), "/Enabling Discovery, Innovation and Collaboration through eResearch/"
Email: shunde.zhang@... <mailto:shunde.zhang@...>
School of Computer Science, The University of Adelaide, "/Life Impact/"
Email: shunde.zhang@... <mailto:shunde.zhang@...>
Phone: +61 8 83038265






On 03/06/2009, at 8:23 PM, Gianny Damour wrote:

Hi Shunde,

The ClassCastException is due to the fact that wadi-console is loading the class org.codehaus.wadi.servicespace.ServiceName from the Web-application class loader instead of the Jetty class loader. Here is the jetty-web.xml file that you should use to deploy wadi-console:

<?xml version="1.0"  encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
<Configure class="org.mortbay.jetty.webapp.WebAppContext">
<Set name="contextPath">/wadi-console</Set>
<Set name="parentLoaderPriority">true</Set>
</Configure>

By setting the property parentLoaderPriority to true, class loading is performed according to the standard class loading delegating strategy, i.e. first try to load classes via the parent class loader and then fallback to the current one if necessary.

Note that you do not need to set-up a WadiCluster or WadiSessionManager like you have done for your clustered application. wadi-console knows about all the WadiCluster and WadiSessionManager instantiated by the running Jetty container using a static registry mechanism.


The admin console is a simple Web application and can be accessed through the standard HTTP connectors you have configured. For instance, if you start Jetty using the command

java -Djetty.home=/opt/jetty -Djetty.port=7070 -Dnode.name=orange -Djava.net.preferIPv4Stack=true -jar start.jar

then you can access the console via this URL:

http://myserver:7070/wadi-console/


If you want the console to be only available internally, then I suggest you to:
1. define a DNS entry for the Jetty instance which will run the WADI console; and
2. DO NOT configure Apache as a reverse-proxy for the WADI console. You should configure Apache to only be a reverse-proxy for the application you want to be exposed.

Assuming you created a DNS entry binding adminserver to the IP address of the Jetty instance running the WADI console and that you started this Jetty instance with -Djetty.port=8080 you will be able to access the console via the URL

http://adminserver: 8080/wadi-console/

Thanks,
Gianny

P.S.: here is the plan I have been using to test Jetty 6.1.18 with the wadi-webapp application (you can download it from http://wadi.codehaus.org/ see wadi-webapp release artifact)


<?xml version="1.0"  encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">

<Configure class="org.mortbay.jetty.webapp.WebAppContext">
<Set name="contextPath">/wadi-webapp</Set>

<Set name="extractWAR">false</Set>
<Set name="copyWebDir">false</Set>
<Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefaults.xml</Set>

<New id="wadiCluster" class="org.mortbay.jetty.servlet.wadi.WadiCluster">
 <Arg>CLUSTER</Arg>
 <Arg><SystemProperty name="node.name" default="red"/></Arg>
 <Arg>http://localhost:<SystemProperty name="jetty.port" default="8080"/>/wadi-webapp</Arg>
 <Call name="start"/>
</New>

<Set name="SessionHandler">
 <New class="org.mortbay.jetty.servlet.wadi.WadiSessionHandler">
   <Arg>
     <New id="wadiSessionManager" class="org.mortbay.jetty.servlet.wadi.WadiSessionManager">
       <Arg><Ref id="wadiCluster"/></Arg>
       <Arg type="int">2</Arg>
       <Arg type="int">24</Arg>
       <Arg type="int">360</Arg>
       <Arg type="boolean">true</Arg>
       <Arg type="boolean">false</Arg>

       <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
       <!-- Uncomment these elements to enable session persistence across   -->
       <!-- context or container restart.                                   -->
       <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
       <!--
       <Set name="SharedStore">
         <New id="sharedStore" class="org.codehaus.wadi.core.store.DatabaseStore">
           <Arg>
             <New id="sharedStoreDatabase" class="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource">
               <Set name="Url">jdbc:mysql://localhost:3306/TEST</Set>
               <Set name="User">wadi</Set>
               <Set name="Password">wadi_pass</Set>
             </New>
           </Arg>
           <Arg type="java.lang.String">SESSION_TABLE</Arg>
           <Arg type="java.lang.String">BYTEA</Arg>
           <Arg type="boolean">true</Arg>
           <Arg type="boolean">false</Arg>
         </New>
       </Set>
        -->
   <Set name="maxInactiveInterval">360</Set>
     </New>
   </Arg>
 </New>
</Set>

</Configure>



On 03/06/2009, at 10:48 AM, Shunde Zhang wrote:

Hi Gianny,

I tried to start jetty with wadi-console war but I got:

2009-06-03 10:13:33.392::INFO:  Extract jar:file:/opt/davis1/wadi-console-2.1.1.war!/ to /tmp/Jetty_0_0_0_0_8080_wadi.console.2.1.1.war____.2gu4c1/webapp
2009-06-03 10:13:34.589::INFO:  NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet
Jun 3, 2009 10:13:35 AM org.codehaus.wadi.servicespace.basic.BasicSingletonServiceHolder onElection
INFO: [TribesPeer [jetty1; tcp://129.127.96.93:4001]] owns singleton service [PartitionManager for ServiceSpace [/]]
Jun 3, 2009 10:13:37 AM org.codehaus.wadi.group.impl.BasicEnvelopeDispatcherManager$DispatchRunner run
SEVERE: problem dispatching message
java.lang.ClassCastException: org.codehaus.wadi.servicespace.ServiceName cannot be cast to org.codehaus.wadi.servicespace.ServiceName
     at org.codehaus.wadi.servicespace.basic.EnvelopeServiceHelper.getServiceName(EnvelopeServiceHelper.java:35)
     at org.codehaus.wadi.servicespace.basic.ServiceInvocationListener.testDispatchEnvelope(ServiceInvocationListener.java:68)
     at org.codehaus.wadi.group.impl.ServiceEndpointWrapper.testDispatchEnvelope(ServiceEndpointWrapper.java:58)
     at org.codehaus.wadi.group.impl.BasicEnvelopeDispatcherManager.onEnvelope(BasicEnvelopeDispatcherManager.java:88)
     at org.codehaus.wadi.group.impl.AbstractDispatcher.doOnEnvelope(AbstractDispatcher.java:104)
     at org.codehaus.wadi.group.impl.AbstractDispatcher.onEnvelope(AbstractDispatcher.java:100)
     at org.codehaus.wadi.servicespace.basic.ServiceSpaceEndpoint.dispatch(ServiceSpaceEndpoint.java:49)
     at org.codehaus.wadi.group.impl.ServiceEndpointWrapper.dispatch(ServiceEndpointWrapper.java:50)
     at org.codehaus.wadi.group.impl.BasicEnvelopeDispatcherManager$DispatchRunner.run(BasicEnvelopeDispatcherManager.java:121)
     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
     at java.lang.Thread.run(Thread.java:619)


I have a config xml in contexts:

<?xml version="1.0"  encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">

<Configure class="org.mortbay.jetty.webapp.WebAppContext">
<Set name="contextPath">/</Set>
<Set name="war"><SystemProperty name="jetty.home" default="."/>/wadi-console-2.1.1.war</Set>
<Set name="extractWAR">true</Set>
<Set name="copyWebDir">true</Set>
<Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Set>

<New id="wadiCluster" class="org.mortbay.jetty.servlet.wadi.WadiCluster">
 <Arg>CLUSTER</Arg>
 <Arg><SystemProperty name="node.name" default="red"/></Arg>
 <Arg>http://<SystemProperty name="jetty.host"/>:<SystemProperty name="jetty.port" default="8080"/>/</Arg>
 <Call name="start"/>
</New>

<Set name="SessionHandler">
 <New class="org.mortbay.jetty.servlet.wadi.WadiSessionHandler">
   <Arg>
     <New id="wadiSessionManager" class="org.mortbay.jetty.servlet.wadi.WadiSessionManager">
       <Arg><Ref id="wadiCluster"/></Arg>
       <Arg type="int">2</Arg>
       <Arg type="int">24</Arg>
       <Arg type="int">360</Arg>
       <Arg type="boolean">true</Arg>
       <Arg type="boolean">false</Arg>
     </New>
   </Arg>
 </New>
</Set>

</Configure>


Is this correct? Also the third Arg of WadiCluster doesn't seem to work, as I don't see jetty listening on 8080.
I have set up my own web app using AJP and proxied by Apache. How can I set up wadi-console to be accessed via 8080 directly?
I just want to keep it "internal". Thanks again.


Regards,
Shunde Zhang
Australian Research Collaboration Services (ARCS), "Providing collaboration services and tools for the Australian research community"
Email: shunde.zhang@... <mailto:shunde.zhang@...>
eResearch SA (eRSA), "Enabling Discovery, Innovation and Collaboration through eResearch"
Email: shunde.zhang@... <mailto:shunde.zhang@...>
School of Computer Science, The University of Adelaide, "Life Impact"
Email: shunde.zhang@... <mailto:shunde.zhang@...>
Phone: +61 8 83038265






On 31/05/2009, at 9:01 AM, Gianny Damour wrote:

Hi Shunde,

Good to hear that you get it to work.

WADi provides an independent administration console, wadi-console, that you can download from here:

http://wadi.codehaus.org/ (choose the wadi-console artifact).


This is a standard Web application to be deployed to one of your clustered Jetty instances.  It can be used to monitor cluster memberships, clustered Web applications, sessions, their locations, the distribution of partition indexes  and message exchange rates. Look at the page

http://docs.codehaus.org/display/WADI/Home

and browse the WADI Administration Console links for more details.


The WADI console is a very thin user interface which builds upon an admin API using the command pattern to execute distributed operations on each cluster node (kind of map-reduce pattern). It is very easy to add new commands to say show the attributes of a given session.

Have a look at the WIKI and let me know if you require specific features.

Thanks,
Gianny


On 29/05/2009, at 5:05 PM, Shunde Zhang wrote:

Hi Gianny,

I think I made it work, then how can I open the admin console?
Can I know how many attributes are shared? Can I know the value of them?


Regards,
Shunde Zhang
Australian Research Collaboration Services (ARCS), "Providing collaboration services and tools for the Australian research community"
Email: shunde.zhang@... <mailto:shunde.zhang@...>
eResearch SA (eRSA), "Enabling Discovery, Innovation and Collaboration through eResearch"
Email: shunde.zhang@... <mailto:shunde.zhang@...>
School of Computer Science, The University of Adelaide, "Life Impact"
Email: shunde.zhang@... <mailto:shunde.zhang@...>
Phone: +61 8 83038265






On 29/05/2009, at 3:47 PM, gianny.damour@... <mailto:gianny.damour@...> wrote:

Hi Shunde,

You should start your server the way you use to start it. If you were using etc/jetty.xml, then continue to use this Jetty server configuration to start Jetty.

When you package your application for deployment to Jetty, you need to configure your application to use WADI. Basically, you need to include a file WEB-INF/jetty-web.xml in your module (beside your web.xml deployment descriptor). This file looks like the file you previously posted.

The instructions after the code snippet on this page:

http://docs.codehaus.org/display/JETTY/Jetty+Clustering+with+WADI

indicate how to do the same thing by dropping a new context xml config file in the contexts directory of Jetty.

Thanks,
Gianny

Shunde Zhang <shunde.zhang@... <mailto:shunde.zhang@...>> wrote:

Hi Gianny,

There is nothing in http://myserver:7070/

Do I need to include the previous jetty.xml?
e.g.

java -Djetty.home=/opt/jetty -Djetty.port=7070 -Dnode.name=orange -
Djava.net.preferIPv4Stack=true -jar start.jar etc/jetty.xml etc/jetty-
wadi-cluster.xml


Regards,
Shunde Zhang
Australian Research Collaboration Services (ARCS), "Providing
collaboration services and tools for the Australian research community"
Email: shunde.zhang@... <mailto:shunde.zhang@...>
eResearch SA (eRSA), "Enabling Discovery, Innovation and Collaboration
through eResearch"
Email: shunde.zhang@... <mailto:shunde.zhang@...>
School of Computer Science, The University of Adelaide, "Life Impact"
Email: shunde.zhang@... <mailto:shunde.zhang@...>
Phone: +61 8 83038265






On 29/05/2009, at 12:27 PM, gianny.damour@... <mailto:gianny.damour@...> wrote:

java -Djetty.home=/opt/jetty -Djetty.port=7070 -Dnode.name=orange -
Djava.net.preferIPv4Stack=true -jar start.jar etc/jetty-wadi-
cluster.xml

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

 http://xircles.codehaus.org/manage_email





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email




Re: WADI and jetty 6

by Gianny Damour-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Shunde,

Your configuration is nearly correct.

I just set-up two Jetty instances behind mod_proxy_ajp and here is my  
set-up:

8<----------

ProxyPass /test-webapp/ balancer://cluster/test-webapp/  
stickysession=JSESSIONID|jsessionid

<Proxy balancer://cluster>
    BalancerMember ajp://localhost:8009 route=orange
    BalancerMember ajp://localhost:8019 route=red
</Proxy>

8<----------

Note the following two changes when compared to your current  
configuration:

1. "nofailover=On" is not specified to the ProxyPass directive. WADI  
is doing session replication so you really want fail-over.

2. a "route" property is added to BalancerMember. This property is  
the value of the system property "node.name" when you start Jetty.


When a request is received by Apache with a cookie JSESSIONID set to  
"11q7h1hrit94y.orange", the "route" "orange" is extracted (string  
after the  "." of the JSESSIONID cookie). Based on this value, the  
request is routed to "ajp://localhost:800" (as its "route" property  
has the value "orange").


Let me know if you need additional information.


Thanks,
Gianny


On 22/06/2009, at 11:52 AM, Shunde Zhang wrote:

> Hi Filip,
>
> Thanks!
>
> One more question, in the document you sent me, they can change the  
> cookie in a virtual host, e.g.
>
> RewriteEngine On
> RewriteRule .* - [CO=BALANCEID:balancer.www1:.example.com]
>
> However, I am using mod_proxy_ajp. So, how can I change the cookie  
> for a AJP session?
> Besides, the client doesn't seem to support cookie/session. Is  
> there a way to use the apache child ID?
> (I guess one apache child process is to handle requests from one  
> client, isn't it?)
>
>
> Regards,
> Shunde Zhang
> Australian Research Collaboration Services (ARCS), "Providing  
> collaboration services and tools for the Australian research  
> community"
> Email: shunde.zhang@...
> eResearch SA (eRSA), "Enabling Discovery, Innovation and  
> Collaboration through eResearch"
> Email: shunde.zhang@...
> School of Computer Science, The University of Adelaide, "Life Impact"
> Email: shunde.zhang@...
> Phone: +61 8 83038265
>
>
>
>
>
>
> On 20/06/2009, at 7:01 AM, Filip Hanik - Dev Lists wrote:
>
>> http://www.markround.com/archives/33-Apache-mod_proxy-balancing- 
>> with-PHP-sticky-sessions.html
>> http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html
>> look for 'route'
>> Filip
>>
>> Shunde Zhang wrote:
>>> Hi,
>>>
>>> I have this:
>>>
>>> <Proxy balancer://my_cluster>
>>>    BalancerMember ajp://localhost:8009 flushpackets=on
>>>    BalancerMember ajp://localhost:8010 flushpackets=on
>>> </Proxy>
>>>
>>> What do you mean a 'route'? Am I missing anything?
>>>
>>> And, is there a way to specify if requests coming from one  
>>> client, they all go to one node in the cluster?
>>>
>>>
>>> Regards,
>>> Shunde Zhang
>>> Australian Research Collaboration Services (ARCS), "Providing  
>>> collaboration services and tools for the Australian research  
>>> community"
>>> Email: shunde.zhang@... <mailto:shunde.zhang@...>
>>> eResearch SA (eRSA), "/Enabling Discovery, Innovation and  
>>> Collaboration through eResearch/"
>>> Email: shunde.zhang@...  
>>> <mailto:shunde.zhang@...>
>>> School of Computer Science, The University of Adelaide, "/Life  
>>> Impact/"
>>> Email: shunde.zhang@...  
>>> <mailto:shunde.zhang@...>
>>> Phone: +61 8 83038265
>>>
>>>
>>>
>>>
>>>
>>>
>>> On 19/06/2009, at 9:29 AM, Filip Hanik - Dev Lists wrote:
>>>
>>>> Shunde Zhang wrote:
>>>>> Hi Gianny,
>>>>>
>>>>> I finally got this to work. It is really cool!
>>>>>
>>>>> I have another issue, not related to WADI, but maybe you know  
>>>>> the answer :)
>>>>> My web app is actually a WebDAV interface. Some WebDAV client,  
>>>>> like Mac Finder, doesn't support session. Others do.
>>>>> When I monitor the jetty log, I notice that those with session  
>>>>> support only send requests to one node of WADI cluster.
>>>>> In other words, requests are only sent to one node by Apache.
>>>>> But for requests coming from Mac Finder, all nodes get the  
>>>>> requests, which makes the web app behave strangely.
>>>>>
>>>>> How I configure Apache is:
>>>>> ProxyPass /ARCS/ balancer://my_cluster/MYWEBAPP/  
>>>>> stickysession=JSESSIONID|jsessionid nofailover=On
>>>> yes, but have you configured stickyness? ie, a 'route' in your  
>>>> <Proxy balancer://xxxx>
>>>>>
>>>>> I guess it identifies each request by session ID. If there is  
>>>>> no session ID, it will send requests to all nodes?
>>>> no, it picks one.
>>>>> Could you give me a hint on how to configure Apache properly?  
>>>>> Thanks a lot!
>>>>
>>>> There is a risk that the way you have it set up would cause  
>>>> round robin on every request.
>>>>>
>>>>> Regards,
>>>>> Shunde Zhang
>>>>> Australian Research Collaboration Services (ARCS), "Providing  
>>>>> collaboration services and tools for the Australian research  
>>>>> community"
>>>>> Email: shunde.zhang@... <mailto:shunde.zhang@...>
>>>>> eResearch SA (eRSA), "/Enabling Discovery, Innovation and  
>>>>> Collaboration through eResearch/"
>>>>> Email: shunde.zhang@...  
>>>>> <mailto:shunde.zhang@...>
>>>>> School of Computer Science, The University of Adelaide, "/Life  
>>>>> Impact/"
>>>>> Email: shunde.zhang@...  
>>>>> <mailto:shunde.zhang@...>
>>>>> Phone: +61 8 83038265
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On 03/06/2009, at 8:23 PM, Gianny Damour wrote:
>>>>>
>>>>>> Hi Shunde,
>>>>>>
>>>>>> The ClassCastException is due to the fact that wadi-console is  
>>>>>> loading the class org.codehaus.wadi.servicespace.ServiceName  
>>>>>> from the Web-application class loader instead of the Jetty  
>>>>>> class loader. Here is the jetty-web.xml file that you should  
>>>>>> use to deploy wadi-console:
>>>>>>
>>>>>> <?xml version="1.0"  encoding="ISO-8859-1"?>
>>>>>> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD  
>>>>>> Configure//EN" "http://jetty.mortbay.org/configure.dtd">
>>>>>> <Configure class="org.mortbay.jetty.webapp.WebAppContext">
>>>>>> <Set name="contextPath">/wadi-console</Set>
>>>>>> <Set name="parentLoaderPriority">true</Set>
>>>>>> </Configure>
>>>>>>
>>>>>> By setting the property parentLoaderPriority to true, class  
>>>>>> loading is performed according to the standard class loading  
>>>>>> delegating strategy, i.e. first try to load classes via the  
>>>>>> parent class loader and then fallback to the current one if  
>>>>>> necessary.
>>>>>>
>>>>>> Note that you do not need to set-up a WadiCluster or  
>>>>>> WadiSessionManager like you have done for your clustered  
>>>>>> application. wadi-console knows about all the WadiCluster and  
>>>>>> WadiSessionManager instantiated by the running Jetty container  
>>>>>> using a static registry mechanism.
>>>>>>
>>>>>>
>>>>>> The admin console is a simple Web application and can be  
>>>>>> accessed through the standard HTTP connectors you have  
>>>>>> configured. For instance, if you start Jetty using the command
>>>>>>
>>>>>> java -Djetty.home=/opt/jetty -Djetty.port=7070 -
>>>>>> Dnode.name=orange -Djava.net.preferIPv4Stack=true -jar start.jar
>>>>>>
>>>>>> then you can access the console via this URL:
>>>>>>
>>>>>> http://myserver:7070/wadi-console/
>>>>>>
>>>>>>
>>>>>> If you want the console to be only available internally, then  
>>>>>> I suggest you to:
>>>>>> 1. define a DNS entry for the Jetty instance which will run  
>>>>>> the WADI console; and
>>>>>> 2. DO NOT configure Apache as a reverse-proxy for the WADI  
>>>>>> console. You should configure Apache to only be a reverse-
>>>>>> proxy for the application you want to be exposed.
>>>>>>
>>>>>> Assuming you created a DNS entry binding adminserver to the IP  
>>>>>> address of the Jetty instance running the WADI console and  
>>>>>> that you started this Jetty instance with -Djetty.port=8080  
>>>>>> you will be able to access the console via the URL
>>>>>>
>>>>>> http://adminserver: 8080/wadi-console/
>>>>>>
>>>>>> Thanks,
>>>>>> Gianny
>>>>>>
>>>>>> P.S.: here is the plan I have been using to test Jetty 6.1.18  
>>>>>> with the wadi-webapp application (you can download it from  
>>>>>> http://wadi.codehaus.org/ see wadi-webapp release artifact)
>>>>>>
>>>>>>
>>>>>> <?xml version="1.0"  encoding="ISO-8859-1"?>
>>>>>> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD  
>>>>>> Configure//EN" "http://jetty.mortbay.org/configure.dtd">
>>>>>>
>>>>>> <Configure class="org.mortbay.jetty.webapp.WebAppContext">
>>>>>> <Set name="contextPath">/wadi-webapp</Set>
>>>>>>
>>>>>> <Set name="extractWAR">false</Set>
>>>>>> <Set name="copyWebDir">false</Set>
>>>>>> <Set name="defaultsDescriptor"><SystemProperty  
>>>>>> name="jetty.home" default="."/>/etc/webdefaults.xml</Set>
>>>>>>
>>>>>> <New id="wadiCluster"  
>>>>>> class="org.mortbay.jetty.servlet.wadi.WadiCluster">
>>>>>>  <Arg>CLUSTER</Arg>
>>>>>>  <Arg><SystemProperty name="node.name" default="red"/></Arg>
>>>>>>  <Arg>http://localhost:<SystemProperty name="jetty.port"  
>>>>>> default="8080"/>/wadi-webapp</Arg>
>>>>>>  <Call name="start"/>
>>>>>> </New>
>>>>>>
>>>>>> <Set name="SessionHandler">
>>>>>>  <New class="org.mortbay.jetty.servlet.wadi.WadiSessionHandler">
>>>>>>    <Arg>
>>>>>>      <New id="wadiSessionManager"  
>>>>>> class="org.mortbay.jetty.servlet.wadi.WadiSessionManager">
>>>>>>        <Arg><Ref id="wadiCluster"/></Arg>
>>>>>>        <Arg type="int">2</Arg>
>>>>>>        <Arg type="int">24</Arg>
>>>>>>        <Arg type="int">360</Arg>
>>>>>>        <Arg type="boolean">true</Arg>
>>>>>>        <Arg type="boolean">false</Arg>
>>>>>>
>>>>>>        <!-- - - - - - - - - - - - - - - - - - - - - - - - - -  
>>>>>> - - - - - - - -->
>>>>>>        <!-- Uncomment these elements to enable session  
>>>>>> persistence across   -->
>>>>>>        <!-- context or container  
>>>>>> restart.                                   -->
>>>>>>        <!-- - - - - - - - - - - - - - - - - - - - - - - - - -  
>>>>>> - - - - - - - -->
>>>>>>        <!--
>>>>>>        <Set name="SharedStore">
>>>>>>          <New id="sharedStore"  
>>>>>> class="org.codehaus.wadi.core.store.DatabaseStore">
>>>>>>            <Arg>
>>>>>>              <New id="sharedStoreDatabase"  
>>>>>> class="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSourc
>>>>>> e">
>>>>>>                <Set name="Url">jdbc:mysql://localhost:3306/
>>>>>> TEST</Set>
>>>>>>                <Set name="User">wadi</Set>
>>>>>>                <Set name="Password">wadi_pass</Set>
>>>>>>              </New>
>>>>>>            </Arg>
>>>>>>            <Arg type="java.lang.String">SESSION_TABLE</Arg>
>>>>>>            <Arg type="java.lang.String">BYTEA</Arg>
>>>>>>            <Arg type="boolean">true</Arg>
>>>>>>            <Arg type="boolean">false</Arg>
>>>>>>          </New>
>>>>>>        </Set>
>>>>>>         -->
>>>>>>    <Set name="maxInactiveInterval">360</Set>
>>>>>>      </New>
>>>>>>    </Arg>
>>>>>>  </New>
>>>>>> </Set>
>>>>>>
>>>>>> </Configure>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 03/06/2009, at 10:48 AM, Shunde Zhang wrote:
>>>>>>
>>>>>>> Hi Gianny,
>>>>>>>
>>>>>>> I tried to start jetty with wadi-console war but I got:
>>>>>>>
>>>>>>> 2009-06-03 10:13:33.392::INFO:  Extract jar:file:/opt/davis1/
>>>>>>> wadi-console-2.1.1.war!/ to /tmp/
>>>>>>> Jetty_0_0_0_0_8080_wadi.console.2.1.1.war____.2gu4c1/webapp
>>>>>>> 2009-06-03 10:13:34.589::INFO:  NO JSP Support for /, did not  
>>>>>>> find org.apache.jasper.servlet.JspServlet
>>>>>>> Jun 3, 2009 10:13:35 AM  
>>>>>>> org.codehaus.wadi.servicespace.basic.BasicSingletonServiceHolder
>>>>>>>  onElection
>>>>>>> INFO: [TribesPeer [jetty1; tcp://129.127.96.93:4001]] owns  
>>>>>>> singleton service [PartitionManager for ServiceSpace [/]]
>>>>>>> Jun 3, 2009 10:13:37 AM  
>>>>>>> org.codehaus.wadi.group.impl.BasicEnvelopeDispatcherManager
>>>>>>> $DispatchRunner run
>>>>>>> SEVERE: problem dispatching message
>>>>>>> java.lang.ClassCastException:  
>>>>>>> org.codehaus.wadi.servicespace.ServiceName cannot be cast to  
>>>>>>> org.codehaus.wadi.servicespace.ServiceName
>>>>>>>      at  
>>>>>>> org.codehaus.wadi.servicespace.basic.EnvelopeServiceHelper.getSe
>>>>>>> rviceName(EnvelopeServiceHelper.java:35)
>>>>>>>      at  
>>>>>>> org.codehaus.wadi.servicespace.basic.ServiceInvocationListener.t
>>>>>>> estDispatchEnvelope(ServiceInvocationListener.java:68)
>>>>>>>      at  
>>>>>>> org.codehaus.wadi.group.impl.ServiceEndpointWrapper.testDispatch
>>>>>>> Envelope(ServiceEndpointWrapper.java:58)
>>>>>>>      at  
>>>>>>> org.codehaus.wadi.group.impl.BasicEnvelopeDispatcherManager.onEn
>>>>>>> velope(BasicEnvelopeDispatcherManager.java:88)
>>>>>>>      at  
>>>>>>> org.codehaus.wadi.group.impl.AbstractDispatcher.doOnEnvelope
>>>>>>> (AbstractDispatcher.java:104)
>>>>>>>      at  
>>>>>>> org.codehaus.wadi.group.impl.AbstractDispatcher.onEnvelope
>>>>>>> (AbstractDispatcher.java:100)
>>>>>>>      at  
>>>>>>> org.codehaus.wadi.servicespace.basic.ServiceSpaceEndpoint.dispat
>>>>>>> ch(ServiceSpaceEndpoint.java:49)
>>>>>>>      at  
>>>>>>> org.codehaus.wadi.group.impl.ServiceEndpointWrapper.dispatch
>>>>>>> (ServiceEndpointWrapper.java:50)
>>>>>>>      at  
>>>>>>> org.codehaus.wadi.group.impl.BasicEnvelopeDispatcherManager
>>>>>>> $DispatchRunner.run(BasicEnvelopeDispatcherManager.java:121)
>>>>>>>      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask
>>>>>>> (ThreadPoolExecutor.java:886)
>>>>>>>      at java.util.concurrent.ThreadPoolExecutor$Worker.run
>>>>>>> (ThreadPoolExecutor.java:908)
>>>>>>>      at java.lang.Thread.run(Thread.java:619)
>>>>>>>
>>>>>>>
>>>>>>> I have a config xml in contexts:
>>>>>>>
>>>>>>> <?xml version="1.0"  encoding="ISO-8859-1"?>
>>>>>>> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD  
>>>>>>> Configure//EN" "http://jetty.mortbay.org/configure.dtd">
>>>>>>>
>>>>>>> <Configure class="org.mortbay.jetty.webapp.WebAppContext">
>>>>>>> <Set name="contextPath">/</Set>
>>>>>>> <Set name="war"><SystemProperty name="jetty.home" default="."/
>>>>>>> >/wadi-console-2.1.1.war</Set>
>>>>>>> <Set name="extractWAR">true</Set>
>>>>>>> <Set name="copyWebDir">true</Set>
>>>>>>> <Set name="defaultsDescriptor"><SystemProperty  
>>>>>>> name="jetty.home" default="."/>/etc/webdefault.xml</Set>
>>>>>>>
>>>>>>> <New id="wadiCluster"  
>>>>>>> class="org.mortbay.jetty.servlet.wadi.WadiCluster">
>>>>>>>  <Arg>CLUSTER</Arg>
>>>>>>>  <Arg><SystemProperty name="node.name" default="red"/></Arg>
>>>>>>>  <Arg>http://<SystemProperty name="jetty.host"/
>>>>>>> >:<SystemProperty name="jetty.port" default="8080"/>/</Arg>
>>>>>>>  <Call name="start"/>
>>>>>>> </New>
>>>>>>>
>>>>>>> <Set name="SessionHandler">
>>>>>>>  <New class="org.mortbay.jetty.servlet.wadi.WadiSessionHandler">
>>>>>>>    <Arg>
>>>>>>>      <New id="wadiSessionManager"  
>>>>>>> class="org.mortbay.jetty.servlet.wadi.WadiSessionManager">
>>>>>>>        <Arg><Ref id="wadiCluster"/></Arg>
>>>>>>>        <Arg type="int">2</Arg>
>>>>>>>        <Arg type="int">24</Arg>
>>>>>>>        <Arg type="int">360</Arg>
>>>>>>>        <Arg type="boolean">true</Arg>
>>>>>>>        <Arg type="boolean">false</Arg>
>>>>>>>      </New>
>>>>>>>    </Arg>
>>>>>>>  </New>
>>>>>>> </Set>
>>>>>>>
>>>>>>> </Configure>
>>>>>>>
>>>>>>>
>>>>>>> Is this correct? Also the third Arg of WadiCluster doesn't  
>>>>>>> seem to work, as I don't see jetty listening on 8080.
>>>>>>> I have set up my own web app using AJP and proxied by Apache.  
>>>>>>> How can I set up wadi-console to be accessed via 8080 directly?
>>>>>>> I just want to keep it "internal". Thanks again.
>>>>>>>
>>>>>>>
>>>>>>> Regards,
>>>>>>> Shunde Zhang
>>>>>>> Australian Research Collaboration Services (ARCS), "Providing  
>>>>>>> collaboration services and tools for the Australian research  
>>>>>>> community"
>>>>>>> Email: shunde.zhang@...  
>>>>>>> <mailto:shunde.zhang@...>
>>>>>>> eResearch SA (eRSA), "Enabling Discovery, Innovation and  
>>>>>>> Collaboration through eResearch"
>>>>>>> Email: shunde.zhang@...  
>>>>>>> <mailto:shunde.zhang@...>
>>>>>>> School of Computer Science, The University of Adelaide, "Life  
>>>>>>> Impact"
>>>>>>> Email: shunde.zhang@...  
>>>>>>> <mailto:shunde.zhang@...>
>>>>>>> Phone: +61 8 83038265
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On 31/05/2009, at 9:01 AM, Gianny Damour wrote:
>>>>>>>
>>>>>>>> Hi Shunde,
>>>>>>>>
>>>>>>>> Good to hear that you get it to work.
>>>>>>>>
>>>>>>>> WADi provides an independent administration console, wadi-
>>>>>>>> console, that you can download from here:
>>>>>>>>
>>>>>>>> http://wadi.codehaus.org/ (choose the wadi-console artifact).
>>>>>>>>
>>>>>>>>
>>>>>>>> This is a standard Web application to be deployed to one of  
>>>>>>>> your clustered Jetty instances.  It can be used to monitor  
>>>>>>>> cluster memberships, clustered Web applications, sessions,  
>>>>>>>> their locations, the distribution of partition indexes  and  
>>>>>>>> message exchange rates. Look at the page
>>>>>>>>
>>>>>>>> http://docs.codehaus.org/display/WADI/Home
>>>>>>>>
>>>>>>>> and browse the WADI Administration Console links for more  
>>>>>>>> details.
>>>>>>>>
>>>>>>>>
>>>>>>>> The WADI console is a very thin user interface which builds  
>>>>>>>> upon an admin API using the command pattern to execute  
>>>>>>>> distributed operations on each cluster node (kind of map-
>>>>>>>> reduce pattern). It is very easy to add new commands to say  
>>>>>>>> show the attributes of a given session.
>>>>>>>>
>>>>>>>> Have a look at the WIKI and let me know if you require  
>>>>>>>> specific features.
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Gianny
>>>>>>>>
>>>>>>>>
>>>>>>>> On 29/05/2009, at 5:05 PM, Shunde Zhang wrote:
>>>>>>>>
>>>>>>>>> Hi Gianny,
>>>>>>>>>
>>>>>>>>> I think I made it work, then how can I open the admin console?
>>>>>>>>> Can I know how many attributes are shared? Can I know the  
>>>>>>>>> value of them?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>> Shunde Zhang
>>>>>>>>> Australian Research Collaboration Services (ARCS),  
>>>>>>>>> "Providing collaboration services and tools for the  
>>>>>>>>> Australian research community"
>>>>>>>>> Email: shunde.zhang@...  
>>>>>>>>> <mailto:shunde.zhang@...>
>>>>>>>>> eResearch SA (eRSA), "Enabling Discovery, Innovation and  
>>>>>>>>> Collaboration through eResearch"
>>>>>>>>> Email: shunde.zhang@...  
>>>>>>>>> <mailto:shunde.zhang@...>
>>>>>>>>> School of Computer Science, The University of Adelaide,  
>>>>>>>>> "Life Impact"
>>>>>>>>> Email: shunde.zhang@...  
>>>>>>>>> <mailto:shunde.zhang@...>
>>>>>>>>> Phone: +61 8 83038265
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 29/05/2009, at 3:47 PM, gianny.damour@...  
>>>>>>>>> <mailto:gianny.damour@...> wrote:
>>>>>>>>>
>>>>>>>>>> Hi Shunde,
>>>>>>>>>>
>>>>>>>>>> You should start your server the way you use to start it.  
>>>>>>>>>> If you were using etc/jetty.xml, then continue to use this  
>>>>>>>>>> Jetty server configuration to start Jetty.
>>>>>>>>>>
>>>>>>>>>> When you package your application for deployment to Jetty,  
>>>>>>>>>> you need to configure your application to use WADI.  
>>>>>>>>>> Basically, you need to include a file WEB-INF/jetty-
>>>>>>>>>> web.xml in your module (beside your web.xml deployment  
>>>>>>>>>> descriptor). This file looks like the file you previously  
>>>>>>>>>> posted.
>>>>>>>>>>
>>>>>>>>>> The instructions after the code snippet on this page:
>>>>>>>>>>
>>>>>>>>>> http://docs.codehaus.org/display/JETTY/Jetty+Clustering 
>>>>>>>>>> +with+WADI
>>>>>>>>>>
>>>>>>>>>> indicate how to do the same thing by dropping a new  
>>>>>>>>>> context xml config file in the contexts directory of Jetty.
>>>>>>>>>>
>>>>>>>>>> Thanks,
>>>>>>>>>> Gianny
>>>>>>>>>>
>>>>>>>>>>> Shunde Zhang <shunde.zhang@...  
>>>>>>>>>>> <mailto:shunde.zhang@...>> wrote:
>>>>>>>>>>>
>>>>>>>>>>> Hi Gianny,
>>>>>>>>>>>
>>>>>>>>>>> There is nothing in http://myserver:7070/
>>>>>>>>>>>
>>>>>>>>>>> Do I need to include the previous jetty.xml?
>>>>>>>>>>> e.g.
>>>>>>>>>>>
>>>>>>>>>>> java -Djetty.home=/opt/jetty -Djetty.port=7070 -
>>>>>>>>>>> Dnode.name=orange -
>>>>>>>>>>> Djava.net.preferIPv4Stack=true -jar start.jar etc/
>>>>>>>>>>> jetty.xml etc/jetty-
>>>>>>>>>>> wadi-cluster.xml
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Regards,
>>>>>>>>>>> Shunde Zhang
>>>>>>>>>>> Australian Research Collaboration Services (ARCS),  
>>>>>>>>>>> "Providing
>>>>>>>>>>> collaboration services and tools for the Australian  
>>>>>>>>>>> research community"
>>>>>>>>>>> Email: shunde.zhang@...  
>>>>>>>>>>> <mailto:shunde.zhang@...>
>>>>>>>>>>> eResearch SA (eRSA), "Enabling Discovery, Innovation and  
>>>>>>>>>>> Collaboration
>>>>>>>>>>> through eResearch"
>>>>>>>>>>> Email: shunde.zhang@...  
>>>>>>>>>>> <mailto:shunde.zhang@...>
>>>>>>>>>>> School of Computer Science, The University of Adelaide,  
>>>>>>>>>>> "Life Impact"
>>>>>>>>>>> Email: shunde.zhang@...  
>>>>>>>>>>> <mailto:shunde.zhang@...>
>>>>>>>>>>> Phone: +61 8 83038265
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On 29/05/2009, at 12:27 PM, gianny.damour@...  
>>>>>>>>>>> <mailto:gianny.damour@...> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> java -Djetty.home=/opt/jetty -Djetty.port=7070 -
>>>>>>>>>>>> Dnode.name=orange -
>>>>>>>>>>>> Djava.net.preferIPv4Stack=true -jar start.jar etc/jetty-
>>>>>>>>>>>> wadi-
>>>>>>>>>>>> cluster.xml
>>>>>>>>>>
>>>>>>>>>> -------------------------------------------------------------
>>>>>>>>>> --------
>>>>>>>>>> To unsubscribe from this list, please visit:
>>>>>>>>>>
>>>>>>>>>> http://xircles.codehaus.org/manage_email
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------
>>>>>>>> ------
>>>>>>>> To unsubscribe from this list, please visit:
>>>>>>>>
>>>>>>>> http://xircles.codehaus.org/manage_email
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> -----------------------------------------------------------------
>>>>>> ----
>>>>>> To unsubscribe from this list, please visit:
>>>>>>
>>>>>> http://xircles.codehaus.org/manage_email
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>> -------------------------------------------------------------------
>>>> --
>>>> To unsubscribe from this list, please visit:
>>>>
>>>>  http://xircles.codehaus.org/manage_email
>>>>
>>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>   http://xircles.codehaus.org/manage_email
>>
>>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email