<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
Hi<div><br>You were bang on!  Thanks.  That was the issue.  For now i introduced the ip_hask; key for now in the upstream section and that fixed it.  </div><div><br></div><div>I will try your module.  We want to actually also implement the HttpUpstreamFairModule to improve the distribution.  Will the sticky session module that you linked to work in conjunction with that?</div><div><br>Thanks for your timely help, greatly appreciated.</div><div><br>Regards<br><br><br><br><br><div><hr id="stopSpelling">Date: Tue, 15 Nov 2011 10:47:53 +0800<br>Subject: Re: Nginx Load balancer mode for JBoss / Icefaces application<br>From: nbubingo@gmail.com<br>To: nginx@nginx.org<br><br>“<span class="ecxApple-style-span" style="font-family:Tahoma;font-size:13px;background-color:rgb(255, 255, 255)">However the session information is not being passed through or is being modified.</span>”<div><br></div><div>
How do you know that? I think the problem is the session is sent to be the wrong jboss server.</div><div><br></div><div>If the Jboss uses the similar session sticky way as Tomcat/Resin, you can use my nginx_jvm_route_module: <a href="http://code.google.com/p/nginx-upstream-jvm-route/" target="_blank">http://code.google.com/p/nginx-upstream-jvm-route/</a>  </div>
<div><br><div class="ecxgmail_quote">2011/11/14 Srinivasan Subramanian <span dir="ltr"><<a href="mailto:ssrini_vasan@hotmail.com">ssrini_vasan@hotmail.com</a>></span><br><blockquote class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex">




<div><div dir="ltr">
<br><br><font face="Tahoma" size="2">Hello</font><div style="font-family:Tahoma;font-size:10pt"><br>We have setup nginx as a Loadbalancer on Centos 5.2 x64.  nginx is acting as a LB for a web application developed using Java servlets and Icefaces (1.8.2).  The web application is deployed on JBoss 5.1.   After configuration nginx is able to redirect the queries to the upstream servers properly.  However the session information is not being passed through or is being modified.  So the Icefaces servlet is repeatedly refreshing the login page every few seconds and keeps creating new sessions.</div>
<div style="font-family:Tahoma;font-size:10pt"><br></div><div style="font-family:Tahoma;font-size:10pt">Please advise on any additional settings that need to be made.  The current settings are:</div><div style="font-family:Tahoma;font-size:10pt">
<br></div><div style="font-family:Tahoma;font-size:10pt">(nginx is running on 192.168.1.137)</div><div style="font-family:Tahoma;font-size:10pt"><br></div><div><div><font face="Tahoma" size="2">upstream int-lb {</font></div>
<div><font face="Tahoma" size="2">        server <a href="http://192.168.1.139:8080" target="_blank">192.168.1.139:8080</a>;</font></div><div><font face="Tahoma" size="2">        server <a href="http://192.168.1.138:8080" target="_blank">192.168.1.138:8080</a>;</font></div>
<div><font face="Tahoma" size="2">}</font></div><div><font face="Tahoma" size="2"><br></font></div><div><font face="Tahoma" size="2">server {</font></div><div><font face="Tahoma" size="2">    listen       80;</font></div>
<div><font face="Tahoma" size="2">    server_name  int-lb;</font></div><div><font face="Tahoma" size="2"><br></font></div><div><font face="Tahoma" size="2">    #charset koi8-r;</font></div><div><font face="Tahoma" size="2">    access_log  /var/log/nginx/host.access.log  main;</font></div>
<div><font face="Tahoma" size="2">    error_log  /var/log/nginx/host.error.log  debug;</font></div><div><font face="Tahoma" size="2">    root /usr/app/jboss5/server/default/deploy/admin-console.war;</font></div><div><font face="Tahoma" size="2"><br>
</font></div><div><font face="Tahoma" size="2">    location / {</font></div><div><font face="Tahoma" size="2">        proxy_set_header X-Forwarded-Host $host;</font></div><div><font face="Tahoma" size="2">        proxy_set_header X-Forwarded-Server $host;</font></div>
<div><font face="Tahoma" size="2">        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;</font></div><div><font face="Tahoma" size="2">        proxy_pass <a href="http://int-lb" target="_blank">http://int-lb</a>;</font></div>
<div><font face="Tahoma" size="2">    }</font></div><div><font face="Tahoma" size="2">}</font></div></div><div style="font-family:Tahoma;font-size:10pt"><br></div><div style="font-family:Tahoma;font-size:10pt">Thanks in advance for all assistance.<br>
<br>Regards<br>Srini</div>                                      </div></div>
<br>_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br></blockquote></div><br></div>
<br>_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx</div></div>                                           </div></body>
</html>