title: WebLogic Cluster balancer always route to second node
body: <p>I have configured Apache to load balance two WebLogic nodes (using mod_weblogic),
  but all requests are forwarded to second node.</p>
  
  <p>Here what I have added to httpd.conf:</p>
  
  <pre><code>LoadModule weblogic_module modules/mod_wl_22.so
  &lt;IfModule mod_weblogic.c&gt;
  MatchExpression /soa-infra WebLogicCluster=node1.domain.com:8001,node2.domain.com:8001
  &lt;/IfModule&gt;
  &lt;Location /soa-infra&gt;
  SetHandler weblogic-handler
  WebLogicCluster node1.domain.com:8001,node2.domain.com:8001
  &lt;/Location&gt;
  </code></pre>
  
  <p>What I have tried with no effect:</p>
  
  <pre><code>1) swap node1.domain.com and node2.domain.com
  2) change balancing algorithm in WebLogic Administration Console
  </code></pre>
  
  <p>Some clarifications:
      1. client is adressing apache - I am testing myself.
      2. I see that apache is creating connection only after request from client/me and it is only connection to second node (on which it is executing).
      3. yes, both nodes are in local network and are reachable.
  I have found interesting thing:
  if I remove all my lines from httpd.conf except line for loading mod_weblogic and restart apache then I have no access via load-balancer - so balancer is really using my config lines,
  but if I remove second node from list then load balancer are still redirecting second node instead of only one listed first node.</p>
  
  <p>Looks like I have found issue!</p>
  
  <p>After several requests I see in log:</p>
  
  <pre><code>Wed Jan 25 19:56:49 2012 &lt;480013275070093&gt; Trying a pooled connection for '192.168.0.111/8001/8001'
  Wed Jan 25 19:56:49 2012 &lt;480013275070093&gt; getPooledConn: No more connections in the pool for Host[192.168.0.111] Port[8001] SecurePort[8001]
  Wed Jan 25 19:56:49 2012 &lt;480013275070093&gt; general list: trying connect to '192.168.0.111'/8001/8001 at line 2724 for '/soa-infra/services/partition/my_composite/my_composite_client_ep'
  
  Wed Jan 25 19:57:05 2012 &lt;480013275070256&gt; Trying to locate Primary or Secondary using SrvrInfo with JVMID: -76285319
  Wed Jan 25 19:57:05 2012 &lt;480013275070256&gt; getPreferredFromCookie: Found Primary 192.168.0.112:8001:0
  Wed Jan 25 19:57:05 2012 &lt;480013275070256&gt; getPreferredFromCookie: Found 1 servers
  </code></pre>
  
  <p>192.168.0.111 is a first node, 192.168.0.112 - second.</p>
  
  <p>Any suggestions?</p>