users@glassfish.java.net

Re: mod_proxy blocking my Comet HTTP streaming response

From: <glassfish_at_javadesktop.org>
Date: Mon, 28 Dec 2009 10:35:30 PST

Hi,

Comet HTTP streaming didn't work for me even after I made all the changes that Xu Erdong asked for. I'm using GF 2.1.1 in a cluster mode (with two instances) and Apache 2.2 in front of it to allow load balancing. Everything is good when making simple requests... but things get complicated with Comet Http Streaming...
I tried with LoadBalacing plugin provided by Sun but Comet didn't work, it seems to me like the stream if being blocked by Apache. BTW the latter stops responding by the way after that...
I used mod_proxy and mod_proxy_balancer with mod_rewrite but I ended getting the same behavior.
Here is my httpd.conf :
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule rewrite_module modules/mod_rewrite.so
# Put this in the main section of your configuration (or desired virtual host, if using Apache virtual hosts)
ProxyRequests Off
ProxyPreserveHost On
RewriteEngine on
<Proxy *>
Order deny,allow
Allow from all
</Proxy>

<Proxy balancer://cluster>
BalancerMember http://mizar:38080
BalancerMember http://alcor:38080
</Proxy>

RewriteRule ^/jws$ /jws/ [R,L]
RewriteRule ^/jws/(.*) balancer://cluster/jws/$1 [P,L]

ProxyPass /jws/ balancer://cluster/jws/ lbmethod=byrequests stickysession=JSESSIONID
ProxyPassReverse /jws/ balancer://cluster/jws/

<Location /jws/>
Order allow,deny
Allow from all
</Location>

<Location /balancer-manager>
SetHandler balancer-manager
</Location>

I also made the change requested by Xu Erdong to the headers being transmitted.
Thank you in advance for your time.

Env : Ubuntu 9.10, Apache 2.2.14, GF 2.1.1
[Message sent by forum member 'mmosman' (mehdi.osman_at_gmail.com)]

http://forums.java.net/jive/thread.jspa?messageID=377821