Re: [Resin-interest] share session in multiple domains application

2012-08-17 Thread Riccardo Cohen

  
  
Thanks a
lot Paul, this was the solution. In the wiki, you may add that
this config has to be set in the application server, not in the
load-balancer server, (I was not sure and tested both).


  
On 17/08/12 01:17, Paul Cowan wrote:


  
On Aug 16, 2012, at 4:57 PM, Riccardo Cohen wrote:


  
   Hello
I use resin 4.0.13, and I have one unique application
that is accessed though 2 domains. It is configured in
the front server as host alias :

 host id="www.appartement-maison.fr"


host-aliaspro.appartement-maison.fr/host-alias

The 2 domains are in the same java application, but they
answer completely different pages for different
functions.

When a user is connected to the first domain with a
login/password (connection information is stored in the
session), I would like him to be automatically connected
in the second domain. But the JSESSIONID is different so
the connection information is not found, while it is the
same application and the same browser. 

Is it possible to share the sessions between different
host aliases in one application ?
If not I will have to use a subdirectory in the first
domain, which is not what we want.
I found nothing in the reference doc of
session-config about this, and could not find a
thread in this list about it.

PS: here I don't need to share cookies, only server
sessions.
  





Hi Riccardo,


You do need to share cookies, because the session is tied
  to the JSESSIONID. You're getting different sessions because
  the Set-cookie domain defaults to the full host name, which is
  different in your case between www... and pro...


If all your host names end with "appartement-maison.fr",

  then simplyset


session-config

  cookie-domainappartement-maison.fr/cookie-domain
 ...
/session-config


If you have more than one domain, or need more control you
  can use cookie-domain-regexp.



  cookie-domain-regexp accepts a regular _expression_ used to
extract the domain from the requested host. Probable
configuration:
  
  
  session-config
  
cookie-domain-regexp[^.]*\.[^.]*$/cookie-domain-regexp
   ...
  /session-config
  
  
  For example, using this regexp will produce the
following:
  
  
  Host: xxx.yyy.zzz.foo.com = Set-Cookie domain:foo.com
  Host:zzz.foo.com= Set-Cookie
domain:foo.com
  Host:foo.com=

Set-Cookie domain:foo.com
  Host:bar.com=

Set-Cookie domain:bar.com
  
  
  (I'll adding this all to wiki4.caucho.com
shortly.)
  
  
  Thanks,
  Paul
  
  





   
Thanks.

  
-- 
  
  
  Riccardo
  Cohen
  +33 (0)6 09 83 64 49
  Socit Realty-Property.com
  1 rue de la Monnaie
  37000 Tours
  France
  
  www.appartement-maison.fr
  
  eccjgbbd.jpg

  
  ___
  resin-interest mailing list
  resin-interest@caucho.com
  http://maillist.caucho.com/mailman/listinfo/resin-interest

  
  

  
  
  
  
  ___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest



-- 
  
  
  Riccardo Cohen
  +33 (0)6 09 83 64 49
  Socit Realty-Property.com
  1 rue de la Monnaie
  37000 Tours
  France
  
  www.appartement-maison.fr
  
  

  

___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


[Resin-interest] apache resin 503 error when repeated requests from the same IP

2012-08-17 Thread Manidhar gudavalli
HI
I am seeing a strange 503 error  on the server. When the repeated requests
coming from the clients with the same IP address, after some time, I am
seeing 503 error in apache logs. These requests are all valid requests from
valid ips.

I am using resin 3.1.12. and apache 2.2.3 and JDK 7.
 Is resin considering, the repeated request from same IP as spam?
 Is there any parameter that I can set to force resin to accepts the
requests and not consider as spam?


Please help.

thanks
Mani
___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] apache resin 503 error when repeated requests from the same IP

2012-08-17 Thread Paul Cowan

On Aug 17, 2012, at 11:58 AM, Manidhar gudavalli wrote:

 HI
 I am seeing a strange 503 error  on the server. When the repeated requests 
 coming from the clients with the same IP address, after some time, I am 
 seeing 503 error in apache logs. These requests are all valid requests from 
 valid ips.
 
 I am using resin 3.1.12. and apache 2.2.3 and JDK 7.
  Is resin considering, the repeated request from same IP as spam?
  Is there any parameter that I can set to force resin to accepts the requests 
 and not consider as spam?

Hi Mani,

A 503 error usually indicates Resin was unavailable to Apache (ie restarting) 
or overloaded.  The client IP address should not matter.

You need to examine the Resin logs to see what is it doing during that time and 
if there are any errors reported.

Resin may be running out of resources or paused for a long garbage collection.  
Often simply increasing thread-max to a larger number like 2048 helps, since 
the default is rather low for Resin 3.1.

Thanks,
Paul



 
 
 Please help.
 
 thanks
 Mani
 
 
 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest

===
Paul Cowan, Software Engineer
Caucho Technology
co...@caucho.com
http://blog.caucho.com
http://twitter.com/cauchoresin

___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] apache resin 503 error when repeated requests from the same IP

2012-08-17 Thread Manidhar gudavalli
Paul
Thank you. Currently thread max is at 1400. Strange thing is, this happens
on two pages where the user posts data repeatedly. Some of these IP
addresses also repeating in the log. And, there are no issues with the page
java code. In my previous setup, I did not gave this problem. I moved to
new box and I keep the same resin configuration. However, I  switched to
worker RPM in apache and using JDK 1.7 . I dont see any errors in resin log.


I tried to migrate 4.x version and getting the same problem.
thanks
Mani


On Fri, Aug 17, 2012 at 12:09 PM, Paul Cowan co...@caucho.com wrote:


 On Aug 17, 2012, at 11:58 AM, Manidhar gudavalli wrote:

 HI
 I am seeing a strange 503 error  on the server. When the repeated requests
 coming from the clients with the same IP address, after some time, I am
 seeing 503 error in apache logs. These requests are all valid requests from
 valid ips.

 I am using resin 3.1.12. and apache 2.2.3 and JDK 7.
  Is resin considering, the repeated request from same IP as spam?
  Is there any parameter that I can set to force resin to accepts the
 requests and not consider as spam?


 Hi Mani,

 A 503 error usually indicates Resin was unavailable to Apache (ie
 restarting) or overloaded.  The client IP address should not matter.

 You need to examine the Resin logs to see what is it doing during that
 time and if there are any errors reported.

 Resin may be running out of resources or paused for a long garbage
 collection.  Often simply increasing thread-max to a larger number like
 2048 helps, since the default is rather low for Resin 3.1.

 Thanks,
 Paul





 Please help.

 thanks
 Mani


 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest


 ===
 Paul Cowan, Software Engineer
 Caucho Technology
 co...@caucho.com
 http://blog.caucho.com
 http://twitter.com/cauchoresin


 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest