On Sep 23, 2013, at 4:49 PM, Nicholas Violi <nvi...@globalgiving.org> wrote:

> On Thu, Sep 19, 2013 at 9:03 AM, Daniel Mikusa <dmik...@gopivotal.com>wrote:
> 
>> Here's what I've been using:
>> 
>> 
>> WEB-INF/web.xml:
>> 
>> <?xml version="1.0" encoding="UTF-8"?>
>> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee";
>>    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";>
>> 
>>    <distributable/>
>> 
>> </web-app>
>> 
>> 
>> index.jsp:
>> 
>> <%
>>    Integer count = (Integer) session.getAttribute("counter");
>>    if (count == null) {
>>        count = 0;
>>        session.setAttribute("counter", 0);
>>    } else {
>>        session.setAttribute("counter", count + 1);
>>    }
>> %>
>> <html>
>> <head>
>>    <title>Index</title>
>> </head>
>> <body>
>>    <h2>Session [<%= session.getId() %>]</h2>
>>    <p>Current count is <%= count %></p>
>> </body>
>> </html>
>> 
>> 
>> It's crude, but effective for testing session replication.
>> 
> Hi, and sorry for the silence; I had a few other things take priority over
> this last week, but I've found some time today to test your counter app.
> 
> So I'm now cutting out both httpd and my complicated webapp, and still see
> no replication of session variables, and nothing in the logs regarding
> clustering besides startup/shutdown of nodes in the cluster. Both instances
> of the counter app show the same session ID, and both increment (correctly)
> independent of each other, but they are not sharing the session variable :(
> 
> One possible clue as to what's going on is this log message, that's been
> bothering me:
> 
>> FINE: Received a failure detector
>> packet:ClusterData[src=org.apache.catalina.tribes.membership.MemberImpl[tcp://{192,
>> 168, 1, 240}:4000,{192, 168, 1, 240},4000, alive=1379968430807,
>> securePort=-1, UDP Port=-1, id={81 35 97 0 -37 63 71 -104 -102 28 115 6 -51
>> -24 -24 99 }, payload={}, command={}, domain={}, ]; id={-101 -57 -98 104
>> -103 31 66 113 -85 -84 -80 -86 14 -2 52 -31 }; sent=2013-09-23 16:33:50.81]
> 
> 
> Other than that I'm at a loss on where to go; any suggestions are welcome.

A couple general thoughts...

1.) When looking at log statements at the FINE & lower levels, recognize that 
these are not reporting problems.  They just give you the ability to trace the 
flow of what is happening in the code.  If it was a problem, you'd see WARN, 
ERROR or SEVERE.

2.) If you'd like a second opinion on something you see in the logs, post as 
much of the logs as possible.  If you only post snippets or filter the logs, 
you might inadvertently filter out something that is important.

3.) Try a different PC, if you have one available.  If it works on another PC, 
start comparing the two to see what is different.

4.) Simplify as much as possible.  Start with two fresh Tomcat instance.  Add 
the simplest possible cluster configuration and go from there.

  https://tomcat.apache.org/tomcat-7.0-doc/cluster-howto.html#For_the_impatient

Sorry I can't be of more help.

Dan


> 
> Thanks,
> Nick


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to