dev@glassfish.java.net

Re: HA/in-memory replication

From: Larry White <Larry.White_at_Sun.COM>
Date: Fri, 06 Apr 2007 11:43:13 -0700

Hi Ashish:

Sorry you're having trouble. What kind of platform are you running on?
Most of our testing has been on Solaris and Linux - are you by any chance
on a Windows machine. I'm wondering if there could be a problem we
haven't yet encountered lurking on that platform.

I'm cc'ing Peter Fabian because he wrote to me with similar sounding
problems. Let's see if there is a platform-specific issue here.

regards, Larry White

Ashish Sahni wrote:

> Hi Jan/Larry,
> So, the one-machine scenario should be good enough for me now but
> for some reason http session data does not seem to be replicated
> across instances
> for either my custom-app of for the sample app - clusterjsp.
>
> Looking at the cookie data (see attached file) - the first 3 requests
> are for instance-1
> on port 1110. The last 2 requests are to instance-2 on port 1111. You
> can see that the first request to instance-2 from the browser has the
> cookie
> JSESSIONID set to the value received from instance-1. However, the
> response
> to this request has another value for the jsessionid cookie.
> So, I suppose this is the root cause for no replication across
> instances -
> why/howto-troubleshoot-further ?
>
> Even though this data is for my-custom-app, I observed the same
> behaviour with
> clusterjsp.
>
> Thanks
> Ashish
>
>
> Larry White wrote:
>
>> It has worked for every browser I've used over the last 5 years:
>> Netscape, IE, Mozilla, Thunderbird, Safari
>>
>> /Larry White
>>
>> Sreeram Duvur wrote:
>>
>>>
>>>> I should work as long as the domain (host) name remains the same,
>>>> and only the
>>>> port info changes.
>>>>
>>>> The browser decides which cookies to append to a request based on
>>>> the request URL's
>>>> domain (host) name and context root, ignoring any port info.
>>>>
>>>> Jan
>>>
>>>
>>>
>>> Ha, then having two instances on same machine (running on different
>>> ports) and manually directing requests by changing port numbers in
>>> browsers can be used to test failover.
>>>
>>> But is this browser behavior fairly standard?
>>>
>>> Sreeram
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
>------------------------------------------------------------------------
>
>http://hysteria.sfbay.sun.com:1110/depot_f/admin
>
>GET /depot_f/admin HTTP/1.1
>Host: hysteria.sfbay.sun.com:1110
>User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
>Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
>Accept-Language: en-us,en;q=0.5
>Accept-Encoding: gzip,deflate
>Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
>Keep-Alive: 300
>Connection: keep-alive
>
>HTTP/1.x 200 OK
>X-powered-by: Servlet/2.5
>Server: Sun Java System Application Server 9.1
>Set-Cookie: JSESSIONID=7e76525ef2b3209b679c00442408; Path=/depot_f
>Set-Cookie: _session_id=a8261ee587e939e2b71634297747ac53; path=/
>Cache-Control: no-cache
>Content-Type: text/html;charset=utf-8
>Content-Length: 3395
>Date: Fri, 06 Apr 2007 17:18:22 GMT
>----------------------------------------------------------
>http://hysteria.sfbay.sun.com:1110/depot_f/store/
>
>GET /depot_f/store/ HTTP/1.1
>Host: hysteria.sfbay.sun.com:1110
>User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
>Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
>Accept-Language: en-us,en;q=0.5
>Accept-Encoding: gzip,deflate
>Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
>Keep-Alive: 300
>Connection: keep-alive
>Cookie: JSESSIONID=7e76525ef2b3209b679c00442408; _session_id=a8261ee587e939e2b71634297747ac53
>
>HTTP/1.x 200 OK
>X-powered-by: Servlet/2.5
>Server: Sun Java System Application Server 9.1
>Set-Cookie: _session_id=a8261ee587e939e2b71634297747ac53; path=/
>Cache-Control: no-cache
>Content-Type: text/html;charset=utf-8
>Content-Length: 3746
>Date: Fri, 06 Apr 2007 17:20:16 GMT
>----------------------------------------------------------
>http://hysteria.sfbay.sun.com:1110/depot_f/store/add_to_cart/2
>
>POST /depot_f/store/add_to_cart/2 HTTP/1.1
>Host: hysteria.sfbay.sun.com:1110
>User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
>Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
>Accept-Language: en-us,en;q=0.5
>Accept-Encoding: gzip,deflate
>Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
>Keep-Alive: 300
>Connection: keep-alive
>Referer: http://hysteria.sfbay.sun.com:1110/depot_f/store/
>Cookie: JSESSIONID=7e76525ef2b3209b679c00442408; _session_id=a8261ee587e939e2b71634297747ac53
>Content-Type: application/x-www-form-urlencoded
>Content-Length: 0
>
>HTTP/1.x 200 OK
>X-powered-by: Servlet/2.5
>Server: Sun Java System Application Server 9.1
>Set-Cookie: _session_id=a8261ee587e939e2b71634297747ac53; path=/
>Cache-Control: no-cache
>Content-Type: text/html;charset=utf-8
>Content-Length: 1361
>Date: Fri, 06 Apr 2007 17:20:25 GMT
>----------------------------------------------------------
>------------------------------------------------------------
>
>
>
>
>
>
>
>
>
>
>
>
>----------------------------------------------------------
>http://hysteria.sfbay.sun.com:1111/depot_f/admin
>
>GET /depot_f/admin HTTP/1.1
>Host: hysteria.sfbay.sun.com:1111
>User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
>Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
>Accept-Language: en-us,en;q=0.5
>Accept-Encoding: gzip,deflate
>Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
>Keep-Alive: 300
>Connection: keep-alive
>Cookie: JSESSIONID=7e76525ef2b3209b679c00442408; _session_id=a8261ee587e939e2b71634297747ac53
>
>HTTP/1.x 200 OK
>X-powered-by: Servlet/2.5
>Server: Sun Java System Application Server 9.1
>Set-Cookie: JSESSIONID=7e9afc2113243d0144e40ad0419d; Path=/depot_f
>Set-Cookie: _session_id=a8261ee587e939e2b71634297747ac53; path=/
>Cache-Control: no-cache
>Content-Type: text/html;charset=utf-8
>Content-Length: 3395
>Date: Fri, 06 Apr 2007 17:20:52 GMT
>----------------------------------------------------------
>----------------------------------------------------------
>http://hysteria.sfbay.sun.com:1111/depot_f/store/add_to_cart/1
>
>POST /depot_f/store/add_to_cart/1 HTTP/1.1
>Host: hysteria.sfbay.sun.com:1111
>User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
>Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
>Accept-Language: en-us,en;q=0.5
>Accept-Encoding: gzip,deflate
>Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
>Keep-Alive: 300
>Connection: keep-alive
>Referer: http://hysteria.sfbay.sun.com:1111/depot_f/store
>Cookie: JSESSIONID=7e9afc2113243d0144e40ad0419d; _session_id=a8261ee587e939e2b71634297747ac53
>Content-Type: application/x-www-form-urlencoded
>Content-Length: 0
>
>HTTP/1.x 200 OK
>X-powered-by: Servlet/2.5
>Server: Sun Java System Application Server 9.1
>Set-Cookie: _session_id=a8261ee587e939e2b71634297747ac53; path=/
>Cache-Control: no-cache
>Content-Type: text/html;charset=utf-8
>Content-Length: 1275
>Date: Fri, 06 Apr 2007 17:21:18 GMT
>----------------------------------------------------------
>
>
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>
>